Jump to content
DiamondSea

[contribution] Simple Template System (sts)

Recommended Posts

OK, this problem is fixed. I had a conflicting file from a previous contribution that messed things up. My now site works like it used to before I installed this Contribution (ultrapics) but It doesn't seem to to be recognizing ultrapics in the product info pages. Fortunately the admin area is working correctly and I can upload more pics for store. but on the user-end, they don't show up. Can this be a conflict between the 2 product_info.php files, one in the root of the store and one in the includes/modules/sts_inc/ folder?

 

It can ONLY if your are using the CONTENT template feature.

 

Do the following to make sure the Content Template feature is turned off (you can turn it back on when you know more about how to modifiy the sts_inc/product_info.php file):

 

  1. Go to your store's Admin
  2. Go to Modules
  3. Click on STS
  4. Click on the Product Info module
  5. Set the setting: Use template for product_info to "false"

Now, if you installed both the admin and catalog portions of UltraPics correctly, the $content tag will automatically pick up the extra images.


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

Could somebody enlighten me on why my font sizes are different depending on the browser I use?

 

The font sizes of tags such as $content seems to have an effect when I use IE but not on Firefox. What is the best way to control the font sizes?

Share this post


Link to post
Share on other sites
Could somebody enlighten me on why my font sizes are different depending on the browser I use?

 

The font sizes of tags such as $content seems to have an effect when I use IE but not on Firefox. What is the best way to control the font sizes?

Tomo,

 

This is controlled by the CSS in your stylesheet.css file. You should copy the stylesheet.css file into your template folder and then link to it from your template using $templatedir/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

Greetings. I have STS installed and, as far as I can tell, running correctly. Now, though, I have many questions. As a warning in advance, I have little to no HTML/CSS experience however, I do know how to use Google and this forums search function :)

 

I'll start with what I hope is an easy one: How do I size and center my shop? Prior to STS I used this contrib. STS seems to overide those changes though. I have searched this thread (BTW, one thread for this contrib makes it fairly hard to find information) and have not had results with any of the solutions presented.

 

If you need more information please, let me know.

Share this post


Link to post
Share on other sites

Thanks Bill!

 

What is the difference between entering <link rel="stylesheet" type="text/css" href="stylesheet.css"> and $templatedir/stylesheet.css ?

 

I seemed to have made it work using the former as I do not know how to use the latter.

 

Thanks.

 

Tomo

Edited by tharada

Share this post


Link to post
Share on other sites

Hi there,

 

I've searched this thread and found similar issues but no solutions.

 

I'm getting the following errors:

 

Warning: include(includes/modules/sts_inc/sts_user_code.php, index.php_0.html) [function.include]: failed to open stream: No such file or directory in /home/canada/public_html/includes/modules/sts_inc/sts_display_output.php on line 21

 

Warning: include(includes/modules/sts_inc/sts_user_code.php, index.php_0.html) [function.include]: failed to open stream: No such file or directory in /home/canada/public_html/includes/modules/sts_inc/sts_display_output.php on line 21

 

Warning: include() [function.include]: Failed opening 'includes/modules/sts_inc/sts_user_code.php, index.php_0.html' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/canada/public_html/includes/modules/sts_inc/sts_display_output.php on line 21

 

I'm using two templates, one for the index and another for the rest of the site.

 

Line 21 is: include(DIR_WS_MODULES.'sts_inc/'.$sts_mod);

 

Any suggestions?

Edited by erikajune

Share this post


Link to post
Share on other sites

I have a problem with my pop-up images..

I have tried to restet the templates to the original that were downloaded, but it does't help (even though i has been working before, so i am sure that it is a minor adjustment.. )

When i clik on an image to get the pop-up, of a bigger image, a small pop-up window opens with the default template of the whole site..

What have i done wrong and how can i fix it?

I am pretty sure that i simply have to define something simple, somewhere, but i just can't find out what and where.. :-S

Share this post


Link to post
Share on other sites
Greetings. I have STS installed and, as far as I can tell, running correctly. Now, though, I have many questions. As a warning in advance, I have little to no HTML/CSS experience however, I do know how to use Google and this forums search function :)

 

I'll start with what I hope is an easy one: How do I size and center my shop? Prior to STS I used this contrib. STS seems to overide those changes though. I have searched this thread (BTW, one thread for this contrib makes it fairly hard to find information) and have not had results with any of the solutions presented.

 

If you need more information please, let me know.

 

Use Google to search these forums. The forum search does not work very well.

 

Search the STSv4 thread: site:forums.osCommerce.com [Contribution] sts v4

 

Its best to have one thread for STS issues so that all STS users can benefit from the solutions.

 

If you don't know HTML, then you might be best served in using Dreamweaver or MS Expression Web 2.0 to create the HTML for 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
Thanks Bill!

 

What is the difference between entering <link rel="stylesheet" type="text/css" href="stylesheet.css"> and $templatedir/stylesheet.css ?

 

I seemed to have made it work using the former as I do not know how to use the latter.

 

