Jump to content
DiamondSea

[contribution] Simple Template System (sts)

Recommended Posts

For some reason I can't get the background of the infobox headings to change, the section in between the two corner images. It just seems to stay the original grey blue.

 

The heading is

<table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111" bgcolor="#006699">
 <tr>
<td width="12" bgcolor="#006699">
<img border="0" src="images/infobox/corner_left.gif" width="11" height="14"></td>
<td width="620" bgcolor="#006699" class="infoBoxHeading">Browse by categories </td>
<td width="83" style="background-repeat: norepeat" bgcolor="#006699">$right_arrow</td>
<td width="12"  bgcolor="#006699" style="background-repeat: norepeat">
<img border="0" src="images/infobox/corner_right.gif" width="11" height="14"></td>
 </tr>

 

and the style is

 

TD.infoBoxHeading {
 font-family: Verdana, Arial, sans-serif;
 font-size: 10px;
 font-weight: bold;
 background: #006699;
 color: #ffffff;
}

 

I'm sure I must be missing something basic but I just don't see what else to change, if the table background is changed in the html, and the class has changed on the stylesheet, and I have reuploaded all the files, where is the template still getting the old colour from?

Every other border round the box's changes, it is just the section with the writing in.

 

Here is some more tips:

  • Use your stylesheet to set the background to transparent to better match your customized template page
     
    Look for the following code in your stylesheet.css file:
    /*This is the INFOBOX Background Style, one shade darker than the Infobox Header color*/ 
    .infoBox { 
    background: #0000FF; 
    } 
    /*This is the INFOBOX Contents Style, one shade lighter than the Infobox Header color*/ 
    .infoBoxContents { 
    background: #FFFFFF; 
    font-family: Verdana, Arial, sans-serif; 
    font-size: 10px; 
    }
    
    /*This is the INFOBOX Notice Style, a pale salmon color*/ 
    .infoBoxNotice { 
    background: #FF8E90; 
    }
    
    /*This is the INFOBOX Notice Contents Style, a very pale salmon color*/ 
    .infoBoxNoticeContents { 
    background: #FFFFFF; 
    font-family: Verdana, Arial, sans-serif; 
    font-size: 10px; 
    }
    
    /*This is the INFOBOX Heading Style, SAME AS HEADER AND FOOTER GRAY BARS*/ 
    TD.infoBoxHeading { 
    font-family: Verdana, Arial, sans-serif; 
    font-size: 10px; 
    font-weight: bold; 
    background: #FFFFFF; 
    color: #ABDA4E; 
    } 
    TD.infoBox, SPAN.infoBox { 
    font-family: Verdana, Arial, sans-serif; 
    font-size: 10px; 
    }


  • Just by changing the above, you can make the borders, backgrounds and more completely dependent upon your design. In other words, it is now a lot easier to integrate STS into a store bought HTML template. You can also take advantage of newer CSS dynamic boxes. Have fun, be creative.
  • The default tables show a gray background around each infobox. This can easily be removed by editing the table and cell within the infobox template. You may want to replace the corner images with transparent gifs. These images are located in catalog/images/infobox/.


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 just installed Simple Template System (STS) which is great but i am unsure where i need to edit the different variables e.g. what generates $content or $cartbox etc.

 

I need to modify the content of these.

 

Cheers,

Adam

Share this post


Link to post
Share on other sites

Hello all,

 

Has anyone used Yahoo or MSN conversion tracking with this module? If so, how did you get it to work with STS?

 

Thanks

Share this post


Link to post
Share on other sites

Simple Question for the Community (hopefully!)

 

I am running OSCommerce v2.2 RC2, and I'm successfully running STSv4.

 

I want to install a Gift Certificate module -- and it seems like the most widely used is the CCGV module located here:

 

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

 

I saw that there are manual install instructions for that Contribution. Before I dive in and spend a couple hours manually installing this ... can someone tell me, Do STSv4 and CCGV work together?

 

Thanks!

Share this post


Link to post
Share on other sites

Great contribution but I have an issue. My products images have underlines under them and I don't know how to remove this. I went into my css and that didn't remove it. I looked in the html file that it produces and it looks like the image is stuck between the <a href> tag for the text link. You can see my site at baddogfrida.com/shop. It doesn't happen on the home page just when you get further into the store. It's really annoying. Any suggestions?

Share this post


Link to post
Share on other sites
Great contribution but I have an issue. My products images have underlines under them and I don't know how to remove this. I went into my css and that didn't remove it. I looked in the html file that it produces and it looks like the image is stuck between the <a href> tag for the text link. You can see my site at baddogfrida.com/shop. It doesn't happen on the home page just when you get further into the store. It's really annoying. Any suggestions?

 

