Jump to content
DiamondSea

[contribution] Simple Template System (sts)

Recommended Posts

I am trying to download STS v4.5.8 but somehow the links don't seem to be working. Are there any mirrors for me to get it?

Share this post


Link to post
Share on other sites

I seem to have lost my .ico icon that used to be displayed in the browser tab. This appeared to have occurred after I installed STS and then HTC SEO.

 

Whilst it's not a biggy, I would rather like my little icon back. Jack over at the HTC SEO forum thinks this is nothing to do with his contribution (I've no reason to doubt him) I'm just wondering why it's not showing up.

 

I have the following in muy head section of the index.php.html of the STS template:

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html $htmlparams>
<head>
<!--$headcontent-->
 <link rel="stylesheet" type="text/css" href="boomstylesheet.css">
   <link rel="Shortcut Icon" href="images/logo/boom.ico" />

<style type="text/css">
<!--
.signup {color: #0000FF; font-size: 10px; }
.style1 {color: #FFFFFF}
-->
 </style>
</head>

 

Can anyone help resolve this?

 

Regards

SSNB

Share this post


Link to post
Share on other sites
I can not get RSS Feeds 2.0 (http://addons.oscommerce.com/info/1513) to work with STS. Is there somone out there who has solved this problem already?

Found a solution :-)

To get RSS Feeds 2.0 to work with STS open rss.php

FIND

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_RSS);

AFTER ADD

$sts->display_template_output = 0;

Share this post


Link to post
Share on other sites
I seem to have lost my .ico icon that used to be displayed in the browser tab. This appeared to have occurred after I installed STS and then HTC SEO.

 

Whilst it's not a biggy, I would rather like my little icon back. Jack over at the HTC SEO forum thinks this is nothing to do with his contribution (I've no reason to doubt him) I'm just wondering why it's not showing up.

 

I have the following in muy head section of the index.php.html of the STS template:

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html $htmlparams>
<head>

<link rel="stylesheet" type="text/css" href="boomstylesheet.css">
<link rel="Shortcut Icon" href="images/logo/boom.ico" />

<style type="text/css">

</style>
</head>

 

Can anyone help resolve this?

 

Regards

SSNB

http://en.wikipedia.org/wiki/Favicon

I don't see STS as keeping this from happening. I have heard of meta tag contributions getting in the way though.


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
Found a solution :-)

To get RSS Feeds 2.0 to work with STS open rss.php

FIND

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_RSS);

AFTER ADD

$sts->display_template_output = 0;

 

 

STS has a built in solution to prevent templating of specific files in your shop. See the following post that I made on the subject a while back:

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


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
STS has a built in solution to prevent templating of specific files in your shop.

Thx - found it and works :-) This information should be added to the STS manual.

Here is how I got RSS 2.0 to work with STS:

In sts_default.php find

if (strstr($scriptbasename, "popup") || strstr($scriptbasename, "info_shopping_cart"))
  return ''; // We don't use template for these scripts

and change to

if (strstr($scriptbasename, "popup") || strstr($scriptbasename, "rss")|| strstr($scriptbasename, "info_shopping_cart"))
  return ''; // We don't use template for these scripts

Share this post


Link to post
Share on other sites
Thx - found it and works :-) This information should be added to the STS manual.

Here is how I got RSS 2.0 to work with STS:

In sts_default.php find

if (strstr($scriptbasename, "popup") || strstr($scriptbasename, "info_shopping_cart"))
  return ''; // We don't use template for these scripts

and change to

if (strstr($scriptbasename, "popup") || strstr($scriptbasename, "rss")|| strstr($scriptbasename, "info_shopping_cart"))
  return ''; // We don't use template for these scripts

 

Yes, this would be the correct way to exclude a page from being templated.


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
http://en.wikipedia.org/wiki/Favicon

I don't see STS as keeping this from happening. I have heard of meta tag contributions getting in the way though.

 

 

Thanks Bill, your link was helpful.

 

For anyone who is interested, I solved the problem by hardlinking to the file, rather than a relative link....

 

I changed <link rel="Shortcut Icon" href="images/logo/favicon.ico" />

 

to : <link rel="Shortcut Icon" href="http://mydomain/images/logo/boom.ico" />

 

Simple really, and now I have a happy little icon again ! :-)

 

Now I wish all bugs were as easy to solve......

 

 

I still can't understand why my shipping table only displays one zone, despite configuring the zones.php file for 3 zones....

