Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] STS v4


Guest

Recommended Posts

when you click the cartcontents it gives you the shopping cart with https but the update buttons post method is calling it with http, this generates a security popup. I changed the shopping_cart php file to update with ssl.

 

Draiesme has gone the other way and edited general.php in sts to generate cartcontents with http instead of https, i actually like this solution better.

 

Julian

Julian, I still do not see this as a STS problem. STS is only pulling what is in the shopping_cart.php file.

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

Julian, I still do not see this as a STS problem. STS is only pulling what is in the shopping_cart.php file.

 

 

Hello bill,

 

Im a complete newb at oscommerce, php and sts (as you can see from my post above). I see your point that sts is using what is in shopping cart however, if you turn sts off in admin, the unmodified cart doesnt show the problem behavior. I have no idea why not.

Link to comment
Share on other sites

Hello bill,

 

Im a complete newb at oscommerce, php and sts (as you can see from my post above). I see your point that sts is using what is in shopping cart however, if you turn sts off in admin, the unmodified cart doesnt show the problem behavior. I have no idea why not.

To assist in narrowing this down....Is your shop a stock osC shop (meaning you do not have any other contributions added except for STS)? If not, what other contributions do you have installed?

 

My line of thinking here is that some of the stock osC code was modified to make a certain contribution work, however, it is not to osC standards and therefore STS has trouble with it. This would explain why your shop "appears" to be OK with STS turned off.

 

Also, if your shop is a stock osC shop, you may have some settings that STS is not agreeing with. Is your shop configured the same as it was at the time of the osC installation? Do you have "Search Engine Friendly URLS" set to "False" (it should always be set to False btw)?

 

I'll wait for your response.

Thanks Julian. :thumbsup:

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

this is probably very simple and has been answered in this thread somewhere (cant find it). ive read the docs and i must be very obtuse so here goes. How exactly do you use sts to replace something like TEXT_INFORMATION in

 

define('TEXT_INFORMATION', 'Put here your Shipping & Returns information.');

 

This is a line from my shipping.php, surely i dont actually have to type what i want in my shipping and returns info into this one statement. I know i can replace the whole page with shipping.php.html but i only want to change what is in 'TEXT_INFORMATION' , replacing the whole page seems like using a sledge hammer to crack a nut.

 

 

 

Julian :blush:

The best way to do this is to change that line so that it echos nothing.

define('TEXT_INFORMATION', 'Put here your Shipping & Returns information.');

Change it to:

define('TEXT_INFORMATION', '');

Now, you can create a shipping.php.html template with any text you want in the same manner you would when creating any other type of web page.

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

Hey Bill

 

The error is caused when you try to remove an item from your shopping cart while the shopping cart url is secure.

so you need to have something in the cart, and be at https://www.website.shopping_cart.php. Then click the remove box and select update.

 

On some browsers, the error has been turned off, like in IE it gives you the choice.

 

But the error is about sending data over an unsecure connection.

 

Because the "remove from cart" information is sent from https//:(secure) directly to a http://(unsecure) in the update button, because when the page is refreshed after updating it becomes regular unsecure.

Link to comment
Share on other sites

To assist in narrowing this down....Is your shop a stock osC shop (meaning you do not have any other contributions added except for STS)? If not, what other contributions do you have installed?

 

My line of thinking here is that some of the stock osC code was modified to make a certain contribution work, however, it is not to osC standards and therefore STS has trouble with it. This would explain why your shop "appears" to be OK with STS turned off.

 

Also, if your shop is a stock osC shop, you may have some settings that STS is not agreeing with. Is your shop configured the same as it was at the time of the osC installation? Do you have "Search Engine Friendly URLS" set to "False" (it should always be set to False btw)?

 

I'll wait for your response.

Thanks Julian. :thumbsup:

 

 

Hello bill,

 

i have a auspost, lightbox and otf_auto_thumb installed. My osC install is stock standard except for the changes required for the contribs, the search engine setting is false.

Link to comment
Share on other sites

Now, you can create a shipping.php.html template with any text you want in the same manner you would when creating any other type of web page.

 

 

bill, if i create a shipping.php.html file with my shipping info text and put it my sts template directory (test btw). when i click on the shipping link i just get the shipping info. with nothing else. Am i meant to create the whole page with info boxes and menus?

Link to comment
Share on other sites

John,

That should already be the case unless I am misunderstanding your question.

 

On my site I have a STS category....

You can click on STSv4.5.8 and be taken to the product_info page for this product....

The only other text is the "Customers who bought this product also..."

 

