Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

DiamondSea

[contribution] Simple Template System (sts)

Recommended Posts

ok, i got STS working finally..... now i am having trouble using the osCommerce templates that i have downloaded. Where do the template files need to go exactly? I have tried putting the osc template folder in sts_templates folder and selecting it from admin console but its a no go. any help would be great.

 

is development with OSC dying? is there something better that I should know about?

 

Trav,

 

STS allows you to use any standard web template as a starting point for your template to be used in osCommerce. If I am understanding you correctly, you purchased a so called "osCommerce template". Just so you know, osC does not have a template system "out-of-the-box". What this means is, the template you purchased is actually an entire osCommerce set of files that were intended to be installed on your web host site. The problem with this is that you have no idea what kind of shape the code is in or if it will even function at all (do a search for all of the horror stories of purchased osCommerce templates).

 

This is where STS can help you but you will need to take a couple of extra steps to get your purchased template to work with the latest osCommerce code. I wrote a step by step tutorial on how to convert your purchased template into a STS template that you would then be able to use with the most recent version of osCommerce.

 

Here it is:

Post#23

http://forums.oscommerce.com/index.php?sho...p;#entry1156100


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites

Hello, System works great except now the preview image screen does not work via the javascript popup. It works fine under the normal template.

 

Any ideas would be great.

Share this post


Link to post
Share on other sites
Hello, System works great except now the preview image screen does not work via the javascript popup. It works fine under the normal template.

 

Any ideas would be great.

 

 

What do you mean by

It works fine under the normal template.
?

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites

Thanks for you reply,

 

 

The problem is that i didnt modified any file, actually i uploaded "ready to use" files then the problem happened.

If i rollback the installation everything is ok then i can receive emails from OSC. Any idea? :blink:

 

 

This would only take place if you misplaced some of the STS code during a manual installation. To quickly find your mistake, use a file comparison tool such as WinMerge or Beyond Compare to compare your files with the files that came with STS.

Share this post


Link to post
Share on other sites
Thanks for you reply,

 

 

The problem is that i didnt modified any file, actually i uploaded "ready to use" files then the problem happened.

If i rollback the installation everything is ok then i can receive emails from OSC. Any idea? :blink:

 

You have to upload two sets of files in order to complete the STSv4.5.8 installation:

 

2.3 Copy new files

From the "STS" folder, copy the new files to your store:

 

  • catalog\includes\classes\sts.php
  • catalog\includes\functions\sts.php
  • folder catalog\includes\languages\english\modules\sts (plus all other languages you may have in your setup)
  • folder catalog\includes\modules\sts
  • folder catalog\includes\modules\sts_inc
  • folder catalog\includes\sts_templates

2.4 Modify osCommerce files

The following osCommerce files are modified by STS:

 

Note: If you have a fresh install of osCommerce 2.2MS2, you can take the files from the "Files for MS2" folder and copy them over your installation. If you have a fresh install of osCommerce Online Merchant 2.2RC1, you can take the files from the "Files for RC1" folder and copy them over your installation. If you have a fresh install of osCommerce Online Merchant 2.2RC2, you can take the files from the "Files for RC2" folder and copy them over your installation. If you have already installed contributions, you can make the changes manually, they are all described in the next chapters. When installation is completed, go to chapter 3 for the configuration.

 

 

The above is taken from the install.htm file that was included in the STS download.

Edited by bkellum

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites

When I enable STS, search bots (google, yahoo, msn) all start reporting HTTP 500 Internal Server errors. This is what is recorded in Apache access_log: "GET / HTTP/1.1" 500 36541 "-" "msnbot-webmaster/1.0 (+http://search.msn.com/msnbot.htm)"

 

So I tried the site with Lynx and it also befeifly reports this error and the it loads the site. Every page I navaigate to with Lynx I brefily get this error then the page loads fine. If I set "Do you want to use Simple Template System?" to false then Lynx does not report any errors and the site works fine. More confusing is the site works fine with STS enabled in IE/Firefox/Safari.

 

I'm using STS 4.5.8 for all osC 2.2 versions dated 23 Jan 2008 and I also have installed Header Tags SEO V 3.1.1 dated 1 Mar 2009. I have tried removing Header Tags and using the sts_blank_template.html template but still get the error.

 

 

Any ideas are what could be causing this or things to try? Thanks for your help!

Share this post


Link to post
Share on other sites
When I enable STS, search bots (google, yahoo, msn) all start reporting HTTP 500 Internal Server errors. This is what is recorded in Apache access_log: "GET / HTTP/1.1" 500 36541 "-" "msnbot-webmaster/1.0 (+http://search.msn.com/msnbot.htm)"

 

So I tried the site with Lynx and it also befeifly reports this error and the it loads the site. Every page I navaigate to with Lynx I brefily get this error then the page loads fine. If I set "Do you want to use Simple Template System?" to false then Lynx does not report any errors and the site works fine. More confusing is the site works fine with STS enabled in IE/Firefox/Safari.

 