Edited by ssnb

Share this post


Link to post
Share on other sites
Thanks Bill, your link was helpful.

 

For anyone who is interested, I solved the problem by hardlinking to the file, rather than a relative link....

 

I changed <link rel="Shortcut Icon" href="images/logo/favicon.ico" />

 

to : <link rel="Shortcut Icon" href="http://mydomain/images/logo/boom.ico" />

 

Simple really, and now I have a happy little icon again ! :-)

 

Now I wish all bugs were as easy to solve......

 

 

I still can't understand why my shipping table only displays one zone, despite configuring the zones.php file for 3 zones....

 

If you want to keep the link relative (which you will need if you get a security cert.), simply upload the image to your template dir/image folder and then change the link as so:

<link rel="Shortcut Icon" href="$templatedir/images/logo/boom.ico" />

Of course, you will need to have an 'images' folder in your template folder with the boom.ico file in that folder.


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,

 

I have finally opted to use multiple currencies and am using STS template.

 

I have four customised index.php_0 / 1 / 2 / 3 / 4 files for various pages (i.e. for the front page, 1st, 2nd, 3rd categories) and 1 sts_template file for the rest of the display pages.

 

I have inserted <td>$currenciesbox</td> and the currency box pulldown displays ok and does what it says. When I change it from Euros to USD the headcart ($headcart) also updates from one currency to the other. So, it works.

 

Here's my problem. When I go to other pages within my site the currency reverts to my default currency, which is GBP. I've been trying to work this one out virtually all day -i've scanned most of the posts and am just hoping someone could explain why this is happening.

 

sts_display_output seems fine as well as sts_user_code.

 

Thanks in advance.

Share this post


Link to post
Share on other sites
Hi,

 

I have finally opted to use multiple currencies and am using STS template.

 

I have four customised index.php_0 / 1 / 2 / 3 / 4 files for various pages (i.e. for the front page, 1st, 2nd, 3rd categories) and 1 sts_template file for the rest of the display pages.

 

I have inserted <td>$currenciesbox</td> and the currency box pulldown displays ok and does what it says. When I change it from Euros to USD the headcart ($headcart) also updates from one currency to the other. So, it works.

 

Here's my problem. When I go to other pages within my site the currency reverts to my default currency, which is GBP. I've been trying to work this one out virtually all day -i've scanned most of the posts and am just hoping someone could explain why this is happening.

 

sts_display_output seems fine as well as sts_user_code.

 

Thanks in advance.

Admin --> Configuration --> My Store --> Switch To Default Language Currency

 

Switch it to false


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
Admin --> Configuration --> My Store --> Switch To Default Language Currency

 

Switch it to false

 

Bill - thank you very much. I can't believe it was something so simple yet I am so happy that I can finally see it working. Once again thank you for replying and sharing your know-how.

Share this post


Link to post
Share on other sites

Greetings to all of you,

 

I'd like to put a little script in my store for website statistics (visitors, entry pages, etc).

Could you please tell me which module (part of the store) is loaded with each page (when

browsing categories, product details, everything) in order to put the script there and have

the correct number of displays per day?

 

I have STS Template installed and that's why I'm asking here. Thanks a lot!

Dan

Share this post


Link to post
Share on other sites

Don't know where to begin..

 

Hi,

 

I'm new to osCommerce but have a lot of experience in configuring open source applications. My usual habit is to always refer to the manual first and if there's something I don't understand, I will try to search the forums or dig the mailing list archives first before actually posting my questions. So far I didn't have any problems configuring osCommerce. I even followed various beginners tips, like those "How do I's" for beginners. STS was mentioned in this thread, "how to create awsome osCommerce website". The first thing I thought of doing was customizing the look of my website. So I followed the advise and successfully installed STS 4.5.8. However, when I started reading the manual. I couldn't get anywhere. The installation manual is fine. The User manual is a bit reference-type in my opinion. For someone who doesn't have a prior experience in website development, I was at a dead end. So what I did, I focused on the site functionality first.

 

So far I have the following contributions configured and working the way they should without messing each other's functionality.

 

Ulimate SEO URLs

Order Editor

Auto Thumbnailer using GD

Must Accept Terms and Conditions

Anti Robot Registration Validation

Fast Easy Checkout

Quick Updates

AJAX shopping Cart

Latest News

Bank Transfer

Western Union

Who's Online Enhancement

Scrolling Best sellers

Product Listings in Columns

 

 