Thanks.

 

Tomo

This links to the stylesheet.css file in the root folder of your shop:

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

This links to the stylesheet.css file in the current template folder:

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

 

Both links above are "relative links", meaning they will not mess up your site even if you change template folders (such as for seasons, holidays, etc.) as well as being SSL compliant.


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

 

I've searched this thread and found similar issues but no solutions.

Yeah, too bad people keep making the same mistakes. :blink:

I'm getting the following errors:

 

Warning: include(includes/modules/sts_inc/sts_user_code.php, index.php_0.html) [function.include]: failed to open stream: No such file or directory in /home/canada/public_html/includes/modules/sts_inc/sts_display_output.php on line 21

 

Warning: include(includes/modules/sts_inc/sts_user_code.php, index.php_0.html) [function.include]: failed to open stream: No such file or directory in /home/canada/public_html/includes/modules/sts_inc/sts_display_output.php on line 21

 

Warning: include() [function.include]: Failed opening 'includes/modules/sts_inc/sts_user_code.php, index.php_0.html' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/canada/public_html/includes/modules/sts_inc/sts_display_output.php on line 21

 

I'm using two templates, one for the index and another for the rest of the site.

 

Line 21 is: include(DIR_WS_MODULES.'sts_inc/'.$sts_mod);

 

Any suggestions?

Look into what the error is saying.... It can not find a file in the sts_inc folder that you are asking for it to include. This is caused by adding a template name in the STS Module field "Files to include". You should not do that. Remove the template name from that field and the error will go away.


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 have a problem with my pop-up images..

I have tried to restet the templates to the original that were downloaded, but it does't help (even though i has been working before, so i am sure that it is a minor adjustment.. )

When i clik on an image to get the pop-up, of a bigger image, a small pop-up window opens with the default template of the whole site..

What have i done wrong and how can i fix it?

I am pretty sure that i simply have to define something simple, somewhere, but i just can't find out what and where.. :-S

This is caused by a bad configuration setting in your shop, particularily when you set "Use Search-Engine Safe URLs (still in development)" to TRUE. You can find the setting in the MY STORE page of Configuring your catalog.

Set this to false and the popup image will work as it should.

 

Note: You should never turn on the SEO URLS as it has never been fully developed...that's what "still in development" means. If you have to have this feature, try installing one of the SEO contributions that are available.

 

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 Bill

 

How would STS integrate with the christmas theme from say, this contrib?

http://addons.oscommerce.com/info/5581

 

Just thinking ahead :-)

 

Thanks

Sol

There has been alot of osC templates popping up recently. I am going to begin converting each one over to STSv4.5.8. Give me a few days since I will be out of the office for a while.

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 is caused by a bad configuration setting in your shop, particularily when you set "Use Search-Engine Safe URLs (still in development)" to TRUE. You can find the setting in the MY STORE page of Configuring your catalog.

Set this to false and the popup image will work as it should.

 

Note: You should never turn on the SEO URLS as it has never been fully developed...that's what "still in development" means. If you have to have this feature, try installing one of the SEO contributions that are available.

 

Hope this helped,

 

Thanks alot!

i tried it and worked..

Actually i started the shop all over again, and installed the megapowerpack...

Hope google will be friends with me now... ;-)

I am not sure if you can help me out with the MegaPowerPack setup, but i am having one single problem..

In admin, when i edit something that needs to be saved to a table (such as creating a product, editing tax rates and so on..) it will go blank when i presss update..

The products that i have tried to create, and the changed taxrates have been saved, but it just does not seem right the way it goes blank (i have to use my "back" button on my browser to bet back to my admin page.. )...

 

By the way!

Thanks for a great contrib.!

really impressive work..

My shop is so much easier to edit and really looks the way i wanted it to!!

Share this post


Link to post
Share on other sites
Thanks alot!

i tried it and worked..

Actually i started the shop all over again, and installed the megapowerpack...

Hope google will be friends with me now... ;-)

I am not sure if you can help me out with the MegaPowerPack setup, but i am having one single problem..

In admin, when i edit something that needs to be saved to a table (such as creating a product, editing tax rates and so on..) it will go blank when i presss update..

The products that i have tried to create, and the changed taxrates have been saved, but it just does not seem right the way it goes blank (i have to use my "back" button on my browser to bet back to my admin page.. )...

 

By the way!

Thanks for a great contrib.!

really impressive work..

My shop is so much easier to edit and really looks the way i wanted it to!!

 

I can't offer any detailed support for the Mega Power Pack bundle since it has not been kept up to date and it started off rather buggy to begin with. You would be better off to install the latest version of STS, Dynamenu and HTC individually.

 

I created a step by step installation path for each of them some time ago. HTC is in my signature below and Dynamenu is listed in the STS Power Pack site (a site for STS addons).


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
Yeah, too bad people keep making the same mistakes. :blink:

 

Look into what the error is saying.... It can not find a file in the sts_inc folder that you are asking for it to include. This is caused by adding a template name in the STS Module field "Files to include". You should not do that. Remove the template name from that field and the error will go away.

