Jump to content
rigadin2

[Contribution] STS v4

Recommended Posts

Hi,

 

First of all let me add my thanks for the great contribution.

 

Now to the small problem I am having.

 

I uploaded a fresh oscommerce v2.2m2 install

 

everything went fine. I then installed STS 4.1 and then the 2 updates.

 

Now when I go to my site www.techheads.eu I see 2 header areas, one which is the original color and one the color of the default stst template.

 

I have no idea where to begin with this but have searched through these forums looking for a similar problem but have come up empty handed. Any help would be appriciated.

 

Thanks

 

Doh I just read a post 2 up that indicates that this may be one of the patches I added. any help on how to fix?

Edited by TechHeads

Share this post


Link to post
Share on other sites

Happy Memorial's Day!

 

I have a quick question. I know with v.3 you were able to add the xsell mod to the sts_output_code.php file using this code:

$sts_block_name = 'xsell';
require(STS_START_CAPTURE);
require(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS);
require(STS_STOP_CAPTURE);
$template['xsell'] = $sts_block['xsell'];

 

 

When I used it with this version it threw everything off and I got this message:

Warning: main(includes/sts_start_capture.php): failed to open stream: No such file or directory in /home/xxx/catalog/includes/modules/sts_inc/sts_user_code.php on line 114

 

Warning: main(includes/sts_start_capture.php): failed to open stream: No such file or directory in /home/xxx/catalog/includes/modules/sts_inc/sts_user_code.php on line 114

 

Fatal error: main(): Failed opening required 'includes/sts_start_capture.php' (include_path='.:/usr/local/lib/php') in /home/xxx/catalog/includes/modules/sts_inc/sts_user_code.php on line 114

 

 

Do I need to make a change somewhere else as well?


Thanks!

Clesha

Share this post


Link to post
Share on other sites
Happy Memorial's Day!

 

I have a quick question. I know with v.3 you were able to add the xsell mod to the sts_output_code.php file using this code:

$sts_block_name = 'xsell';
require(STS_START_CAPTURE);
require(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS);
require(STS_STOP_CAPTURE);
$template['xsell'] = $sts_block['xsell'];

When I used it with this version it threw everything off and I got this message:

Do I need to make a change somewhere else as well?

 

The code will need to be changed for v4 - sorry but can't really tell you how.. but i think you'll need

$sts->start_capture();

replacing the beginning

 

and

$sts->stop_capture('xsell');

replacing the end

 

unless you are using the STSv3 compatibility mode - which I have no idea about.

in v4 it needs to go in sts_user_code

sorry i can't be of more help.

Share this post


Link to post
Share on other sites

is anyone using a product template with the $product_popup variable?

 

What is it suppoed to show? Mine is just showing the tag - no image nothing. Any ideas why?

 

Thanks

Share this post


Link to post
Share on other sites
is anyone using a product template with the $product_popup variable?

 

What is it suppoed to show? Mine is just showing the tag - no image nothing. Any ideas why?

 

Thanks

 

Sorry, got it working now. Although how could I have the 'Click to enlarge' as an image?

Share this post


Link to post
Share on other sites

I know its been said before but thanks very much to those who have created and updated this Simple template system.

 

Now to my question.

 

I am trying to add the PC Pro Creator contribution while using STS and cannot figure out how to add a variable for it using STS v4.1. This seems to be explained in the readme files included with STS but I am having a hard time figuring out exactly what to do as the instructions seem to assume you know how to code these things already .

 

It would be interesting to see and example of the complete process of how to do this using an existing infobox contribution.

 

If anyone one could post a tutorial written in very simple language or if such a tutorial already exists a link to it would be much appriciated.

Share this post


Link to post
Share on other sites

Hello,

 

I was wondering if there is anyway to change the links of the products displayed when performing a search. as it is when you are to click on a product it takes you to the product page made by oscommerce, however i have my store set up with differant pages made for each product. is there any way to change the links to go to these seperate pages? thanks,

 

Robert

Share this post


Link to post
Share on other sites
The error you are experiencing maybe because you have modified the index.php file (and probably other pages in your shop as well) to include header_tags.php, and now STS includes it again.

