Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] Simple Template System (sts)


DiamondSea

Recommended Posts

Ok, I uploaded that file, and now I get:

 

Warning: main(STS_USER_CODE): failed to open stream: No such file or directory in /home/gtsweb/public_html/newcat/includes/sts_display_output.php on line 93

 

Fatal error: main(): Failed opening required 'STS_USER_CODE' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/gtsweb/public_html/newcat/includes/sts_display_output.php on line 93

 

So, I put up STS_USER_CODE, and I still get the same message. Any more advice?

Link to comment
Share on other sites

Kevin,

 

If this is on a clean install of Osc2.2 MS2 then all you have to do is upload ALL the files that are in the zip and edit the configure.php the way shown and it should work fine. Don't leave any extra space before the ?> after you paste the config stuff.

The Wiki Docs: Read them, live them and be thankful for them!

Link to comment
Share on other sites

Ok, I uploaded that file, and now I get:

 

Warning: main(STS_USER_CODE): failed to open stream: No such file or directory in /home/gtsweb/public_html/newcat/includes/sts_display_output.php on line 93

 

Fatal error: main(): Failed opening required 'STS_USER_CODE' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/gtsweb/public_html/newcat/includes/sts_display_output.php on line 93

 

So, I put up STS_USER_CODE, and I still get the same message. Any more advice?

It looks like you don't have STS_USER_CODE defined in your configure.php file.

 

Copy the definitions from the configure-SAMPLE.php file and it should fix it.

 

- Brian

Simple Template System (STS)

Layout your site with 1 (or more) HTML file!

Download STS: http://www.oscommerce.com/community/contributions,1524

Support: http://www.oscommerce.com/forums/index.php?showtopic=58541

Link to comment
Share on other sites

I am trying to edit the boxes and the way they look is there anyway to do this using this template system. Any help with this problem would be great.

 

http://alleywaymusic.com/index.php Is the link to the site so you can see the problem.

STS doesn't let you change the content of boxes, just move them whereever you want them.

 

Sorry! :(

 

- Brian

Simple Template System (STS)

Layout your site with 1 (or more) HTML file!

Download STS: http://www.oscommerce.com/community/contributions,1524

Support: http://www.oscommerce.com/forums/index.php?showtopic=58541

Link to comment
Share on other sites

hello,

I installed your very promissing STS 1.8 version, the way you say in the instructions.

 

I also (earlier) installed the affiliate plugin...

nothing happens...

 

What to do?

Edited by helohelo

Keesjan

Link to comment
Share on other sites

Brian,

 

I am wanting to re-arrange the boxes in the right colum but I there is no variable for the notifications box as far as I know. Can you give me instructions on how to add a variable for it so that I can move it around in my sts_template.html page?

If only I was the one helping you...

 

.:::::For complete data-driven and multi-media website creations:::::.

http://www.innocentinnovations.com

 

------------------------

Get instructions, visit the documentation site:

http://wiki.oscommerce.com/Top

Link to comment
Share on other sites

So everone on this post asks to see examples of the simple template system. Here is mine..still a few bugs to work out. Whats up with the tell a friend adding to cart? anyone figure this out yet? I didnt have this problem till I used this contribution.

 

My simple template system site.

The Wiki Docs: Read them, live them and be thankful for them!

Link to comment
Share on other sites

Hi, nice contribution before i begin :)

 

This is probably a very basic question, but im looking to create a completely customised shop. I need to be able to edit the $content variable.. Currently I have:

 

"HEADING_TITLE

 

 

Welcome Guest! Would you like to log yourself in? Or would you prefer to create an account?

 

Sample text in here

 

TABLE_HEADING_NEW_PRODUCTS"

 

and all the new products. "sample text in here" is my attempt to modify the content on the index page. (via the english language page) However, I wish to remove (at least temporarily) the "HEADING TITLE" "Welcome Guest" and entire new products section.. I have been searching around the files and havent been able to do this.

 

Obviously, to make things easier to change, it would be ideal if i could delete this stuff by commenting out code from the sts files, but have tried various things in these files to no avail..

 

I assume I will be wanting to comment out from the Display HTML part of sts_display_output.php ? I am at a loss to understand what part of these files control the $content variable..

 

I suspect

 

$template['content'] = strip_content_tags($sts_block['columnleft2columnright'], 'content');

 

