Jump to content
rigadin2

[Contribution] STS v4

Recommended Posts

Hi Bill,

 

I did upgrade to the STS 4.5 but this is what is happening. It is looking for my old files in the old location. What do I need to do ?

 

Here is the message I am getting when I try to load my pages.

 

Template file does not exist: [includes/sts_template.html]

Warning: main(includes/sts_start_capture.php) [function.main]: failed to open stream: No such file or directory in /home/dzignzc/public_html/catalog/includes/application_top.php on line 524

 

Fatal error: main() [function.require]: Failed opening required 'includes/sts_start_capture.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/dzignzc/public_html/catalog/includes/application_top.php on line 524

 

Any ideas ?

 

Please do let me know.

 

Thanks

 

Amit

 

 

Yes, remove all instances of the old STSv2 from your store. Save your sts_user_code.php (only if you added any custom tags to that file) and template files (html pages).

 

Install the latest version of STS and then add any custom tags that you had in your previous setup. You can use your old STS template pages by creating a template folder called something like "mytemplates" in the catalog/includes/sts_templates/ folder.

 

If you want to use any of the content template and infobox template features, you will need to create a folder called "content" and "boxes" within your newly created "mytemplates" folder as so: catalog/includes/sts_templates/mytemplates/content

catalog/includes/sts_templates/mytemplates/boxes

 

:thumbsup: If your templates use any of the "outdated" tags, you will need to replace them with thier new counterparts. Look in the STS User Manual for more details.

 

Have fun,

Share this post


Link to post
Share on other sites
Hi Bill,

 

I did upgrade to the STS 4.5 but this is what is happening. It is looking for my old files in the old location. What do I need to do ?

 

Here is the message I am getting when I try to load my pages.

 

Template file does not exist: [includes/sts_template.html]

Warning: main(includes/sts_start_capture.php) [function.main]: failed to open stream: No such file or directory in /home/dzignzc/public_html/catalog/includes/application_top.php on line 524

 

Fatal error: main() [function.require]: Failed opening required 'includes/sts_start_capture.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/dzignzc/public_html/catalog/includes/application_top.php on line 524

 

Any ideas ?

 

Please do let me know.

 

Thanks

 

Amit

You still need to remove all of the STS define statements in the configure.php file. This was part of STS prior to STSv4.

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
You still need to remove all of the STS define statements in the configure.php file. This was part of STS prior to STSv4.

// STS: ADD: Define Simple Template System files
 define('STS_START_CAPTURE', DIR_WS_INCLUDES . 'sts_start_capture.php');
 define('STS_STOP_CAPTURE', DIR_WS_INCLUDES . 'sts_stop_capture.php'); 
 define('STS_RESTART_CAPTURE', DIR_WS_INCLUDES . 'sts_restart_capture.php');
 define('STS_TEMPLATE_DIR', DIR_WS_INCLUDES . 'sts_templates/');
 define('STS_DEFAULT_TEMPLATE', DIR_WS_INCLUDES . 'sts_template.html'); 
 define('STS_DISPLAY_OUTPUT', DIR_WS_INCLUDES . 'sts_display_output.php');
 define('STS_USER_CODE', DIR_WS_INCLUDES . 'sts_user_code.php');
 define('STS_PRODUCT_INFO', DIR_WS_INCLUDES . 'sts_product_info.php');
  // STS: EOADD

 

so i should remove all the above ?

Share this post


Link to post
Share on other sites
// STS: ADD: Define Simple Template System files
define('STS_START_CAPTURE', DIR_WS_INCLUDES . 'sts_start_capture.php');
define('STS_STOP_CAPTURE', DIR_WS_INCLUDES . 'sts_stop_capture.php'); 
define('STS_RESTART_CAPTURE', DIR_WS_INCLUDES . 'sts_restart_capture.php');
define('STS_TEMPLATE_DIR', DIR_WS_INCLUDES . 'sts_templates/');
define('STS_DEFAULT_TEMPLATE', DIR_WS_INCLUDES . 'sts_template.html'); 
define('STS_DISPLAY_OUTPUT', DIR_WS_INCLUDES . 'sts_display_output.php');
define('STS_USER_CODE', DIR_WS_INCLUDES . 'sts_user_code.php');
define('STS_PRODUCT_INFO', DIR_WS_INCLUDES . 'sts_product_info.php');
// STS: EOADD

 

so i should remove all the above ?

Yes.

What is happening is that your store is looking for the older STS files that you no longer have. If you still had the files, you would still get the errors because your store would be getting mixed signals on which STS files to use.


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
Yes.

What is happening is that your store is looking for the older STS files that you no longer have. If you still had the files, you would still get the errors because your store would be getting mixed signals on which STS files to use.

