Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / General Questions / Notice of Combining Shopping Cart > Login > Secure Shopping Cart > Security Warning

Notice of Combining Shopping Cart > Login > Secure Shopping Cart > Security Warning

Locked
This thread is locked. New replies are disabled.
4 Mar 2008, 2:44 PM
#1
dharma avatar

dharma

Totally Zenned

Join Date:
Nov 2006
Posts:
505
Plugin Contributions:
0

Post #1 by dharma

I like the new 1.3.8a feature of being directed to the Shopping Cart to view cart items from the last visit and see the notice of combined items.

However, If an existing customer shops>goes to checkout (via login page) they land on an https secure shopping cart page, then when using the "update cart" button a security warning appears.

Aside from changing the admin setting of not going to the cart page (which I like), is there a way around the update cart button giving off a security warning?

Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41

4 Mar 2008, 4:17 PM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Post #2 by schoolboy

A security warning appears when components of a HTTPS page are actually HTTP. This commonly occurs when remote http:// URL's are embedded into the page (either through hard-coding, or through being called via a script that has not pre-defined the link as https or SSL.)

If you are getting the warning, when it says "do you want to show the insecure items?" - - - choose "No".

In this way you will be able to see what the non-secure component of the page is - because it won't display.

Then you've narrowed down the offending http:// reference, and you can then look at how it can be changed - either by modifying the code calling the link, or by using https:// rather than http:// as the URL prefix.

20 years a Zencart User

4 Mar 2008, 4:51 PM
#3
dharma avatar

dharma

Totally Zenned

Join Date:
Nov 2006
Posts:
505
Plugin Contributions:
0

Post #3 by dharma

Thank you for the tip! I didn't know about the trick about how to view what is non-secure.

For this page, the non-secure link is the ZC "update cart" action itself:

<?php echo zen_draw_form('cart_quantity', zen_href_link(FILENAME_SHOPPING_CART, 'action=update_product')); ?>

If the shopping cart is in https (fresh off the login page), and the customer wishes to update their cart using the "update cart" button, that is what is giving the warning.

I have changed the above code to SSL which works, but then the shopping cart goes SSL after each update:wacko:

I could be changing the wrong code...there are other references to the update cart button, that are beyond my knowledge on this page.

Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41

4 Mar 2008, 5:53 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #4 by drbyte

dharma:

Thank you for the tip! I didn't know about the trick about how to view what is non-secure.There's an FAQ on that issue too: https://www.zen-cart.com/tutorials/index.php?article=150

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

4 Mar 2008, 6:16 PM
#5
dharma avatar

dharma

Totally Zenned

Join Date:
Nov 2006
Posts:
505
Plugin Contributions:
0

Post #5 by dharma

Thank you Dr. Byte, that is a good page for reference, I am aware of non-secure warnings due to img etc and full URL's. But my issue appears to be php ZC related, that is the update cart button sends the "update" as non SSL from a SSL page (if landing from login page (https: shopping cart) due to the Notice of Combining Shopping Cart setting.

Has anyone else noticed this? or have I got this all wrong?

Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41

4 Mar 2008, 6:28 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #6 by drbyte