Are you not gettting the same results?

 

Bill,

You understood me correct!

No I am not getting that result. When taken to the product_info page I get the index.php_XX.html text listed under my product as well.

 

(The only contribution installed is STS btw.)

 

I see now when i hover my product links they are named: http://xxx.product_info.php?cPath=23&products_id=79

Not: http://product_info.php?products_id=79

 

That should be the error.. Now I just wonder why that happened and how to fix it...

 

Thanks!

Edited by Amrahp
Link to comment
Share on other sites

Hey Bill

 

The error is caused when you try to remove an item from your shopping cart while the shopping cart url is secure.

so you need to have something in the cart, and be at https://www.website.shopping_cart.php. Then click the remove box and select update.

 

On some browsers, the error has been turned off, like in IE it gives you the choice.

 

But the error is about sending data over an unsecure connection.

 

Because the "remove from cart" information is sent from https//:(secure) directly to a http://(unsecure) in the update button, because when the page is refreshed after updating it becomes regular unsecure.

 

Most likely you have an image in your template that is http://yoursite.com/images/imagename.jpg instead of images/imagename.jpg. If you never get the errors when STS is off it is definitely your template.

 

I have several sites running STS with various other contributions and never had a problem except when I have to change my config files or includes/application_top.php to match my sever configuration

Powered By osC 2.2RC2a STS 4.5.8 - HTC 2.6.3 - FP 1.5.9 - BCH 1.0.0

Link to comment
Share on other sites

Bill,

You understood me correct!

No I am not getting that result. When taken to the product_info page I get the index.php_XX.html text listed under my product as well.

 

(The only contribution installed is STS btw.)

 

I see now when i hover my product links they are named: http://xxx.product_info.php?cPath=23&products_id=79

Not: http://product_info.php?products_id=79

 

That should be the error.. Now I just wonder why that happened and how to fix it...

 

Thanks!

 

Sorry... Some new info to clarify...

 

I have only one product listed like: http://xxx.product_info.php?cPath=23&products_id=79 so that shouldn´t be the problem I guess.

The rest are named like this: http://xxx.product_info.php?products_id=79.

But in all the cases when the product is clicked the category info gets listed as well (index.php_xx.html)

 