Lindsay, this is a CSS issue that has to do with the border properties (border=0).


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
Simple Question for the Community (hopefully!)

 

I am running OSCommerce v2.2 RC2, and I'm successfully running STSv4.

 

I want to install a Gift Certificate module -- and it seems like the most widely used is the CCGV module located here:

 

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

 

I saw that there are manual install instructions for that Contribution. Before I dive in and spend a couple hours manually installing this ... can someone tell me, Do STSv4 and CCGV work together?

 

Thanks!

 

You should not have any issues with this contribution.


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

 

Has anyone used Yahoo or MSN conversion tracking with this module? If so, how did you get it to work with STS?

 

Thanks

This will apply to Jason as well:

 

The only things to keep in mind regarding if other contributions will work with STS is the following:

 

  1. If the contribution makes edits to the product_info.php file AND you are using the content template feature for product_info templates, you will need to duplicate these edits in the sts_inc/product_info.php file. If you are not using the content template feature in STS, you do not need to do anything else as STS will automatically pickup the custom product_info edits with the $content tag in your template page.
  2. If the contribution makes a new infobox, you will need to create a new infobox tag in order for STS to "find" the new box and allow you to template it. Instructions for doing so are listed in the sts_user_code.php file or in the following link: http://forums.oscommerce.com/index.php?sho...p;#entry1141288
  3. If the contribution creates a page that should not be templated by STS, or you do not want it to be templated, simply "exclude" that page from being templated. See the following link for more info: http://forums.oscommerce.com/index.php?sho...p;#entry1222434

Well, as long as the contribution is created according to osC coding standards, then the above should about cover it.

 

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,

 

I have just installed Simple Template System (STS) which is great but i am unsure where i need to edit the different variables e.g. what generates $content or $cartbox etc.

 

I need to modify the content of these.

 

Cheers,

Adam

 

Adam,

 

When creating new variables, add them in the includes/modules/sts_inc/sts_user_code.php file.

 

All of the other variables (except the $content variable) are defined in the various PHP files in the includes/modules/sts_inc folder.

 

As for the $content variable:

This is what is displayed in the center of the page, between the left and the right column.

When the script in catalog is running, like catalog/index.php for example, STS captures all the code that comes between the columns and places it in $content. If you want to modify something inside $content, you have to modify the script in catalog, in our example you have to modify catalog/index.php (or any module called from within this file).

One exception is the product_info.php page that can receive its own template for the content part of the screen, which means that you can place product price, image, description and other things where you want in the content area, by designing what are called "content templates".

In principle, it is possible to create content templates for all the pages of the store. See Post 4325:

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

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

It's a little off topic, but I like how they do it in Invision Power Board - it's Bulletin Board system. They store all the HTML templets for every component in the DB, then crate a disk cache that is actually used during the access. Changes to HTML can be done via built in admin editor and you can always roll back in a matter of seconds. It's quite different design idea. In most cases you don't even have to edit your php files, unless there are some changes in logic. It's unlike osC, where every piece of HTML is hard coded into PHP files.

Edited by Syeager

Share this post


Link to post
Share on other sites