If you want your shopping cart page to be SSL when the "combined" action happens, change the NONSSL to SSL in this section of your /includes/modules/pages/login/header_php.php:```
if (SHOW_SHOPPING_CART_COMBINED == 1) {
// show warning and send to shopping cart for review
$messageStack->add_session('shopping_cart', WARNING_SHOPPING_CART_COMBINED, 'caution');
zen_redirect(zen_href_link(FILENAME_SHOPPING_CART, '', '[B]NONSSL[/B]'));
}

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

4 Mar 2008, 7:17 PM
#7
dharma avatar

dharma

Totally Zenned

Join Date:
Nov 2006
Posts:
505
Plugin Contributions:
0

Post #7 by dharma

Your code works well, however the shopping cart page is already SSL (as is every page right after the login page) Is there a solution to this? I would love to fix that more than anything.

--

if not the issue still persists:

So far this error appears in Firefox for Mac not in Safari Mac...I have not checked in IE yet.

How do I change the update cart action to SSL? to avoid the warning and but not force the shopping cart page to go SSL afterwards? (see previous post)

Would work:
Login>Combined SSL Shopping cart (sadly forced by login)> SSL Update Cart action [no warnings] > NON SSL Shopping cart

Ideally:
Login>Combined NON SSL Shopping cart > NON SSL Update Cart action > NON SSL Shopping cart

Update cart:

<?php echo zen_draw_form('cart_quantity', zen_href_link(FILENAME_SHOPPING_CART, 'action=update_product')); ?>

Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41

4 Mar 2008, 7:28 PM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #8 by drbyte

If you want to change those links to SSL, just add the SSL parameter ... same format as my previous post.

If you'd rather your shopping cart were not SSL, then turn off the combined-contents-goes-to-cart.

Switching between modes can be tough to code for. Keep in mind that the shopping cart page before login is not SSL-protected. After login, it normally is not either, unless you come back to it from the checkout-confirmation page in order to change something in the cart at the last minute.

Do you have the same options set in all your different browsers with respect to how they alert you to ssl issues? Seems like you've got one browser complaining but others are not. Maybe it's just how you've got that set up.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

4 Mar 2008, 7:45 PM
#9
dharma avatar

dharma

Totally Zenned

Join Date:
Nov 2006
Posts:
505
Plugin Contributions:
0

Post #9 by dharma

Yes good old number 2 is looking good right now:

2= Yes show notice, but do not go to shopping cart

However, unless combined shipping is off completely, customers will still end up on the SSL shopping cart page (if there is a stock issue).

Maybe a work around would be to force the next page after login to always be the My Accounts page?

But for now hello #2!

Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41

14 Nov 2008, 12:40 AM
#10
fireflyz avatar

fireflyz

New Zenner

Join Date:
May 2007
Location:
Los Angeles
Posts:
89
Plugin Contributions:
0

Post #10 by fireflyz

dharma:

Yes good old number 2 is looking good right now:

However, unless combined shipping is off completely, customers will still end up on the SSL shopping cart page (if there is a stock issue).

Maybe a work around would be to force the next page after login to always be the My Accounts page?

But for now hello #2!
Hi, I have the same issue. Where in admin you can turn off combining shopping cart?
Thanks!

14 Nov 2008, 12:43 AM
#11
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #11 by drbyte

Fireflyz:

Where in admin you can turn off combining shopping cart?
There is no option to turn it off via admin in the current version of Zen Cart.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

14 Nov 2008, 1:10 AM
#12
fireflyz avatar

fireflyz

New Zenner

Join Date:
May 2007
Location:
Los Angeles
Posts:
89
Plugin Contributions:
0

Post #12 by fireflyz

DrByte:

There is no option to turn it off via admin in the current version of Zen Cart.

Thanks DrByte!
I tried your suggestion on post #6 but I'm still getting this SSL warning when I try to remove previous items in the cart by using Update button:
"Although this page is encrypted, the information you have entered is to be sent over an unencrypted connection and could easily be read by a third party."

How about manually disabling the feature so no previous cart is saved?
Thanks a lot!

14 Nov 2008, 1:31 AM
#13
dharma avatar

dharma

Totally Zenned

Join Date:
Nov 2006
Posts:
505
Plugin Contributions:
0

Post #13 by dharma

DrByte:

There is no option to turn it off via admin in the current version of Zen Cart.

dharma:

Yes good old number 2 is looking good right now:

However, unless combined shipping is off completely, customers will still end up on the SSL shopping cart page (if there is a stock issue).

Maybe a work around would be to force the next page after login to always be the My Accounts page?

But for now hello #2!

Without a massive re-write of the current ZC code, your best option is set your admin to >2= Yes show notice, but do not go to shopping cart.

This will avoid landing on the cart page in SSL:wink:

Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41

14 Nov 2008, 1:49 AM
#14
fireflyz avatar

fireflyz

New Zenner

Join Date:
May 2007
Location:
Los Angeles
Posts:
89
Plugin Contributions:
0

Post #14 by fireflyz

dharma:

Without a massive re-write of the current ZC code, your best option is set your admin to >2= Yes show notice, but do not go to shopping cart.

This will avoid landing on the cart page in SSL:wink:

Thanks for the reply.
How are the visitors supposed to remove the previous items then? I want every page SSL once logged in without any SSL warnings (stay in checkout process).
When I use option 2 as you mentioned, I get multiple notices (one for each previous item) and taken to "Shipping Information" page without a chance to remove previous items from the cart.

14 Nov 2008, 2:20 AM
#15
dharma avatar

dharma

Totally Zenned

Join Date:
Nov 2006
Posts:
505
Plugin Contributions:
0

Post #15 by dharma

Customers once they see the warning will have to navigate back to the shopping cart page. The cart page does not need to be secure, when they go back to cart page, there will be no warning about secure items, once they adjust the cart and continue back to CO..The checkout process is all on secure pages.

Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41

14 Nov 2008, 2:38 AM
#16
fireflyz avatar

fireflyz

New Zenner

Join Date:
May 2007
Location:
Los Angeles
Posts:
89
Plugin Contributions:
0

Post #16 by fireflyz

dharma:

Customers once they see the warning will have to navigate back to the shopping cart page. The cart page does not need to be secure, when they go back to cart page, there will be no warning about secure items, once they adjust the cart and continue back to CO..The checkout process is all on secure pages.
Once customers are in the shopping cart or checkout process, they hesitate using back button and also my customers average age is 50+ and most of them are not very computer savvy. It just doesn't make sense to me in terms of marketing and user friendliness. Thank you though!

15 Nov 2008, 5:20 PM
#17
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #17 by ajeh

You can alter this to have the shopping_cart know whether it is secure or non-secure when the submit(s) are hit on the page ...

In the tpl_shopping_cart_default.php you can change the form line around line 32 or so to:

<?php echo zen_draw_form('cart_quantity', zen_href_link(FILENAME_SHOPPING_CART, 'action=update_product', $request_type)); ?>

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

16 Nov 2008, 6:02 PM
#18
fireflyz avatar

fireflyz

New Zenner

Join Date:
May 2007
Location:
Los Angeles
Posts:
89
Plugin Contributions:
0

Post #18 by fireflyz

Ajeh:

You can alter this to have the shopping_cart know whether it is secure or non-secure when the submit(s) are hit on the page ...

In the tpl_shopping_cart_default.php you can change the form line around line 32 or so to:

<?php echo zen_draw_form('cart_quantity', zen_href_link(FILENAME_SHOPPING_CART, 'action=update_product', $request_type)); ?>

Ajeh,
Thank you for the help. That was exactly what I wanted..  :hug: Have a nice sunday!
16 Nov 2008, 8:26 PM
#19
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #19 by ajeh

You are most welcome ... glad that this solution worked for you ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

22 Nov 2008, 5:11 PM
#20
dharma avatar

dharma

Totally Zenned

Join Date:
Nov 2006
Posts:
505
Plugin Contributions:
0

Post #20 by dharma

I am getting the same security message on another page which is an SSL page.

Is there any way to make this code/update button send the update as SSL (thus no warning):

<div class="buttonRow back"><?php echo zen_image_submit(UN_BUTTON_IMAGE_SAVE, UN_BUTTON_SAVE_ALT); ?></div>

I have tried to place a ```php
'SSL'


Any suggestions?:unsure:

Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41