Now I decided to start all over again with STS, and I told myself this time, I'm not giving up.

Again I finished reading the user manual but I still don't know where to begin.

I tried testing my STS installation by enabling the "full" template but it broke several contributions I have like scrolling best sellers,

I want to have a really awsome looking website but I don't want to break any of the above contributions I have installed.

I wish there is a howto for STS. STS can change the look of anything, right? I can position boxes wherever I want, center the entire

website, change the bottons and icons, position them anywhere I want, etc.

Should I install DreamWeaver in order the make my website designing easier?

Should I have installed STS powerpack instead of this in order to avoid problems with other contributions?

Do you have a really awsome sample website that made use of STS?

If STS is the third most downloaded application, what was the first and the second? I was trying to find this contribution rankings but I haven't found

it yet. (only the most downloaded for the day)

 

 

Any tips or links to forum threads or howtos is greatly appreciated.

 

Thank you.

Share this post


Link to post
Share on other sites
Don't know where to begin..

 

Hi,

 

I'm new to osCommerce but have a lot of experience in configuring open source applications. My usual habit is to always refer to the manual first and if there's something I don't understand, I will try to search the forums or dig the mailing list archives first before actually posting my questions. So far I didn't have any problems configuring osCommerce. I even followed various beginners tips, like those "How do I's" for beginners. STS was mentioned in this thread, "how to create awsome osCommerce website". The first thing I thought of doing was customizing the look of my website. So I followed the advise and successfully installed STS 4.5.8. However, when I started reading the manual. I couldn't get anywhere. The installation manual is fine. The User manual is a bit reference-type in my opinion. For someone who doesn't have a prior experience in website development, I was at a dead end. So what I did, I focused on the site functionality first.

 

So far I have the following contributions configured and working the way they should without messing each other's functionality.

 

Ulimate SEO URLs

Order Editor

Auto Thumbnailer using GD

Must Accept Terms and Conditions

Anti Robot Registration Validation

Fast Easy Checkout

Quick Updates

AJAX shopping Cart

Latest News

Bank Transfer

Western Union

Who's Online Enhancement

Scrolling Best sellers

Product Listings in Columns

 

 

Now I decided to start all over again with STS, and I told myself this time, I'm not giving up.

Again I finished reading the user manual but I still don't know where to begin.

I tried testing my STS installation by enabling the "full" template but it broke several contributions I have like scrolling best sellers,

I want to have a really awsome looking website but I don't want to break any of the above contributions I have installed.

I wish there is a howto for STS. STS can change the look of anything, right? I can position boxes wherever I want, center the entire

website, change the bottons and icons, position them anywhere I want, etc.

Should I install DreamWeaver in order the make my website designing easier?

Should I have installed STS powerpack instead of this in order to avoid problems with other contributions?

Do you have a really awsome sample website that made use of STS?

If STS is the third most downloaded application, what was the first and the second? I was trying to find this contribution rankings but I haven't found

it yet. (only the most downloaded for the day)

 

 

Any tips or links to forum threads or howtos is greatly appreciated.

 

Thank you.

Link to contribution rankings (by download): http://www.oscommerce.com/community/contributions/top,all

 

Clarifications: STS Power Pack is not a contribution but rather a site listing of STS addons, tips, bundles, etc. The core contribution is STS (Simple Template System). STS is a great tool for templating osCommerce. You will still need to have good HTML, CSS and other Web Development skills as STS does not do it all for you.

 

If you are 'visual' oriented, then Dreamweaver or MS Expression Web 2 works great with STS.

 

Regarding STS being the cause of 'breaking' your other installed contributions, well, that is not the case. Just like any other contribution, you may have to do some more work to get them to work together nicely. STS was created using osCommerce coding standards and takes that into effect when templating the php script pages. If you add a new script page, such as a new scrolling box, you need to let STS know about it.

 

Take a look at this post: http://forums.oscommerce.com/index.php?s=&...t&p=1252270

 

The STS User Manual is a reference manual that explains how STS works. If you want more of a step by step, then PM or email me.

STS can change the look of anything, right? I can position boxes wherever I want, center the entire

website, change the bottons and icons, position them anywhere I want, etc.

Yes, yes and yes. This is what STS is great for. You do not need to know any PHP to do all of this.

 

Where to begin? I suggest using the 'full' template folder just to get used to STS. Then, create your own template folder (be sure to add the subfolders boxes, content, etc.) with your own design or some purchased web template. Use the sample templates, especially the 'blank_template' to show you what STS needs to be able to bring in osCommerce functionallity.

 