Thanks, I got it working now. :)

Edited by erikajune

Share this post


Link to post
Share on other sites
I can't offer any detailed support for the Mega Power Pack bundle since it has not been kept up to date and it started off rather buggy to begin with. You would be better off to install the latest version of STS, Dynamenu and HTC individually.

 

I created a step by step installation path for each of them some time ago. HTC is in my signature below and Dynamenu is listed in the STS Power Pack site (a site for STS addons).

 

allright..

Thank you..

I am not taht good at installing/uninstalling/reinstalling contributions.. so i think i will try til live with this problem, untill i have to reinstall everything from scratch when something else goes really wrong..

Thanks for the really fast reply though!

Share this post


Link to post
Share on other sites
Thanks, I got it working now. :)

 

Home page template: index.php_0.html

General Category template: index.php.html

Specific Category template: index.php_x.html where "x" is the category ID.


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 hope someone can help me with a little problem...

 

I have three contributions that are clashing:

 

HeaderTagsSEO

STS

Under Construction Pages

 

The error:

Fatal error: Cannot redeclare tep_header_tag_page() (previously declared in /usr/home/sites/www.xxxx.com/web/includes/functions/header_tags.php:15) in /usr/home/sites/www.xxxx.com/web/includes/functions/header_tags.php on line 15

 

The contribution that I installed that's isn't playing nice with STS is the Under Construction one, and the relevant code is:

 

root/under_construction.php

<?php
if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) { require(DIR_WS_INCLUDES . 'header_tags.php'); } else { ?>
 <title><?php echo TITLE ?></title>
<?php } ?>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>

 

I only get this error on pages that are marked "under construction", and only when STS is turned on.

 

If I remove the two parts that include 'header_tags.php' I don't get the error, but loose all STS formating. (I get the under construction message in the center of the page, but everthing else is just $whatever)

 

Could someone point me in the right direction?

Share this post


Link to post
Share on other sites

Hi Bill and everyone,

 

Hoping someone might be able to help me solve a small but niggling problem.... my Categories box text ignores line-height in IE - whilst it is fine in FF.

 

Here is my CSS

 

.boxText { font-family: Verdana, Arial, sans-serif; font-size: 10px; line-height:25px; }

 

I have also tried this CSS IE hack but to no avail.

.boxText { font-family: Verdana, Arial, sans-serif; font-size: 10px; line-height:auto !important; line-height:25%; }

 

Any suggestions?

Thanks

Sol

Share this post


Link to post
Share on other sites

Has anyone noticed the performance degradation of pageloads (measured in time) when enabling sts? I've version 4.5.8 installed and i like its functionality but for a comfortable shopping experience the page should respond quickly to clicks. i can roughly say that the index.php-load-time gets doubled when using sts.

By the way: i'm currently building my store so i have 0 to 1 customers at a time, i'm curious what happens when lot's of customers come and visit my store!?

 

Are there any profilers available to debug where the ms's are being consumed?

 

How can i tell what queries take a long time (without adding trace statements to the php code offcourse.....)

 

Paul

Share this post


Link to post
Share on other sites
Has anyone noticed the performance degradation of pageloads (measured in time) when enabling sts? I've version 4.5.8 installed and i like its functionality but for a comfortable shopping experience the page should respond quickly to clicks. i can roughly say that the index.php-load-time gets doubled when using sts.

By the way: i'm currently building my store so i have 0 to 1 customers at a time, i'm curious what happens when lot's of customers come and visit my store!?

 

Are there any profilers available to debug where the ms's are being consumed?

 

How can i tell what queries take a long time (without adding trace statements to the php code offcourse.....)

 

Paul

 

Paul,

 

Have you ruled out that your images may be the reason for the slow load times? STS does add parse times but it is VERY minimal. A large image or an accumulation of many large images could bring your shop to a crawl. Also, your host can have a lot to do with the speed of an osCommerce shop. The database queries have a lot to do with the speed of osCommerce as well.


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

 

Have you ruled out that your images may be the reason for the slow load times? STS does add parse times but it is VERY minimal. A large image or an accumulation of many large images could bring your shop to a crawl. Also, your host can have a lot to do with the speed of an osCommerce shop. The database queries have a lot to do with the speed of osCommerce as well.

 

Hi Bill,

Well i've basically compared the load time with the same website with sts enabled and disabled. It's roughly a factor 2. On my laptop with local apache webserver the index page takes about 1sec to load with sts disabled and 2secs with sts enabled. I tried a bit with enabling/disabling parts of sts but it only makes a difference when i disable sts completely. I have a bare minimum regarding templates, only 1 default template and an infobox.php.html.

If you have some good trace points i'm willing to do some more performance measurements (or is it included in debug mode)?

Notice its not a big problem for me now but as a software engineer which i am i just want to make sure my applications perform best (as they should), or otherwise i want to know where and why i'm hitting a performance penalty.

Paul

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

×