Also templates already contain tags that are something similar to $template_name, so you have a complete control of positioning elements on your site. I wish they will do something like this with osC, but I understand it will be a complete redesign and I doubt it will ever happen. :(

Edited by Syeager

Share this post


Link to post
Share on other sites
Also templates already contain tags that are something similar to $template_name, so you have a complete control of positioning elements on your site. I wish they will do something like this with osC, but I understand it will be a complete redesign and I doubt it will ever happen. :(

 

Steve, this is exactly how STS does it. STS has a variable for all of the main osC functions suchs as the infoboxes, content, individual variables for the product info page, etc. It even allows you to create your own variables for added functions.

 

STS is the only TRUE template system for osCommerce. You can create as many specific template pages for specific pages, infoboxes, etc in your shop or you could simply create a single template page to be used for everything, the choice is up to you.


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 is the only TRUE template system for osCommerce. You can create as many specific template pages for specific pages, infoboxes, etc in your shop or you could simply create a single template page to be used for everything, the choice is up to you.

Bill, I understand it completely. However in IPB templates are stored in the database and can be edited using built in editor in the control panel without modifying any file via FTP. And changes can be reverted to prior version with a click of the mouse. It's just a different design concept. This is just something to consider for future versions of osC. Edited by Syeager

Share this post


Link to post
Share on other sites

have created a html template using dreamweaver but its like a complete html site with spry and background images.......how do i integrate this into sts......

 

plz help i'm in desperate need of this....

 

u can check out the template at http://www.celith3.com/test/celith/sts_template.html

 

however the site looks like this http://www.celith3.com and tht is because sts can't read and execute the files included with the html site....... any help in this matter wud be greatly appreciated and if it works out fine then and i'm willing to give free 5gb of webspace in return........

 

thx

Share this post


Link to post
Share on other sites
Can anyone teach me how to download STS latest version?

I went into http://www.oscommerce.com/community/contributions,1524 and dont know where to download..

 

Thanks!!

When you scroll down and see a list of files, on the right side there will be a little pix of the computer with a little arrow pointing down to it. It means download. Honestly, it's looks nice, but not 100% obvious to all people. Just a single word DOWNLOAD would be much better. Or perhaps a bigger bigger picture :) Edited by Syeager

Share this post


Link to post
Share on other sites

Hi,

I have a big problem. I've just installed STS, but when I go to Modules and click install, nothing happens. It doesn't give me any errors or something but also it can't be installed :(

Share this post


Link to post
Share on other sites
Hi,

I have a big problem. I've just installed STS, but when I go to Modules and click install, nothing happens. It doesn't give me any errors or something but also it can't be installed :(

 

You have an older version of osCommerce.

Take a look at the official fix for this bug in your version of osC (Post #3):

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

 

Hope that helped you out,


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
have created a html template using dreamweaver but its like a complete html site with spry and background images.......how do i integrate this into sts......

 

plz help i'm in desperate need of this....

 

u can check out the template at http://www.celith3.com/test/celith/sts_template.html

 

however the site looks like this http://www.celith3.com and tht is because sts can't read and execute the files included with the html site....... any help in this matter wud be greatly appreciated and if it works out fine then and i'm willing to give free 5gb of webspace in return........

 

thx

There is some code that you need to include in your template to make it function correctly. Look at the blank template in the test folder as an example. Also, the templates need to reside in the includes/sts_templates/*your_template_folder*/ folder in order for STS to pick them up correctly. Also, the name of the template is critical *see the docs included in the STS contribution for more details.

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'm completely new to this and have been having no end of problems with templates. I installed STS because it looked like the solution for me to customize my store...

 

The problem is now it says I need to enable register_globals...

 

Is that right or am I missing something?

 

I'd greatly appreciate some help.

 

Thanks alot

Share this post


Link to post
Share on other sites
Hi,

 

I'm completely new to this and have been having no end of problems with templates. I installed STS because it looked like the solution for me to customize my store...

 

The problem is now it says I need to enable register_globals...

 

Is that right or am I missing something?

 

I'd greatly appreciate some help.

 

Thanks alot

STSv4.5.8 does not care what settings you have for Register Globals (on or off is fine for STSv4.5.8). If you have other contributions installed, that could be the problem or you may have installed STS incorrectly.


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 folks

 

Can anyone recommend a contribution that will work with STS that will give me drop down navigation menu?

 

I have looked a dynamenu, but that seems to be primarily just for categories?

 

Thanks

Sol

Share this post


Link to post
Share on other sites
Hi folks

 

Can anyone recommend a contribution that will work with STS that will give me drop down navigation menu?

 

I have looked a dynamenu, but that seems to be primarily just for categories?

 

Thanks

Sol

The reason that they are primarily just for categories is because categories are generated from dynamic PHP code and thus difficult for many to create on their own.

 

What other type of drop down menu are you looking for? The sky is the limit when using STS. Search the web and then plug them into your template(s).

 

STS Link to a category:

 

<a href="<?php echo tep_href_link('index.php', 'cPath=21&', 'NONSSL'); ?>">Category Name Here</a>

 

STS Link to a product:

 

<a href="<?php echo tep_href_link('product_info.php', 'products_id=53&', 'NONSSL'); ?>">Product Name Here</a>

 

 

<a href="<?php echo tep_href_link('conditions.php', 'NONSSL'); ?>">Conditions</a>

 

Use the above to create your menu links.


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.

I am using STSv4.5.8 (on a clean RC2).

The installation is fine.

But:

I have a separate directory from which the template is loaded:

\includes\sts_templates\test\t1\

 

in that directory i have another one with the images of the template:

\includes\sts_templates\test\t1\images\

 

Everything is fine in the admin panel, and the template is loaded, but the images are not.

 

Trying to figure out why ...

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

×