Email me or PM me for several links to sites that I created using STS. My clients wanted STS for several reasons. Here are a few:

  1. Easily make design changes on their own (without knowing PHP)
  2. Have different designs for the different seasons
  3. Easily add PHP scripts to any template page
  4. Ability to easily integrate osCommerce into their current site
  5. Ability to easily integrate a purchased osCommerce template into the most recent version of osCommerce
  6. etc.

Hope the above helped in some way,


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 installed STS v 4.5.8.

I have oscommerce-2.2rc2a

The default products and categories are still there.

 

I am an intermediate PHP/MySQL person, but new to OSCommerce.

I am just testing (not a live site) right now for learning purposes.

 

Here is a snapshot of what I have so far.

 

STS-Not-Working.gif

 

 

 

I see

$categorybox

$manufacturerbox

....

....

 

Please suggest the code changes or any admin processes I am missing.

 

 

 

 

I also have a couple of other questions:

 

1. I am guessing it is possible to have a separate HTML page designed slightly different for each product, right ?

Meaning will I be able to pick a particular product HTML file and make changes just to that product page without effecting other product pages?

eg, Product1.html is differently designed from Product2.html

 

 

2. Does the Ultimate SEO URL work with an STS template site ?

http://www.oscommerce.com/community/contributions,2823

 

3. Are the data in the product HTML pages dynamically connected to the database and will automatically update with the database ?

 

 

Thanks in advance,

vj

Share this post


Link to post
Share on other sites
I installed STS v 4.5.8.

I have oscommerce-2.2rc2a

The default products and categories are still there.

 

I am an intermediate PHP/MySQL person, but new to OSCommerce.

I am just testing (not a live site) right now for learning purposes.

 

Here is a snapshot of what I have so far.

 

STS-Not-Working.gif

 

 

 

I see

$categorybox

$manufacturerbox

....

....

 

Please suggest the code changes or any admin processes I am missing.

 

 

 

 

I also have a couple of other questions:

 

1. I am guessing it is possible to have a separate HTML page designed slightly different for each product, right ?

Meaning will I be able to pick a particular product HTML file and make changes just to that product page without effecting other product pages?

eg, Product1.html is differently designed from Product2.html

 

 

2. Does the Ultimate SEO URL work with an STS template site ?

http://www.oscommerce.com/community/contributions,2823

 

3. Are the data in the product HTML pages dynamically connected to the database and will automatically update with the database ?

 

 

Thanks in advance,

vj

 

VJ,

 

The reason you are seeing the tags instead of the content being pulled in by those tags is because one of the following:

  • You specified a stop end character such as # or $ to be added to each of your tags to optimize the code. This is an excellent option and is spelled out in detail in the STS User Manual. Only thing, if you do this, you have to define this at the top of your template and then add the stop character to your tag. *This is proabably not what is going on her but thought I should mention it for others in the future. I personally use stop characters simply for faster code optimization.
  • The second thing that could be going on is that you do not have the few lines of needed code at the top of your template telling STS that "this is a STS template so render the tags". Look in the template "test" folder that came with the contribution and you will see that I included a dummy template called "blank_sts_template". The only purpose for this template is to show the minimum code needed to make STS work in your custom template. Add this code to your template page.

Answer to question 1 above: Yes, STS allows you to make a template for any specific page in osCommerce. See the process detailed in the "doc" folder that came with the contribution. However, in your example above, I would suggest simply adding in your custom HTML directly into the product description field in the Admin.

 

#2: Yes, Ultimate SEO does work as I have installed this for a few clients and works perfectly. Keep in mind, STS will work out of the box for almost all other contributiions. See this thread: http://forums.oscommerce.com/index.php?sho...p;#entry1252270

 

#3: If you enter the product data in the admin (as in a stock osC), then yes, your data is in the database.

 

Hope this helped,


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,

 

Actually, I haven't made any changes.

I just followed the steps of STS installation.

 

The "includes/sts_templates/test/sts_template.html" file is the one that was provided. No change was made to it.

 

So I made "sts_blank_template.html" the default template file as you suggested.

 

 

 

Here are some more snapshots and details.

 

********************************

 

1. The store is in a folder.

eg. www.mydomain.com/myfolder/

 

 

 

2. Here is the code I have in "includes/sts_templates/test/sts_blank_template.html" file.

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

 

