Jump to content
DiamondSea

[contribution] Simple Template System (sts)

Recommended Posts

Ok, my apoligies as I'm sure this has been answered elsewhere...I've been searching & searching, but cannot get the specific answer to this...

How do i create different background colors on just the $content box, but also I want to change the backgrounds so each catagory has a different color

I know it's a css tag, but if I change the :

 

BODY {

background: #ffffff;

color: #000000;

margin: 0px;

}

 

that changes it on all the pages. Should I create a seperate stylesheet.css for each catagory?..ie: catagory01.css, catagory02.css, etc?, and what would be the code for just the $content box?, and if I made seperate catagory.css files, do I need to remove the call to the main stylesheet.css file?

 

Please Help..I need to clean up my store!

thanks so much :thumbsup::rolleyes:

 

btw, I've tried to change the <body bgcolor=""> on each indiv product_info.php.html page to no avail, so I assume it's a stylesheet.css issue

Share this post


Link to post
Share on other sites
btw, I've tried to change the <body bgcolor=""> on each indiv product_info.php.html page to no avail, so I assume it's a stylesheet.css issue

 

I'm thinking I might be able to use the $extracss tag to help my situation...could anyone help a "noob" out with this...step by step instructions would be greatly appreciated

I want to use a seperate stylesheet for each individual catagory page. Thanks so much :)

Share this post


Link to post
Share on other sites

I installed latest osCommerce shop (rc2.2a) and latest STS, but my main page isn't changing. I tried to change sts_template.html but nothing changes.

I installed fresh installation of both of them. Also installed addon from admin panel.

You can find my shop in here

Edited by SoWhat

Share this post


Link to post
Share on other sites
btw, I've tried to change the <body bgcolor=""> on each indiv product_info.php.html page to no avail, so I assume it's a stylesheet.css issue
This would depend upon how you designed your template. A simple table background color would be suffice.

 

Regarding your category backgrounds...One way to do this without creating a PHP if statement, would be as simple as creating a different category template for each category that you want a specific background.

For example:

Home page: index.php_0.html

Category 1: index.php_1.html

Category 2: index.php_2.html

Category 1, sub-category23: index.php_1_23.html

 

All other categories that do not have specific templates created for them would use the index.php.html (if there is such a template) or use the default template such as sts_template.html.

 

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
I installed latest osCommerce shop (rc2.2a) and latest STS, but my main page isn't changing. I tried to change sts_template.html but nothing changes.

I installed fresh installation of both of them. Also installed addon from admin panel.

You can find my shop in here

 

Looks like you have some settings issues with your osC shop. Did you have osC working before you installed STS? I think you have "Use Search Engine Friendly URLS" set to TRUE in your ADMIN CONFIGURATION. This should always be set to FALSE.

 

To install STS, you need to copy the files from the STS folder as well as the RC2 folder and be sure to keep the folder structure intact.


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
This would depend upon how you designed your template. A simple table background color would be suffice.

 

Regarding your category backgrounds...One way to do this without creating a PHP if statement, would be as simple as creating a different category template for each category that you want a specific background.

For example:

Home page: index.php_0.html

Category 1: index.php_1.html

Category 2: index.php_2.html

Category 1, sub-category23: index.php_1_23.html

 

All other categories that do not have specific templates created for them would use the index.php.html (if there is such a template) or use the default template such as sts_template.html.

 

Hope this helped,

 

Bill,

I made seperate pages for a certain set of products within a catagory; ie: product_info.php_c28_32.html, product_info.php_c28_33.html, product_info.php_c28_34.html, etc... and within each I need to specify a different background color..I have tried changing the bgcolor within the html on each page, and the table colors, but it keeps calling the color from stylesheet.css in the /catalog. I tried to make specific stylesheets that would be called from the .html pages, but couldn't get it to work. I tried $extracss tag in the header, but failed with that too (getting frustrated)..I would expect I'm doing something really dumb to not get this to work..it seems easy enough...Thanks

Share this post


Link to post
Share on other sites
Bill,

I made seperate pages for a certain set of products within a catagory; ie: product_info.php_c28_32.html, product_info.php_c28_33.html, product_info.php_c28_34.html, etc... and within each I need to specify a different background color..I have tried changing the bgcolor within the html on each page, and the table colors, but it keeps calling the color from stylesheet.css in the /catalog. I tried to make specific stylesheets that would be called from the .html pages, but couldn't get it to work. I tried $extracss tag in the header, but failed with that too (getting frustrated)..I would expect I'm doing something really dumb to not get this to work..it seems easy enough...Thanks

Actually, changing the whole table bgcolor seems to do the trick...scratch that above comment..thanks Bill :)

Share this post


Link to post
Share on other sites
Looks like you have some settings issues with your osC shop. Did you have osC working before you installed STS? I think you have "Use Search Engine Friendly URLS" set to TRUE in your ADMIN CONFIGURATION. This should always be set to FALSE.

 

To install STS, you need to copy the files from the STS folder as well as the RC2 folder and be sure to keep the folder structure intact.

 

 

I found the problem!