i deleted those and looks like i need to delete or comment out these too in all the header,footer, application_top and application_bottom files too ? is that correct.

 

stuff like this. because if i dont its looking for these in all the panel files.

 

//require(STS_STOP_CAPTURE);

 

// Print everything out

//require(STS_DISPLAY_OUTPUT);

 

thanks for your help.

Share this post


Link to post
Share on other sites

pretty much everything fixed but i see a drop down menu appear on top for catalog. i don't know how and where to remove that. anyone have any ideas ?

 

thx

 

amit

 

 

 

i deleted those and looks like i need to delete or comment out these too in all the header,footer, application_top and application_bottom files too ? is that correct.

 

stuff like this. because if i dont its looking for these in all the panel files.

 

//require(STS_STOP_CAPTURE);

 

// Print everything out

//require(STS_DISPLAY_OUTPUT);

 

thanks for your help.

Share this post


Link to post
Share on other sites

Hey Bill,

I've been using your contribution for several years now and it gets better and better. I don't think OS Commerce would be the product it is without people like you writing these great Contribs!

 

I too program in PHP, but not at an expert level - I'm better at 'hacking' code and making it work generally :thumbsup:

 

I have a small problem you might be able to point me in the right direction with, I've spent hours looking for the answer, and perhaps it right in front of me.

 

I am trying to install the featured products 1.5.8 and already have the latest STS 4.5.8 on this new Oscommerce RC2 build. I rebuilt from the ground up for a new shop I am doing just to ensure the latest fixes etc. :-"

 

In install_english.txt in the Featured Products contribution, my question relates to this step:

 

-----------------------------------------------------------------------

15.2 Add the following lines to /catalog/includes/column_right.php or column_left.php

 

require(DIR_WS_BOXES . 'featured.php');

 

// STS: ADD

$sts_block_name = 'featuredbox';

require(STS_RESTART_CAPTURE);

// STS: EOADD

 

15.3 Add the following lines to /catalog/includes/sts_display_output.php

 

$template['featuredbox'] = strip_unwanted_tags($sts_block['featuredbox'], 'featuredbox');

 

and further down

 

echo $sts_block['featured'];

-----------------------------------------------------------------------

 

I can't seem to find /includes/sts_display_output.php and as a result don't know where to add this.

Presumably you've updated STS 4.5.8 to remove this file to make it run slicker ?

 

Any pointers appreciated, I was up until 04:30am trying to solve this and need a caffeine fix now. :lol:

 

Best Regards,

Paul

p.s. Are there any other 'gotchas' between Featured Products 1.5.8 and the new STS 4.5.8 ?

Share this post


Link to post
Share on other sites

Im attempting to use conditional comments to load a separate stylesheet for IE

<!--[if IE]>
<link rel="stylesheet" type="text/css" href="highbayie.css">
<![endif]-->

and it simply won't load in IE (6, specifically atm) . Is there something with STS or osCommerce in general that might be causing this?

 

Or am I crazy?

Share this post


Link to post
Share on other sites

I need some help, I've been trying to figure out how to do this. I want a custom page for my front page and my category pages. The documentation tries to explain it but I guess its not simple enough for me. I see I should make different content templates and I assume that is pretty straight forward, but how do I insert them into osCommerce.

 

By the way, I am new to osCommerce and PHP.

Share this post


Link to post
Share on other sites
Hey Bill,

I've been using your contribution for several years now and it gets better and better. I don't think OS Commerce would be the product it is without people like you writing these great Contribs!

 

I too program in PHP, but not at an expert level - I'm better at 'hacking' code and making it work generally :thumbsup:

 

I have a small problem you might be able to point me in the right direction with, I've spent hours looking for the answer, and perhaps it right in front of me.

 

I am trying to install the featured products 1.5.8 and already have the latest STS 4.5.8 on this new Oscommerce RC2 build. I rebuilt from the ground up for a new shop I am doing just to ensure the latest fixes etc. whistling.gif

 

In install_english.txt in the Featured Products contribution, my question relates to this step:

 

-----------------------------------------------------------------------

15.2 Add the following lines to /catalog/includes/column_right.php or column_left.php

 

require(DIR_WS_BOXES . 'featured.php');

 

// STS: ADD

$sts_block_name = 'featuredbox';

require(STS_RESTART_CAPTURE);

// STS: EOADD

 

15.3 Add the following lines to /catalog/includes/sts_display_output.php

 

$template['featuredbox'] = strip_unwanted_tags($sts_block['featuredbox'], 'featuredbox');

 

and further down

 

echo $sts_block['featured'];

-----------------------------------------------------------------------

 

I can't seem to find /includes/sts_display_output.php and as a result don't know where to add this.