I'm using STS 4.5.8 for all osC 2.2 versions dated 23 Jan 2008 and I also have installed Header Tags SEO V 3.1.1 dated 1 Mar 2009. I have tried removing Header Tags and using the sts_blank_template.html template but still get the error.

 

 

Any ideas are what could be causing this or things to try? Thanks for your help!

Jeremy,

 

This is a server issue and has nothing to do with STS.

 

Check your error logs and you might find out more information.


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites

Hi everyone, quick question - installed and all working fine (BIG THANKS!) but in the HTML source the following shows:

 

<!-- start get_javascript(applicationtop2header) //-->

<!-- end get_javascript(applicationtop2header) //-->

 

Where is this being produced? As I can't find it for the life of me! :huh:

 

Thanks in advance!


Joe

 

MacMan strikes again!

 

Always backup first before listening to me!

Share this post


Link to post
Share on other sites

I'm having a problem with the variable "$templatedir" when using with a sytle sheet location (href="$templatedir/stylesheet.css) or image path. It works great until an SSL request is made, then it is not able to find files. If I hard code the locations is the template.html then they work fine with both SSL and non-SSL locations.

 

Any thoughts?

 

Thanks

Jeremy

Share this post


Link to post
Share on other sites
Hi everyone, quick question - installed and all working fine (BIG THANKS!) but in the HTML source the following shows:

 

<!-- start get_javascript(applicationtop2header) //-->

<!-- end get_javascript(applicationtop2header) //-->

 

Where is this being produced? As I can't find it for the life of me! :huh:

 

Thanks in advance!

 

$headcontent

 

This placeholder is very important in the template. It takes care of the HTML meta tags and JavaScript that are to be placed in the HTML header of the page.

 

It will place the following in your template:

 

- http-equiv meta tag with charset

- title meta tag (from $headertags)

- base URL

- Javascript found in includes/header.php

 

How to Use: place

<!--$headcontent-->

between <head> and </head> of your template. It is important to keep the comment chars before and after $headcontent otherwise it won't work!

 

Example:

<head> <!--$headcontent--> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head>

 

Result of the above example (source code):

<head> 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 
<title>This is the title of my store</title> 
<base href="[url="http://mystore.com/"]http://mystore.com/[/url]"> 
<!-- start get_javascript(applicationtop2header) //--> 
<!-- end get_javascript(applicationtop2header) //--> 
<link rel="stylesheet" type="text/css" href="stylesheet.css"> T</head>

 

The $headcontent tag is created in: includes/classes/sts.php


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites
I'm having a problem with the variable "$templatedir" when using with a sytle sheet location (href="$templatedir/stylesheet.css) or image path. It works great until an SSL request is made, then it is not able to find files. If I hard code the locations is the template.html then they work fine with both SSL and non-SSL locations.

 

Any thoughts?

 

Thanks

Jeremy

 

This would have to do with how your store is configured. STS will automatically display SSL and NONSSL appropriately.

 

Regarding your stylesheet link:

 

Here is the correct method of linking to your stylesheet.css file:

 

<link rel="stylesheet" type="text/css" href="$templatedir/stylesheet.css">

Using this example, you would place the stylesheet.css in catalog/includes/sts_templates/YOUR_TEMPLATE_DIRECTORY/stylesheet.css.


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites

Hi is there any way to add languages flags to the header instead of the box? i put this tag $languagebox in the header but it gives a box.. actually i dont want the box title, just flags..

 

Thanks

Edited by oslover

Share this post


Link to post
Share on other sites
Hi is there any way to add languages flags to the header instead of the box? i put this tag $languagebox in the header but it gives a box.. actually i dont want the box title, just flags..

 

Thanks

 

Sure, just create an infobox template for the languages box and don't put in the title.


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites
Sure, just create an infobox template for the languages box and don't put in the title.

 

Thank you for the quick reply, I think modernrc2a already has infobox template for languages. isn't it?

 

If not, can you please kindly tell me what code i should place in infobox template for languages?

Share this post


Link to post
Share on other sites
Thank you for the quick reply, I think modernrc2a already has infobox template for languages. isn't it?

 

If not, can you please kindly tell me what code i should place in infobox template for languages?

 

 

David,

 

Make a backup of your site and then just go crazy. You won't believe what you will learn about STS just by messing around with it. It is very powerful and yet very simple.

 

In the language box template, remove everything, including all of the HTML, and then simply have the $content tag.


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites

I believe STS is a cool easy way to customize oscommerce. and thank you Bill for it.

However, I did what you said but it didn't work. I deleted all the code in includes\sts_templates\modernrc2a\boxes\infobox_languages.php.html

except $content tag

 

and then i placed $languagebox tag just below the quick find box in the header.

 

 

Can you please tell me what's wrong in this?

Share this post


Link to post
Share on other sites
I believe STS is a cool easy way to customize oscommerce. and thank you Bill for it.