<html $htmlparams>

 

<head>

<meta http-equiv="Content-Language" content="en-us">

<!--$headcontent-->

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

</head>

 

 

<body>

 

 

$breadcrumbs

<br>

 

$myaccountlogoff

<br>

 

$categorybox

 

 

</body>

</html>

 

 

 

 

3. Here is what it looks like in the browser.

 

STS-Not-Working-4.gif

 

NOTE:

$breadcrumbs

shows correctly

 

$myaccountlogoff

shows correctly

 

$categorybox

shows "$categorybox"

This is my main concern.

 

 

 

4. Here are some STS module admin settings.

 

STS-Not-Working-1.gif

 

STS-Not-Working-2.gif

 

STS-Not-Working-3.gif

NOTE: Popup image and Product Info are NOT activated at the moment.

 

 

 

 

 

 

Again, my biggest issue is :

$categorybox and some others showing as text instead of showing whatever it's supposed to show on the browser.

Share this post


Link to post
Share on other sites
Again, my biggest issue is :

$categorybox and some others showing as text instead of showing whatever it's supposed to show on the browser.

OK. First off, I did not suggest that you make the blank template your default template. Change this back to sts_template.html. My point was that you may be missing the headcontent and htmlparams tags.

 

Here is a suggested template begining (the doc type can me modified to be whatever you need it to be as well as the path to the stylesheet):

 

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html $htmlparams>
<head>
<!--$headcontent-->
 <link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>

 

I think you are experiencing some installation issues. Double check to be sure you have installed (uploaded) all of the files needed from the contribution. You may be missing some files from includes/modules/sts_inc/ since that is where the $categorybox is defined.

 

Also, I suggest using the sample template folder "full" and the supplied templates until you are sure you have STS and osC installed and configured correctly. From the screenshot you displayed above, you are using a custom template which makes it difficult to troubleshoot your installation. You can always change create as many template folders and set them up in the admin afterwards.


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 bkellum,

 

Thanks for the prompt reply.

 

My #2 above...

"includes/sts_templates/test/sts_blank_template.html" file

shows the code I have used.

 

 

#3 Shows the screenshot of what the browser displays.

 

As you can see $breadcrumbs is displaying the correct information.

 

Whereas, $categorybox is NOT displaying correctly.

 

 

I have used "includes/sts_templates/full/sts_template.html" as a default template and it's still the same problem.

I have checked if I installed all the files and it seems I have.

 

I still can't nail the problem.

 

Thanks

vj

Share this post


Link to post
Share on other sites

Hi there,

 

I am still having trouble with STS, I uploaded it successfully eventually and it caused a php access error due to global permissions not being activated. I followed the instillation instructions in "register_globals_v1.5" which seems to work but when in the admin panel the STS link was broken. Has anyone else had this problem if so how do I move forward?

 

Any help would be gratefully received (unless it is give up and open a shoe shop)

 

Simon

Share this post


Link to post
Share on other sites
Hi there,

 

I am still having trouble with STS, I uploaded it successfully eventually and it caused a php access error due to global permissions not being activated. I followed the instillation instructions in "register_globals_v1.5" which seems to work but when in the admin panel the STS link was broken. Has anyone else had this problem if so how do I move forward?

 

Any help would be gratefully received (unless it is give up and open a shoe shop)

 

Simon

Simon, STS does not care what your Register Global settings are as is the same for the lastest version of osCommerce RC2a. Be sure to completely install STS (uploading STS files and Files for RC2 from the STS contribution 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
Simon, STS does not care what your Register Global settings are as is the same for the lastest version of osCommerce RC2a. Be sure to completely install STS (uploading STS files and Files for RC2 from the STS contribution download).

 

Thank you I will will have another go and see what happens,

Share this post


Link to post
Share on other sites

Hi!

I have searched the forum but could not find an answer.

How do you create a new placeholder for manufacturer so you can insert it on the product_info template. I guess you have to add some code to product_info.php

Share this post


Link to post
Share on other sites

Hi there,

 

Could someone help me with the following:

 

I have installed the default template - it works great! However, I want the index.php to look different than the other pages. I installed the index template and it works great, too! My issue is when I click on a manufacturer from the drop down menu from the index.php page it does not use the default template, it uses the index template.

 

How do I get everything to use the default template except index.php?

 

You can see what I mean here: http://www.canadiancartridge.com/shop/catalog/

To view the default template you can click on Contact Us (site is still a work in progress).

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

×