Presumably you've updated STS 4.5.8 to remove this file to make it run slicker ?

 

Any pointers appreciated, I was up until 04:30am trying to solve this and need a caffeine fix now. :lol:

 

Best Regards,

Paul

p.s. Are there any other 'gotchas' between Featured Products 1.5.8 and the new STS 4.5.8 ?

 

Paul,

I re-wrote the installation instructions for Feature Products, that includes updated modifications to step 15 (the part that is messing you up). The instructions state that it is for STSv4.3.3 but it really is for any STSv4.x. The instructions you are following is for STSv3 and older versions of STS.

You can download the updated Featured Products installation instructions at the Featured Products contribution site.


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 need some help, I've been trying to figure out how to do this. I want a custom page for my front page and my category pages. The documentation tries to explain it but I guess its not simple enough for me. I see I should make different content templates and I assume that is pretty straight forward, but how do I insert them into osCommerce.

 

By the way, I am new to osCommerce and PHP.

Rodney, it is really simple. Basically, it is how you name your templates.

 

To make sure you understand the naming part, use the sample templates provided until you get a full understanding of how the naming works as well as what your need in the top of your HTML to make it a "STS" template (in other words, know what to do with all of those tags).

 

For your home page, make a copy of the index.php.html template and name it index.php_0.html.

 

Did you see the difference? The difference is the "0" (zero).

:thumbsup: TIP: If you do not want any dynamic content (the osCommerce stuff that is usually in the middle column), simply do not insert the $content tag.

:thumbsup: TIP: STS does not require you to use any tags in your templates. Add the tags that you want/need and leave the rest out. For example, if you do not want a specials box on the home page, then do not insert the $specialbox tag.

 

For your general category page, use the index.php.html template. If you want a custom template for a specific category, simply name it index.php_23.html (for category 23 for example).

 

If you wanted a custom subcategory template, simply add the subcategory ID as so:

index.php_23_9.html for subcategory 9 of category 23.

 

Well, that should get you started, hope it 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
Im attempting to use conditional comments to load a separate stylesheet for IE

<!--[if IE]>
<link rel="stylesheet" type="text/css" href="highbayie.css">
<![endif]-->

and it simply won't load in IE (6, specifically atm) . Is there something with STS or osCommerce in general that might be causing this?

 

Or am I crazy?

Holly,

There are a few different ways of doing this so I will show you the "STS" way. :-

  1. Simple direct link that points to your template directory:
    <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.

  2. Use the $extracss tag:
    You can use this placeholder if you want to dynamically add something in the html header, like an extra css file to load, depending on the page viewed.
     
    Use: place
    <!--$extracss-->

    between <head> and </head> of your template. It is important to keep the comment characters before and after $extracss, otherwise it won't work.
     
    Code example: simple example to dynamically add a stylesheet to the template. This stylesheet is located in the same folder as the template itself (your template folder). You will need to place this code in includes/modules/sts_inc/sts_user_code.php (my choice for custom sts code).
     

    $sts->template['extracss'].= '<link rel="stylesheet" type="text/css" href="' . STS_TEMPLATE_DIR  .'stylesheet2.css">';


     
    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 cannot find the download link for STS v4, where is it?????

 

Ryan,

Use the STSv4.5.8 link in my signature below. It will take you to the download site and you will see a box with a green downward arrow to the far right of each version of STS. Click on that arrow.


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

Bill,

 

Any ideas on this ?

 

Amit

 

pretty much everything fixed but i see a drop down menu appear on top for catalog. i don't know how and where to remove that. anyone have any ideas ?

 

thx

 

amit

Share this post


Link to post
Share on other sites

I seem to have a few problems with my new site: www.art-e-bits.co.uk/catalog

 

1. The items in brackets in the Category menu are on a new line regardless of how wide the column is! I want them next to the category to reduce wasted space.

 

2. I seem to have css buttons not images. This seems to have just happened - I don't know what I have done!!!

 

Please help.

 

Regards

Robin

Share this post


Link to post
Share on other sites

Hello,

 

I have just installed STS4.5.8 over my OSC MS2, but a have a problem. The site looks nice but on the product_info.php there is a problem with the image path product_info.php ( http://reflexshop.hu/shop1/product_info.php/products_id/1091 ) but works here ( http://reflexshop.hu/shop1/index.php?manufacturers_id=25 )

What could couse this?

 

thanks in advance

spuri

Edited by spuri

Share this post


Link to post
Share on other sites

Hi iam modifying the new_products.php Module to sort the products by categories. And i get stuck here.

 

$new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, p.products_price, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and pd.language_id = '" . (int)$languages_id . "' and p.products_id = pd.products_id order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);

 

i have tried to modify the order by but i dont get the results right. Any clue?