Possible Solution: Remove the include of header_tags.php from each file in your store, or add this condition for it:

if ($sts->display_template_output==false) { ...

If you add the above condition, you'll still have Header Tags Controller working when STS is turned off.

 

 

 

Another thing to look for: In your headertags.php file, look for the following code:

 

 

$sts->start_capture();
if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
require(DIR_WS_FUNCTIONS . 'header_tags.php');
require(DIR_WS_INCLUDES . 'header_tags.php');
} 
$sts->stop_capture('headertags');

and change it to this:

 

 

$sts->start_capture();
if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
require_once(DIR_WS_FUNCTIONS . 'header_tags.php');
require(DIR_WS_INCLUDES . 'header_tags.php');
} 
$sts->stop_capture('headertags');

That will cause the file to only be called once and should take care of your error.

 

Hope this helps,

 

Bill Kellum

THANKS!!!

Share this post


Link to post
Share on other sites

Any fix for having the "GZip Compression" enabled and STS 4.1 Blank pages problem? (besides turning them OFF)

Share this post


Link to post
Share on other sites

Anyone notice that the SSL symbol lock in IE on the bottom right doesn't show after the install of STS even though SSL is working?

 

It's showing in other browsers....but not in IE

 

any ideas?

Share this post


Link to post
Share on other sites
I use the excellent freeware program called Winmerge (for windows users of course). You can get it here. http://winmerge.org

 

Hope this helps,

 

Bill Kellum

 

 

 

 

 

 

I use one called BEYOND COMPARE that youcan try free for 30 days I think....it works fantastic....

Share this post


Link to post
Share on other sites
I believe that you miss something in your install.

 

Have you made this correctly:

Edit: Sorry, did not see that you found the solution, so this reply is not needed but I can't delete it.

Rigadin

 

I have the same problem (see this post)...

After the upload of sts v4.1, the module does not appear in the module list.

So I edit the admin/includes/boxes/modules.php and add the following code... (see this post).

Ok, a link appear but it's a link that goes on a another module...

 

Any idea to help me ?

 

P.S'hum. Sorry for my basic english !!! :blush:

Edited by bertranddenis

Share this post


Link to post
Share on other sites
jonnyl

post May 31 2006, 11:28 PM

 

Anyone notice that the SSL symbol lock in IE on the bottom right doesn't show after the install of STS even though SSL is working?

 

It's showing in other browsers....but not in IE

 

any ideas?

 

I have this problem too. For my site it is very important to have ssl, for we sell condoms and related items, so customers really check if the site is secure or not.

 

When sts is turned off, ssl works like a charm, but with sts on, not al items on the site are secure. I have tried several things and also searched for the bug. But i could not find anything.

 

Right now i just assigned the http-server to be https://myserver to at least have ssl work, but this is no good. It is so much slower since every item has to be incrypted, also on index and products_info.

 

Anyone have any clue?

 

Please help!

 

Thanks.

Share this post


Link to post
Share on other sites

I have upgraded and now use STS 4.1. Everything works as it should except for the Error Message stacks - specifically at credit card checkout_payment.php when using the authorize.net AIM module. This problem was fixed in earlier versions, but the fix doesn't work now in STS 4.1.

 

Basically, Error Message stacks show up in the URL only and not within the header. Please help! Thanks!

Share this post


Link to post
Share on other sites
I have this problem too. For my site it is very important to have ssl, for we sell condoms and related items, so customers really check if the site is secure or not.

 

When sts is turned off, ssl works like a charm, but with sts on, not al items on the site are secure. I have tried several things and also searched for the bug. But i could not find anything.

 

Right now i just assigned the http-server to be https://myserver to at least have ssl work, but this is no good. It is so much slower since every item has to be incrypted, also on index and products_info.

 

Anyone have any clue?

 

Please help!

 

Thanks.

Have you checked to see that all of your links, such as for your images, are not pointed to "http://yourlink" ? All of your links should be relative links like so: "yourlink" or "foldername/yourlink". If any of your images that you have inserted into the STS template points to an "outside" source, you will not have a secure icon shown for the shopper. They may see the following error message:

 

 

 

2. This page has both secure and insecure items

 