The ZIP archive was not correctly unzipped and some files were missing.

Share this post


Link to post
Share on other sites

I don't get one thing - by default in my index page I see default osCommerce index page, but only after going to debug link (index.php?sts_debug=debug) I see the STS template page with debug output. How to make STS appear as the index page?

Edited by SoWhat

Share this post


Link to post
Share on other sites
I don't get one thing - by default in my index page I see default osCommerce index page, but only after going to debug link (index.php?sts_debug=debug) I see the STS template page with debug output. How to make STS appear as the index page?

Did you enable STS in the STS Default Module in your admin? What version of STS are you using?


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 only Installed STS, not enabled it.

I use both latest versions.

 

 

Now I enabled it and everything works! Thanks!!! :D You should write it in the manual with big letters "Not only Install but Enable STS too" :)

Edited by SoWhat

Share this post


Link to post
Share on other sites
I only Installed STS, not enabled it.

I use both latest versions.

 

 

Now I enabled it and everything works! Thanks!!! :D You should write it in the manual with big letters "Not only Install but Enable STS too" :)

It's there my friend. Glad you got it working. Let the fun times begin. :thumbsup:


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

being new to php but having tinkered with html before, this looks like it could make my life so much easier. Easy install and instructions are accurate so no problems so far.

 

One thing I did find is that my oscommerce was installed to the root, not in the catalog folder, reseller setup the website, so installing this package highlighted this fact, now my server usage has halved :D

Share this post


Link to post
Share on other sites
being new to php but having tinkered with html before, this looks like it could make my life so much easier. Easy install and instructions are accurate so no problems so far.

 

One thing I did find is that my oscommerce was installed to the root, not in the catalog folder, reseller setup the website, so installing this package highlighted this fact, now my server usage has halved :D

Yes, the term "catalog" is basically where osCommerce was installed, whether that be in the root or any other folder such as "shop", "my store", "catalog", etc. :thumbsup:

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

How to integrate Ultrapics into STS 4 - product_info.php.html template?

 

Anyone know how I can integrate the Ultrapics 2.04 Contribution into a STS 4.5.8 product_info.php.html template? Ultrapics seems to work through $content but I need to add the Ultrapics into my custom product_info.php.html template without using $content variable. The version of osCommerce is 2.2rc2a

 

 

 

Any help would be greatly appreciated.

 

>< y l e n e

Edited by xylene

Share this post


Link to post
Share on other sites
How to integrate Ultrapics into STS 4 - product_info.php.html template?

 

Anyone know how I can integrate the Ultrapics 2.04 Contribution into a STS 4.5.8 product_info.php.html template? Ultrapics seems to work through $content but I need to add the Ultrapics into my custom product_info.php.html template without using $content variable. The version of osCommerce is 2.2rc2a

 

 

 

Any help would be greatly appreciated.

 

>< y l e n e

This has already been posted here so instead of retyping I'll post the link:

 

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


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'am searching for a eay to change templates easly, but at the same time I wan't to easly add contributions to osCommerce.

 

With STS I will be able to add all contributions to osCommerce or I will need special steps to install osC contributions?

 

Wait for reply. (Sorry for my english)

 

 

Best Regards, Andre.

Share this post


Link to post
Share on other sites
Hi,

 

I'am searching for a eay to change templates easly, but at the same time I wan't to easly add contributions to osCommerce.

 

With STS I will be able to add all contributions to osCommerce or I will need special steps to install osC contributions?

 

Wait for reply. (Sorry for my english)

 

 

Best Regards, Andre.

STS will allow you to easily change templates as well as install other contributions. I have over 30 of the most popular contributions installed on my store.

 

Keep in mind that most contributions need to change the core code of osC in order to add the specific feature they were programmed for. STS modifies very little of the core code and adds a lot of its own new files so integration with other contributions would not be in issue. The only challenge at times is with contributions that make modifications to the product_info.php file. If this is the case, you should make those same modifications in the sts_inc/product_info.php file as well. If you decide not to use the STS feature of product "content" templates, then you would not need to add those modifications since STS would use the stock product_info.php file anyway.


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

How to modify format of $headertext ?

 

I only want language sensitive "Currencies", "Manufacturers", "Languages" as header text.

 

This is my infobox_manufacturers.php.html

 

<tbody><tr><td align="center">$headertext:  $content</td></tr>

 

Content box is fine, but the "headertext" is always the same format like my default template without STS activated with a box around the text and bg-colour.

 

What can i do to format "language senstive headertext" ?


OSC Webmakers Edition modiefied with many other contribs and enhancements.

+ STS 4.5.7 for 2.2MS2 and RC1

Share this post


Link to post
Share on other sites
(bkellum @ Mar 3 2008, 01:10 AM) *

Ryan, my comments sounded a little rough but they were not meant to be. blush.gif

I was just pointing out that image links are usually the culprit when it comes to SSL problems, not any code changes that are implemented by installing STS.

 

I do think that while designing your template, it is probably easier to use absolute links so that you can preview your template. However, these should always be changed over to relative links before uploading to your store. thumbsup.gif

 