Share this post


Link to post
Share on other sites
Ryan,

Use the STSv4.5.8 link in my signature below. It will take you to the download site and you will see a box with a green downward arrow to the far right of each version of STS. Click on that arrow.

 

thanks for that, i was looking for quite some time!

Share this post


Link to post
Share on other sites

I have a strange problem. I've been asked to remove the category image and the category name - which I have done.

 

However, they want the top of the list of products table (i.e. the one you see when you select the category) the black top box to line up with the top of the category top black box - I can't work out how to do this or if it is even possible - I would have thought if it is possible STS is my best bet - I have it installed.

 

Any Ideas, see the image below where the boxes dont match up, the products table is higher than the categories table - I've tried removing the categories drop down but it still doesn't line up.

 

layout.gif

Share this post


Link to post
Share on other sites
It could be a server issue, but it is not due to any contributions or anything else. This has been an on going topic when osC RC1 was first release and the edit I mentioned above was the solution that was provided by the community as well as it seems that it that this is still an ongoing thing with osC RC 2.

 

I am just providing this information to help those who are beating their head at why their secure pages are coming up unsecure.

 

 

I too have had SSL problems with STS....templates worked fine on nonssl pages but image and links on ssl pages did not show or function correctly. I tried many fixes including trying to put the images in the templates directory and switching that on in html_outout.php....spent quite some time trying to figure it out. I had the same problem of using a shared SSL server: the path was missing the site domain name in the the SSL urls so images wouldn't display and links such as those to the css pages weren't working.

 

The "fix" I finally came up with was to put

<?php

global $request_type;

$basepath = (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG;

?>

at the top of my template page.

Then I added <?php echo $basepath ?> before any of my image src fields and style page or other links.

That works well.

 

So my image paths used to look like:

https://secureserver.net/catalog2/images/nav/headerCap.jpg

Now they look like:

https://secureserver.net/domainname/catalog...v/headerCap.jpg

 

Seems like there is probably a better way but I have a life and only so much time to waste...

Share this post


Link to post
Share on other sites
I too have had SSL problems with STS....templates worked fine on nonssl pages but image and links on ssl pages did not show or function correctly. I tried many fixes including trying to put the images in the templates directory and switching that on in html_outout.php....spent quite some time trying to figure it out. I had the same problem of using a shared SSL server: the path was missing the site domain name in the the SSL urls so images wouldn't display and links such as those to the css pages weren't working.

 

The "fix" I finally came up with was to put

<?php

global $request_type;

$basepath = (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG;

?>

at the top of my template page.

Then I added <?php echo $basepath ?> before any of my image src fields and style page or other links.

That works well.

 

So my image paths used to look like:

https://secureserver.net/catalog2/images/nav/headerCap.jpg

Now they look like:

https://secureserver.net/domainname/catalog...v/headerCap.jpg

 

Seems like there is probably a better way but I have a life and only so much time to waste...

That's a lot of work to fix a problem that isn't caused by STS.

If you have SSL image problems, and happen to have STS installed, the easy solution is to blame STS. The real solution would be to have your configure.php files configured correctly and your links setup correctly as well. You may even need to search each line of code in your catalog for any absolute links and correct them.

 

Even if you have other issues in your shop, STS still tries to help you out by allowing you to place your images and stylesheet in your templates folder and use the STS tage "$templatedir" to reference them.

 

For example: If your template folder is "my_templates", then you would upload your images to catalog/includes/sts_templates/my_templates/images. You would link to those images as so:

$templatedir/images/my_image.gif

.

By using the tag, you are keeping your links "relative" and not "absolute" which is the root of SSL image issues.

 

You can upload your stylesheet into your template folder and link to it as so:

<link rel="stylesheet" type="text/css" href="$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
That's a lot of work to fix a problem that isn't caused by STS.

If you have SSL image problems, and happen to have STS installed, the easy solution is to blame STS. The real solution would be to have your configure.php files configured correctly and your links setup correctly as well. You may even need to search each line of code in your catalog for any absolute links and correct them.

 

Even if you have other issues in your shop, STS still tries to help you out by allowing you to place your images and stylesheet in your templates folder and use the STS tage "$templatedir" to reference them.

 

For example: If your template folder is "my_templates", then you would upload your images to catalog/includes/sts_templates/my_templates/images. You would link to those images as so:

$templatedir/images/my_image.gif

.

By using the tag, you are keeping your links "relative" and not "absolute" which is the root of SSL image issues.

 

You can upload your stylesheet into your template folder and link to it as so:

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

 

Hi Bill

I tried that fix for images and css but it didn't work...tried everything i could think of but the solution i finally got to work, altho clunky, did fix the problem...only so many hours in the day...

thanks

bopp

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

×