This alert appears if the secured page the browser is trying to show has objects or references that point to non secured domains.

 

So for instance if you had a graphical image of credit cards as processed by your gateway and say you were hotlinking to the images with a piece of code such as <img src="http://mycreditcardprocessor.com> That image is not on your encrypted domain hence the alert would show.

 

Often this problem will appear from one or more of three sources:

  • Where you are hotlinking images for your products from the wholesalers server
  • Objects in your footer
  • Objects in your boxes in the columns

If the problem is an image you are hotlinking you need to ask the owner if you can have access to the image and place it in your own images directory under the encrypted domain and then change the path in your footer so that it now references the image in your domain.

 

[font="Courier"][color="#0000bb"]<?php 
 [/color][color="#007700"]echo [/color][color="#0000bb"]tep_image[/color][color="#007700"]([/color][color="#0000bb"]DIR_WS_IMAGES [/color][color="#007700"]. [/color][color="#dd0000"]'my_image.gif'[/color][color="#007700"], [/color][color="#dd0000"]'my ALT text'[/color][color="#007700"], [/color][color="#dd0000"]'100'[/color][color="#007700"], [/color][color="#dd0000"]'150'[/color][/font][font="Courier"][color="#007700"]); 
[/color][color="#0000bb"]?>[/color][/font]

All images which are also hyperlinks should be referenced in the following way:

[font="Courier"][color="#0000bb"]<?php 
 [/color][color="#007700"]echo [/color][color="#dd0000"]'<a href="' [/color][color="#007700"]. [/color][color="#0000bb"]tep_href_link[/color][color="#007700"]([/color][color="#dd0000"]'your_directory/your_page.php'[/color][color="#007700"]) . [/color][color="#dd0000"]'">' [/color][color="#007700"]. [/color][color="#0000bb"]tep_image[/color][color="#007700"]([/color][color="#0000bb"]DIR_WS_IMAGES [/color][color="#007700"]. [/color][color="#0000bb"]your_image[/color][color="#007700"].[/color][color="#0000bb"]gif[/color][color="#007700"]) . [/color][color="#dd0000"]'</a>'[/color][/font][font="Courier"][color="#007700"];
[/color][color="#0000bb"]?>[/color][/font]

If you are using images in the stylesheet for backgrounds they should also use the relative address ... e.g. images/my_background.gif

 

If you have for instance a visitor counter that goes back to the counter owners server to process info - you may be able to construct an if else statement around the counter using php such that if the $request_type is SSL then do not go to the counter owners site.

 

For Google ads the script has to go back to google - not on your domain which gives the problem so use the following construct to prevent google ads from showing iF the browser is on a secure page:

[font="Courier"][color="#0000bb"]<?php
[/color][color="#007700"]if ([/color][color="#0000bb"]$request_type [/color][color="#007700"]!= [/color][color="#dd0000"]'SSL'[/color][/font][font="Courier"][color="#007700"]) { 
.....
.....
.....
[/color][color="#0000bb"]src[/color][color="#007700"]=[/color][color="#dd0000"]"http://pagead2.googlesyndication.com/pagead/show_ads.js"[/color][/font][font="Courier"][color="#007700"]>
[/color][/font][font="Courier"][color="#0000bb"]</script>
[/color].....
.....
}
?>[/font]

If none of the above matches your situation, check the following to be sure you have configured your shop correctly:

 

The workings of SSL with osCommerce are quite straightforward. Once your SSL is installed, you set the configuration path for https:// in catalog/includes/configure.php to enable SSL and the code takes care of the rest.

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

define('HTTP_SERVER', 'http://www.yourdomain.com'); // eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER', 'https://yourdomain.com'); // eg, https://localhost - should not be empty for productive servers

define('ENABLE_SSL', true); // secure webserver for checkout procedure?

define('HTTP_COOKIE_DOMAIN', 'www.yourdomain.com');

define('HTTPS_COOKIE_DOMAIN', 'yourdomain.com');

define('HTTP_COOKIE_PATH', '/catalog/');

define('HTTPS_COOKIE_PATH', '/catalog/');

define('DIR_WS_HTTP_CATALOG', '/catalog/');