has something to do with it, but i am not sure what 'columnleft2columnright' is (or even what these lines of code do.. (presumably they are reading through something in the original installation, stripping code, and modifying the string ?) In which case, what do i need to edit?

 

any help on this would be greatly appreciated..

 

Rob

 

http://www.luminate.org.uk/

Link to comment
Share on other sites

Hello osCommerce community,

 

I am in the process of setting up my first osCommerce store and am constantly amazed by what it can do.

I am no good with PHP and so was very glad to be able to use the Simple Template System which seems to work wonders on my very clean installation.

 

So far I have encountered only one problem:

 

At the complete bottom of my page (underneath the copyright notice) I have the following text:

 

</

 

I have no idea where this came from and where I can find it. I know for sure it is not in the sts_template file.

 

I hope anybody can help me solve this minor problem?

 

Kind regards,

 

Hans de Zwart

Link to comment
Share on other sites

Hi there,

 

Thanks for a great contribution. Some questions...

 

1, I've made a menu in sts_template.html with some rollovers and links and I wonder if it's possible to modify STS to use the default template for my html-files? I would like the left column to show up even in my own pages (about us, contact us..)

See early version (100Kb JPG)

 

2, I'm aware of that my graphical menu (in swedish) will show up even when changning language. Is it possible to use different STS templates for different languages?

 

3, Im not sure i understood how to modify the head controller in the readme-file. Is it possible for the head controller to change the title on each page? (like Store name - Product name or Store name - Category - Product).

 

4, Can I change the catmenus first value "Catalog" to whatever i want, like for example "Choose category"?

 

Thanks again!!

Link to comment
Share on other sites

Here is a way to make your store index.php template without having to use the $content command. The catalog/index.php = catalog/includes/sts_template.html, then under catalog/includes/sts_templates/ you can have a template for any .php file in the catalog/ directory by calling it ????.php.html. So if you leave the $content out of the sts_template.html you won't see any products. I didn't want the $content on my index and didnt want to remove all that code for welcome guest and stuff like that so here is what I did. Edit the catalog/includes/filenames.php and change the FILENAME_DEFAULT from index.php to whatever you want. Copy your index.php and rename to new name and upload to your catalog/ Now you don't have to have the $content there. Surfer starts on your index page but when they click to go to products they switch to new page. Only major change was to some of the back buttons. Had to edit to reflect which homepage I wanted them at. Still working on the contact us continue button. Here is what it looks like..watch your browsers url status bar for changes. My Webpage

The Wiki Docs: Read them, live them and be thankful for them!

Link to comment
Share on other sites

Hi, nice contribution before i begin :)

 

This is probably a very basic question, but im looking to create a completely customised shop. I need to be able to edit the $content variable.. Currently I have:

 

"HEADING_TITLE 

 

 

Welcome Guest! Would you like to log yourself in? Or would you prefer to create an account?

 

Sample text in here

 

TABLE_HEADING_NEW_PRODUCTS"

 

and all the new products. "sample text in here" is my attempt to modify the content on the index page. (via the english language page) However, I wish to remove (at least temporarily) the "HEADING TITLE" "Welcome Guest" and entire new products section.. I have been searching around the files and havent been able to do this.

 

Obviously, to make things easier to change, it would be ideal if i could delete this stuff by commenting out code from the sts files, but have tried various things in these files to no avail..

 

I assume I will be wanting to comment out from the Display HTML part of sts_display_output.php ? I am at a loss to understand what part of these files control the $content variable..

 

I suspect

 

$template['content'] = strip_content_tags($sts_block['columnleft2columnright'], 'content');

 