However, I did what you said but it didn't work. I deleted all the code in includes\sts_templates\modernrc2a\boxes\infobox_languages.php.html

except $content tag

 

and then i placed $languagebox tag just below the quick find box in the header.

 

 

Can you please tell me what's wrong in this?

 

David,

 

What didn't work? I just did it on my test site and only the flags were displayed under the quick find box.


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites

Is it possible to change the text style for all the pages in one go without going the css sheet and change each one individually?

 

Any help would be appreciated.

 

regards,

 

Paul.

Share this post


Link to post
Share on other sites
David,

 

What didn't work? I just did it on my test site and only the flags were displayed under the quick find box.

 

 

Well this is how i proceeded, i am not sure if it is correct.. as i still see the language box having it's title..

 

I deleted all the code in includes\sts_templates\modernrc2a\boxes\infobox_languages.php.html

 

except $content tag

 

and then i placed $languagebox tag just below the quick find box in the header.

 

 

 

Can you please post your code of the header part of sts_template? and the one for modernrc2a\boxes\infobox_languages.php.html

 

 

Regards,

Share this post


Link to post
Share on other sites
$headcontent

 

This placeholder is very important in the template.

Thanks for your reply - I was just wanting to remove the HTML comments from the output but was having trouble finding where it was being produced. Your post was the missing clue and I found that they were being produced by the get_javascript() function in includes/functions/sts.php where I can remove the <!-- start $commentlabel //--> and <!-- end $commentlabel //--> markup (and not $tmpstr ;) ).

 

Thanks!


Joe

 

MacMan strikes again!

 

Always backup first before listening to me!

Share this post


Link to post
Share on other sites

Sup all,

 

1st... I love STS. THANKS!

 

2nd... I'm having a hard time figuring out some of the structure. When I think I'm editing the right file, I do a search for that file name, and find 12 differnet versions in my catalog folder (and subfolders). So I apologize if this is going to be a stupid question.

 

When you look at my demosite (http://www.woodwerks.com/catalog) you'll see I've customized my info boxes. However I'd like to further customize just my categories box. You'll see I've already done this by adding buttons around the category info box, by editing catalog/includes/boxes/categories.php.

 

Now I wanted to use the STS category info box, but it displayed all the categories in a drop down menu.

 

I guess my question is, how do I use the STS category box, but get the categories listed like they are in the standard category box?

 

A general guide for creating my own infobox (in STS) labeling it and defining the $<fill in the blank> veriable would be GREAT.

 

 

Thanks again.

 

Boom

Share this post


Link to post
Share on other sites
Is it possible to change the text style for all the pages in one go without going the css sheet and change each one individually?

 

Any help would be appreciated.

 

regards,

 

Paul.

 

That is the purpose of the stylesheet, to be able to modfiy the style in one go without having to modfiy every page individually.


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites
Well this is how i proceeded, i am not sure if it is correct.. as i still see the language box having it's title..

 

I deleted all the code in includes\sts_templates\modernrc2a\boxes\infobox_languages.php.html

 

except $content tag

 

and then i placed $languagebox tag just below the quick find box in the header.

 

 

 

Can you please post your code of the header part of sts_template? and the one for modernrc2a\boxes\infobox_languages.php.html

 

 

Regards,

 

David,

 

The only change that I made to the sts_template.html was to add the tag $languagebox underneath the quick find box.

The change that I made to modernrc2a\boxes\infobox_languages.php.html was remove everything except $content.


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites
Sup all,

 

1st... I love STS. THANKS!

 

2nd... I'm having a hard time figuring out some of the structure. When I think I'm editing the right file, I do a search for that file name, and find 12 differnet versions in my catalog folder (and subfolders). So I apologize if this is going to be a stupid question.

 

When you look at my demosite (http://www.woodwerks.com/catalog) you'll see I've customized my info boxes. However I'd like to further customize just my categories box. You'll see I've already done this by adding buttons around the category info box, by editing catalog/includes/boxes/categories.php.

 

Now I wanted to use the STS category info box, but it displayed all the categories in a drop down menu.

 

I guess my question is, how do I use the STS category box, but get the categories listed like they are in the standard category box?

 

A general guide for creating my own infobox (in STS) labeling it and defining the $<fill in the blank> veriable would be GREAT.

 

 

Thanks again.

 

Boom

 

A guide is already listed in the STS User Manual as well as within the comments of the code itself but here you go:

 

Post #4647

http://forums.oscommerce.com/index.php?sho...p;#entry1287110

 

Regarding the $categorybox (listing of categories) and the $catmenu (dropdown listing of categories):

 

These are two separate beasts. You can use both, one or none of the above. It is up to you. The $categorybox already lists the categories as a stock osC does. Any changes you do to the includes/boxes/categories.php file will be reflected in this menu. I suggest following the tips in the STS User Manual and install this add-on to give you more control over your category menu: http://www.oscommerce.com/community/contributions,4201

 

The $catmenu is a simple JavaScript that creates a dropdown menu of the top category names.


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×