define('DIR_WS_HTTPS_CATALOG', '/catalog/');

 

 

 

Note: In the example above the certificate was issued WITHOUT the www. qualifier and this shop is installed in Catalog directory ONE level below root. In normal working - these changes above will result in a small padlock being shown in the bottom right of your browser status bar when you navigate to a secure page AND your address line will show the https:// URL instead of http://

 

If you look through the code you will see example after example of statements that refer to SSL where osC is making a decision based on request type as to whether to display the secured or non secured pages.

 

In short neither you nor your customers has to type in https:// into the address line to get to secure pages. osCommerce will identify from the configuration if SSL is installed and direct browsers to the correct page depending on what the browser is doing on your site.

 

I hope this helps in some way,

 

Bill Kellum


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

Sorry, the forum messed up the code snippets so here are the corrections from the above post:

 

 

 

I have this problem too. For my site it is very important to have ssl, for we sell condoms and related items, so customers really check if the site is secure or not.

 

When sts is turned off, ssl works like a charm, but with sts on, not al items on the site are secure. I have tried several things and also searched for the bug. But i could not find anything.

 

Right now i just assigned the http-server to be https://myserver to at least have ssl work, but this is no good. It is so much slower since every item has to be incrypted, also on index and products_info.

 

Anyone have any clue?

 

Please help!

 

Thanks.

Have you checked to see that all of your links, such as for your images, are not pointed to "http://yourlink[/url]" ? All of your links should be relative links like so: "yourlink" or "foldername/yourlink". If any of your images that you have inserted into the STS template points to an "outside" source, you will not have a secure icon shown for the shopper. They may see the following error message:

 

 

 

2. This page has both secure and insecure items

 

This alert appears if the secured page the browser is trying to show has objects or references that point to non secured domains.

 

So for instance if you had a graphical image of credit cards as processed by your gateway and say you were hotlinking to the images with a piece of code such as <img src="http://mycreditcardprocessor.com> That image is not on your encrypted domain hence the alert would show.

 

Often this problem will appear from one or more of three sources:

If the problem is an image you are hotlinking you need to ask the owner if you can have access to the image and place it in your own images directory under the encrypted domain and then change the path in your footer so that it now references the image in your domain.

 

<?php 
 echo tep_image(DIR_WS_IMAGES . 'my_image.gif', 'my ALT text', '100', '150'); 
?>

All images which are also hyperlinks should be referenced in the following way:

<?php 
 echo '<a href="' . tep_href_link('your_directory/your_page.php') . '">' . tep_image(DIR_WS_IMAGES . your_image.gif) . '</a>';
?>

If you are using images in the stylesheet for backgrounds they should also use the relative address ... e.g. images/my_background.gif

 

If you have for instance a visitor counter that goes back to the counter owners server to process info - you may be able to construct an if else statement around the counter using php such that if the $request_type is SSL then do not go to the counter owners site.

 

For Google ads the script has to go back to google - not on your domain which gives the problem so use the following construct to prevent google ads from showing iF the browser is on a secure page:

<?php
if ($request_type != 'SSL') { 
.....
.....
.....
src="[url="http://pagead2.googlesyndication.com/pagead/show_ads.js"]http://pagead2.googlesyndication.com/pagead/show_ads.js[/url]">
</script>
.....
.....
}
?>

If none of the above matches your situation, check the following to be sure you have configured your shop correctly:

 

The workings of SSL with osCommerce are quite straightforward. Once your SSL is installed, you set the configuration path for https:// in catalog/includes/configure.php to enable SSL and the code takes care of the rest.

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

define('HTTP_SERVER', 'http://www.yourdomain.com'); // eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER', 'https://yourdomain.com'); // eg, https://localhost - should not be empty for productive servers

define('ENABLE_SSL', true); // secure webserver for checkout procedure?

define('HTTP_COOKIE_DOMAIN', 'www.yourdomain.com');

define('HTTPS_COOKIE_DOMAIN', 'yourdomain.com');

define('HTTP_COOKIE_PATH', '/catalog/');

define('HTTPS_COOKIE_PATH', '/catalog/');

define('DIR_WS_HTTP_CATALOG', '/catalog/');