has something to do with it, but i am not sure what 'columnleft2columnright' is (or even what these lines of code do.. (presumably they are reading through something in the original installation, stripping code, and modifying the string ?) In which case, what do i need to edit?

 

any help on this would be greatly appreciated..

 

Rob

 

http://www.luminate.org.uk/

The $content variable will contain whatever is in the main part of the page (the middle square between the header, footer, left column and right column) where the actual main user-interaction takes place

 

STS does not modify the content area, it only captures it from whatever script is being called and maps it to the $content variable.

 

If you want to know how to change the main content stuff in the middle of the pages, STS has nothing to do with it.

 

Take a look in some of the other customization discussions and you'll find your answers there.

 

In the case you mentioned, the text is generated by the index.php file and the text is found in the language directories.

 

No settings that are part of STS control the text you are trying to change. Disabling the $content variable will simply keep your main content area from ever displaying.

 

Hope this helps!

 

- Brian

Simple Template System (STS)

Layout your site with 1 (or more) HTML file!

Download STS: http://www.oscommerce.com/community/contributions,1524

Support: http://www.oscommerce.com/forums/index.php?showtopic=58541

Link to comment
Share on other sites

Hello osCommerce community,

 

I am in the process of setting up my first osCommerce store and am constantly amazed by what it can do.

I am no good with PHP and so was very glad to be able to use the Simple Template System which seems to work wonders on my very clean installation.

 

So far I have encountered only one problem:

 

At the complete bottom of my page (underneath the copyright notice) I have the following text:

 

</

 

I have no idea where this came from and where I can find it. I know for sure it is not in the sts_template file.

 

I hope anybody can help me solve this minor problem?

 

Kind regards,

 

Hans de Zwart

I'm pretty sure it's a bug in older versions of PHP.

 

Get your webmaster or hosting company to upgrade to a current version of PHP and it will magically go away.

 

- Brian

Simple Template System (STS)

Layout your site with 1 (or more) HTML file!

Download STS: http://www.oscommerce.com/community/contributions,1524

Support: http://www.oscommerce.com/forums/index.php?showtopic=58541

Link to comment
Share on other sites

Trendy (and others)... adding new boxes is simple. It's all in sts_user_code.php ... just change "newbox" to what you want to name it/reference it by, and "new_box.php" to the infobox code in your boxes/ dir.

 

Generic Example:

 

$sts_block_name = 'newbox';
require(STS_START_CAPTURE);
require(DIR_WS_BOXES . 'new_box.php');
require(STS_STOP_CAPTURE);
$template['newbox'] = strip_unwanted_tags($sts_block['newbox'], 'newbox');

 

So, if you figure the infobox is product_notifications.php, you'd add to sts_user_info.php:

 

// $notificationbox -- product notifications
$sts_block_name = 'notificationbox';
require(STS_START_CAPTURE);
require(DIR_WS_BOXES . 'product_notifications.php');
require(STS_STOP_CAPTURE);
$template['notificationbox'] = strip_unwanted_tags($sts_block['notificationbox'], 'notificationbox');

 

Then use $notificationbox wherever you want it to appear in your template(s). Remember that the box will only show on a product_info page (it's coded that way in product_notifications.php).

Edited by JnGDotCom
Link to comment
Share on other sites

I love STS I stayed away from oscommerce for along time because it was so bloody difficult to change the interface IMHO, but no longer! I'm running it and love it, thanks. Now on to my problem, I'm in the camp that says you need Search engine friendly URL. When I turn them on in the admin screens none of the links work. so I tryed the "SEF Link Transformer" contribution and had all kinds of problems because I think STS and the SEF contrib are both trying to capture and process the output buffer :o . Has anyone been sucessful with a Safe URL in oscommerce or a Safe URL contribution working with STS?

 

thanks

charlie

Link to comment
Share on other sites

hello,

Iam interested in Search engine friendly url's too.

Meanwhile I have 3 questions about this great add-on!:

Q1: Do I or do I not have to install header tag controller also to see automatc tag controll?

 

Q2: do anyone knows why in the first url the boxes on the right are placed good and on the second url not(way to far to the right)? This all is created with STS_1.8

 

 

http://www.optimizekit.com/shop/oscommerce...dex.php?cPath=2

 

http://www.optimizekit.com/shop/oscommerce-2.2ms2/catalog/

 

Q3: Why is the backgroundimage for the page not displayed? Like on http://www.optimizekit.com ?

 

Q4: I only plan to sell 4 subscriptions. How can I make the entry page for the shop start with this 4 products?

Edited by helohelo

Keesjan

Link to comment
Share on other sites

Hi. I know this is a retarded question, so try not to ridicule me too much. ;)

 

When I view sts_template.html, all I get are the boxes with the "$" words in them. And that's viewing them with a browser. I'm confused as to how to get the "$" to actually turn into the OSC graphics and words and the like. I followed the instructions, copied the files into the catalog/includes, modded my configuration.php, but there, the instructions end, and it just says to modify the template as you see fit. Well I can modify it all day but all I see are $this and $that. I thought those were just variables that call in the code from OSC.

 

I'm so confused.

Link to comment
Share on other sites

you could use this code as your index.php in your top level directory

 

<?php
header("Location: http://www.mysite.com/catalog/"); /* Redirect browser */

/* Make sure that code below does not get executed when we redirect. */
exit;
?>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...