When someone mentions that they did not have any issues until STS then it implies that STS has some errant code and is to blame. STS, as a osCommerce add-on, has no control of how a user goes about using/abusing the contribution. STS assumes that it is being installed upon solid osCommerce core code and not upon any other add-ons that were not created with other contributions in mind. STS works great with the "properly coded" add-ons available.

 

With that said, I suggest that anyone who has SSL issues, to first look at the code of thier shop. It is most likely due to image or external links which could so happen to be in the STS template that they created.

 

STS out of the box does not have any SSL issues.

 

Hope that helps anyone in the future who may be dealing with SSL issues. :-

 

 

Hi Bill

I'm having a hard time believing that "STS out of the box does not have any SSL issues." It has path issues in general that arre beyond the scope of many. I did find a workaround for the previous problem I had with SSL and images but now have run into a new problem that so far I have not been able to crack. I have made an exact duplicate of the original osc sts store for a wholesale store, with the only difference of course being the cookie and catalog directory paths in configure.php. I am having

major path problems again with this store. Images are not getting sized correctly because for some reason getimagesize($src) fails, so no width or height is returned for images that use the osc SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT parameters. I can print the $src out okay before the getimagesize conditional but then the "if ($image_size = @getimagesize($src))" condition fails because of some screwup with the $src and so that block is bypassed.

 

Also, all SSL links in this copy return a 500 internal server error when clicked on. I'm stumped. I am using an ip in the config during development but this was not a problem in the original osc sts store. Also the SSL server is shared so the links are like https://secure2-hosting.net/domain/wholesalecatalog/...but again, that is not a problem in the original catalog. Got any ideas as to why this duplication of a working sts store is failing?

 

This is really frustrating but I realize there is only so much you can do. Being a programmer I wouldn't have gone this route but I took this store over from someone else.

thanks, bopp

Share this post


Link to post
Share on other sites

forum is not letting me edit...all I've found so far is that it appears to be a http redirect problem:

HTTP/1.1 401 Authorization Required is what getimagesize() returns...

 

now it lets me edit...lol

anyway...there was a difference...the wholesalecatalog directory had an htaccess password set on it...I turned that off and now my images in the non-template content are now getting the correct heights and widths...that should not make a difference but the layers of code probably cause this...

 

but I still get a 500 internal server error when clicking on any of the ssl links on the page...they have the correct urls so I'm still stumped...

bopp

Edited by bopper

Share this post


Link to post
Share on other sites
How to modify format of $headertext ?

 

I only want language sensitive "Currencies", "Manufacturers", "Languages" as header text.

 

This is my infobox_manufacturers.php.html

 

 

 

Content box is fine, but the "headertext" is always the same format like my default template without STS activated with a box around the text and bg-colour.

 

What can i do to format "language senstive headertext" ?

You need to make a separate header template. Tip: If you do not want a header at all for a specific infobox, you could create a blank header template. :thumbsup:

 

Header templates need to be named "infobox_scriptname_header.php.html". So, in your case, the template would be called infobox_manufacturers_header.php.html for the header template and infobox_manufacturers.php.html for the content template.

 

See chapter 6 of the STS User Manual for more details on infobox templates.

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

Hi all,

 

I am new to the oscommerce and sts template system. I created a simple 1 file template to mask over the default installation template. Everything seems to be fine and fits nicely in the template except the shopping cart page.

 

Whenever I add an item to shopping cart, it takes me to the page where all items added to cart are listed. This page is without the template or any graphic at all.

 

How do I apply my template to this page??

 

Thanks

-william

 

ps. website is currently on my localhost so I can not post link =(

Share this post


Link to post
Share on other sites

Hello,

 

I just installed STS on a new OSC site because I'm comfortable with HTML, but don't really know anything about PHP.

 

I wanted to remove the icons from the header (references to header_account.gif, header_cart.gif, header_checkout.gif), but after editing out those lines from sts_template.html nothing happens?

 

I'm obviously missing something here, so could somebody point me in the right direction of what else I need to do?

 

Thanks.

Share this post


Link to post
Share on other sites
forum is not letting me edit...all I've found so far is that it appears to be a http redirect problem:

HTTP/1.1 401 Authorization Required is what getimagesize() returns...

 

now it lets me edit...lol

anyway...there was a difference...the wholesalecatalog directory had an htaccess password set on it...I turned that off and now my images in the non-template content are now getting the correct heights and widths...that should not make a difference but the layers of code probably cause this...

 

but I still get a 500 internal server error when clicking on any of the ssl links on the page...they have the correct urls so I'm still stumped...

bopp

 

 

finally figured this out..somehow the .htaccess file got this added to it in the wholesalecatalog directory:

 

<IfModule mod_setenvif.c>

<IfDefine SSL>

SetEnvIf User-Agent ".*MSIE.*" \

nokeepalive ssl-unclean-shutdown \

downgrade-1.0 force-response-1.0

</IfDefine>

</IfModule>

 

don't know where it came from (sts?) but I commented it out and now the SSL links work okay...

 

so just posting this for anyone who has SSL problems using sts...something to check out...

bopp out

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

×