This is driving me nuts! :'( :'(

 

Any help highly appreciated!

Link to comment
Share on other sites

Sorry... Some new info to clarify...

 

I have only one product listed like: http://xxx.product_info.php?cPath=23&products_id=79 so that shouldn´t be the problem I guess.

The rest are named like this: http://xxx.product_info.php?products_id=79.

But in all the cases when the product is clicked the category info gets listed as well (index.php_xx.html)

 

This is driving me nuts! :'( :'(

 

Any help highly appreciated!

John, that doesn't look correct.

This looks like you do not have your cert configured correctly. By the way...did you happen to set the "Use Search Engine Friendly URLS" to true in your admin? This should never be enabled.

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

John, that doesn't look correct.

This looks like you do not have your cert configured correctly. By the way...did you happen to set the "Use Search Engine Friendly URLS" to true in your admin? This should never be enabled.

Hi again.

 

"cert"??

 

No SEF has always been set to "false"

Link to comment
Share on other sites

Hi again.

 

"cert"??

 

No SEF has always been set to "false"

Sorry John...I got your post mixed up with another post. :blush:

 

I know you have made some changes in the PHP code regarding your products so I would start with comparing your changes with a stock osCommerce file and "reverse engineer" to help find where the problem lies. Keep a backup of course so that way if you don't find the answer you could at least get back to where you are now.

 

The only reason I suggested the SEF setting is because changing that to true would make your shop very erratic and do strange things like yours is doing.

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

Sorry John...I got your post mixed up with another post. :blush:

 

I know you have made some changes in the PHP code regarding your products so I would start with comparing your changes with a stock osCommerce file and "reverse engineer" to help find where the problem lies. Keep a backup of course so that way if you don't find the answer you could at least get back to where you are now.

 

The only reason I suggested the SEF setting is because changing that to true would make your shop very erratic and do strange things like yours is doing.

 

Ok... :thumbsup:

 

Thanks for your time and effort Bill! I have already started my "reverse quest" and will see where it takes me! ;)

Link to comment
Share on other sites

A small update regarding my problem...

 

As a test; I did create some sub categories and copied my products into them in the admin panel. The categoy text is NOT listed! A small step forward or not.. I´m not sure yet. >_<

Link to comment
Share on other sites

Hey Bill,

 

I have a question that you might be able to help with, I have installed osC-PrintOrder with Store Logo and have been able to get everything to work except the pop-up invoice on the customer side, instead of showing the invoice it shows my template.

 

There was a fix for the earlier versions of STS, found here, but that does not work with the current versions.

 

Would you have any idea how to work around this?

Powered By osC 2.2RC2a STS 4.5.8 - HTC 2.6.3 - FP 1.5.9 - BCH 1.0.0

Link to comment
Share on other sites

Hey Bill,

 

I have a question that you might be able to help with, I have installed osC-PrintOrder with Store Logo and have been able to get everything to work except the pop-up invoice on the customer side, instead of showing the invoice it shows my template.

 

There was a fix for the earlier versions of STS, found here, but that does not work with the current versions.

 

Would you have any idea how to work around this?

The newer versions of STS use the same concept but with a different STS file:

 

How to exclude a page from being templated in STSv4.5.x:

 

In the sts_default.php file, find the following code:

if (strstr($scriptbasename, "popup") || strstr($scriptbasename, "info_shopping_cart"))
  return ''; // We don't use template for these scripts

Add your php file that you want STS to exclude and it will not template that file. Note: Add the script name as follows:

if (strstr($scriptbasename, "popup") || strstr($scriptbasename, "your_script_here")|| strstr($scriptbasename, "info_shopping_cart"))
  return ''; // We don't use template for these scripts

 

That should do the trick for you.

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

Link to comment
Share on other sites

Thank you very much, went through both sts_display_output.php files thinking I missed it somewhere, but it looks like i was looking in the wrong file to begin with anyways. That fixed it, now I can go and get some sleep.

 

Thank you again Bill. :thumbsup:

Powered By osC 2.2RC2a STS 4.5.8 - HTC 2.6.3 - FP 1.5.9 - BCH 1.0.0

Link to comment
Share on other sites

What I have done now is to set "Use template for product info page" to false. In that way the categories text won´t show under my products!

So I have been forced to edit the "product_info.php" to get the look I want for the time being.

That is ok for now since I haven't been able to find what is causing my problem.

 

But after I did this I can´t get HTC to work properly! :angry:

 

It worked really nice before I disabled the product template and showed title tags for all my categories and products. Now the titel tag is only shown in the categories pages, not in the products! :angry: :angry:

 

Maybe this is supposed to be posted in the HTC thread (if so I'm sorry!) but since you are familiar with my problem Bill maybe you have any thoughts on this.

 

Thanks again! :thumbsup:

Link to comment
Share on other sites

What I have done now is to set "Use template for product info page" to false. In that way the categories text won´t show under my products!

So I have been forced to edit the "product_info.php" to get the look I want for the time being.

That is ok for now since I haven't been able to find what is causing my problem.

 

But after I did this I can´t get HTC to work properly! :angry:

 

It worked really nice before I disabled the product template and showed title tags for all my categories and products. Now the titel tag is only shown in the categories pages, not in the products! :angry: :angry:

 

Maybe this is supposed to be posted in the HTC thread (if so I'm sorry!) but since you are familiar with my problem Bill maybe you have any thoughts on this.

 

Thanks again! :thumbsup:

Bingo John!

Now I have enough info to diagnose your problem. A couple of things to look at....

 

You are seeing your category info on your product pages most likely from the HTC info that you inserted in the admin. You should check that you installed HTC according to my step by step instructions (see link in my signature below). NOTE: You should not add any of the HTC edits on the catalog side (admin side is OK) since STS will populate that info for you automatically. One exception would be the index.php edits (optional). However, if you make the HTC edits to the index.php page, this could be the category text that is showing up on your product pages.

 

What templates are you using (list each template inside your template folder)?

 

Thanks,

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

Bingo John!

Now I have enough info to diagnose your problem. A couple of things to look at....

 

You are seeing your category info on your product pages most likely from the HTC info that you inserted in the admin. You should check that you installed HTC according to my step by step instructions (see link in my signature below). NOTE: You should not add any of the HTC edits on the catalog side (admin side is OK) since STS will populate that info for you automatically. One exception would be the index.php edits (optional). However, if you make the HTC edits to the index.php page, this could be the category text that is showing up on your product pages.

 

What templates are you using (list each template inside your template folder)?

 

Thanks,

 

Hello Guru! :thumbsup:

 

Well Bill first of all... I did install HTC just recently and that was AFTER I had problems with the category text listing. :'(

 

I did follow your directions to 100% and didn't install anything on the catalog side.

 

In my /sts_templates/full/ I have:

 

index.php_0.html

index.php_21.html ->index.php_72.html

 

I also have sts_template.html and index.php.html but are yet not sure if they ever are used anymore? :blink:

 

Furthermore (probably not that interesting):

about_us.php.html

contact_us.php.html

create_account_success.php.html

faq.php.html

login.php.html

logoff.php.html

popup_image.php.html

privacy.php.html

shipping.php.html

shoppping_cart.php.html

 

My /sts_templates/full/content/ is empty.

 

I really don´t care anymore if I can't use the product_info.php_XX.html template. I will manage to make a good looking product.info.php, from what I have learned from you and the forum, that will make me satisfied enough I guess.

 

All I want now (well almost) is HTC to work ok... :blush:

 

Thanks!! :thumbsup:

Link to comment
Share on other sites

Hello Guru! :thumbsup:

 

Well Bill first of all... I did install HTC just recently and that was AFTER I had problems with the category text listing. :'(

 

I did follow your directions to 100% and didn't install anything on the catalog side.

 

In my /sts_templates/full/ I have:

 

index.php_0.html

index.php_21.html ->index.php_72.html

 

I also have sts_template.html and index.php.html but are yet not sure if they ever are used anymore? :blink:

 

Furthermore (probably not that interesting):

about_us.php.html

contact_us.php.html

create_account_success.php.html

faq.php.html

login.php.html

logoff.php.html

popup_image.php.html

privacy.php.html

shipping.php.html

shoppping_cart.php.html

 

My /sts_templates/full/content/ is empty.

 

I really don´t care anymore if I can't use the product_info.php_XX.html template. I will manage to make a good looking product.info.php, from what I have learned from you and the forum, that will make me satisfied enough I guess.

 

All I want now (well almost) is HTC to work ok... :blush:

 

Thanks!! :thumbsup:

If you followed my step by step while installing HTC, and you have the $headcontent tag in the head section of each of your template pages, and have not added the code suggested in the HTC contribution installation (STS does this for you), then HTC should be working.

 

Run the Fill Tags in the HTC module to populate your metatags.

 

Also, you should read up in the doc folder each of the module instructions. You will learn how STS calls up each template and why. You will notice that if no specific template is in your template folder, then STS will use the default template. The default template is chosen in the STS Default Module in the admin. The "out of the box" default template is "sts_template.html".

 

The index.php.html template that is in your template folder will be used for every category page that does not have a specific template created for it. The sts_template.html template in your templates folder will be used for every other page in your shop that does not have a specific template created for it. For ex: You created a privacy.php.html template, therefore, STS will use this template for the privacy.php page and not the default template.

 

So...I think your issues with the category text being displayed is most likely a setting that you changed in one of the STS Modules. Change the settings to thier default settings ,especially the "files to include" field.

 

Hope this helps,

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

If you followed my step by step while installing HTC, and you have the $headcontent tag in the head section of each of your template pages, and have not added the code suggested in the HTC contribution installation (STS does this for you), then HTC should be working.

 

Run the Fill Tags in the HTC module to populate your metatags.

 

Also, you should read up in the doc folder each of the module instructions. You will learn how STS calls up each template and why. You will notice that if no specific template is in your template folder, then STS will use the default template. The default template is chosen in the STS Default Module in the admin. The "out of the box" default template is "sts_template.html".

 

The index.php.html template that is in your template folder will be used for every category page that does not have a specific template created for it. The sts_template.html template in your templates folder will be used for every other page in your shop that does not have a specific template created for it. For ex: You created a privacy.php.html template, therefore, STS will use this template for the privacy.php page and not the default template.

 

So...I think your issues with the category text being displayed is most likely a setting that you changed in one of the STS Modules. Change the settings to thier default settings ,especially the "files to include" field.

 

Hope this helps,

 

You truly are a star with you answers, knowledge and willingness to help!! I will look into these things you have suggested and send out a big thanks again!

 

:thumbsup: :thumbsup: :thumbsup:

Link to comment
Share on other sites

Hi am looking for a way to make a custom category listing, so when you click on a cat in the menu you get the products displayed similarily to the "new products for" at the bottom of the main index, e.g. (see attached) pic..

 

Also, how can I get the "Specials" listed on the index page also.

 

newcatstyle.png

Link to comment
Share on other sites

 

You may want to take a look at the Featured Products contribution (I have uploaded a version with detailed STS instructions. http://www.oscommerce.com/community/contributions,651

 

For the Specials, are you referring to the image as well or just wanting to add the specials.php box to the front page? If it is the latter, just add the $specialsbox tag to your home page.

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...