define('DIR_WS_HTTPS_CATALOG', '/catalog/');

 

 

 

Note: In the example above the certificate was issued WITHOUT the www. qualifier and this shop is installed in Catalog directory ONE level below root. In normal working - these changes above will result in a small padlock being shown in the bottom right of your browser status bar when you navigate to a secure page AND your address line will show the https:// URL instead of http://

 

If you look through the code you will see example after example of statements that refer to SSL where osC is making a decision based on request type as to whether to display the secured or non secured pages.

 

In short neither you nor your customers has to type in https:// into the address line to get to secure pages. osCommerce will identify from the configuration if SSL is installed and direct browsers to the correct page depending on what the browser is doing on your site.

 

I hope this helps in some way,

 

Bill Kellum


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

Ok, I am new to all of this, I've read through this entire topic and have yet to find a fix for the problem I am having...perhaps I just have "forum eyes" and missed it but regardless please help....

 

I installed the 4.1 version and then added all the updates up to and including 4.103 (the index fix).

 

I am still getting 2 headers.... you can see my pain here...

 

http://www.empireflesh.com/catalog/index.php

 

warning: this is an adult oriented site...

 

 

My thanks and apologies in advance if I missed the fix in my hours of reading this topic....

Edited by SteelBlue

Share this post


Link to post
Share on other sites

Hi guys. Nice easy one for you i hope.

 

I have sts4 configured and all seems to be working ok. the only issue i have is that the Click To Enlarge bit does not work when i have sts enabled. i get a javascript error when i click rather than it opening the pop-up window. Any ideas?

Share this post


Link to post
Share on other sites
Anyone notice that the SSL symbol lock in IE on the bottom right doesn't show after the install of STS even though SSL is working?

 

It's showing in other browsers....but not in IE

 

any ideas?

The padlock is missing in ie because this contrib says to use absolute addressing instead of relative addressing. The former is great for testing, but not good for ssl.


The Coopco Underwear Shop

 

If you live to be 100 years of age, that means you have lived for 36,525 days. Don't waste another, there aren't many left.

Share this post


Link to post
Share on other sites

Hi all,

 

Thanks for thinking along!

 

I have ssl configured correctly. When (in modules admin panel) sts is turned off, everything works perfectly. All images and everything, nice lock item and no errors.

 

I have no third party images and no stylesheet images.

 

I have also created a complety blank template, with just $content in it, so no additional image or stuff is loaded, and that doesn't even work. No lock icon, something has to still request a http item. But it i can't find it.

 

It has to be something in default sts 4....

 

Hope anyone throws in another idea.

Share this post


Link to post
Share on other sites
Hi guys. Nice easy one for you i hope.

 

I have sts4 configured and all seems to be working ok. the only issue i have is that the Click To Enlarge bit does not work when i have sts enabled. i get a javascript error when i click rather than it opening the pop-up window. Any ideas?

 

 

I have this problem as well.....

Share this post


Link to post
Share on other sites
Ok, I am new to all of this, I've read through this entire topic and have yet to find a fix for the problem I am having...perhaps I just have "forum eyes" and missed it but regardless please help....

 

I installed the 4.1 version and then added all the updates up to and including 4.103 (the index fix).

 

I am still getting 2 headers.... you can see my pain here...

 

http://www.empireflesh.com/catalog/index.php

 

warning: this is an adult oriented site...

 

 

My thanks and apologies in advance if I missed the fix in my hours of reading this topic....

I didn't go to your site but this is a well documented issue for those who installed the "updates".

 

 

 

To install it correctly, You will only need to download and install this and then this. :thumbsup:

(STS v4.1 as well as the Index module v1.0.3 for STS4.)

The two files between these two contributions have been known to cause problems such as double headers and php errors. ;)

 

Hope this helps,

 

Bill Kellum


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
Hope this helps,

 

Bill Kellum

 

 

Wouldn't you know I re-read through this topic and found your answer previously and then saw your reply to me.... (such has been my life recently ;) )

 

So yes it fixed the issue just as you said it would before LOL. I got really lucky and was also able to find the fix for the "Click to enlarge" java script error....

Edited by SteelBlue

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

×