ArtcoInc Posted July 17, 2017 Share Posted July 17, 2017 osCommerce 2.3.4 Responsive (pre-Gold) *** Solution below *** Problem: I can add an item to the shopping cart, I can delete the item from the cart, but I can not adjust the quantity. When I change the quantity and click on the refresh button, the quantity reverts back to 1. History: The site has been live for almost 2 years. Initially, the site did not have an SSL certificate on it. To the best of my knowledge, the ability to adjust the quantity worked in the past. A few months ago, I added a full-site SSL certificate. Today, a customer complained that they could not adjust the quantity in the shopping cart. I tested the site, and found this to be true. Debugging using console, I see this warning ... Quote shopping_cart.php:300 Mixed Content: The page at 'https://www.<domain>.com/catalog/shopping_cart.php' was loaded over a secure connection, but contains a form which targets an insecure endpoint 'http://www.<domain>.com/catalog/shopping_cart.php?action=update_product'. This endpoint should be made available over a secure connection. Solution: In shopping_cart.php ... Find <?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_SHOPPING_CART, 'action=update_product')); ?> Replace with: <?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_SHOPPING_CART, 'action=update_product', $request_type)); ?> tep_href_link() defaults to a non-ssl link UNLESS specifically told otherwise! This created the Mixed Content error, preventing the quantity to be adjusted. With this change, the quantity update function now works I had run into the same problem with the contact_us page. I think that the entire store needs to be gone through, and all instances of tep_href_link() should be updated. HTH Malcolm Link to comment Share on other sites More sharing options...
♥raiwa Posted July 17, 2017 Share Posted July 17, 2017 Why not change the tep_href_link function to default ssl instead? About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥raiwa Posted July 17, 2017 Share Posted July 17, 2017 And just to be sure: you changed in configure.php: HTTP_SERVER also to https:// , if yes then this shouldn't happen. About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
ArtcoInc Posted July 17, 2017 Author Share Posted July 17, 2017 @raiwa define('HTTP_SERVER', 'http://www.<domain>.com'); define('HTTPS_SERVER', 'https://www.<domain>.com'); define('ENABLE_SSL', true); Malcolm Link to comment Share on other sites More sharing options...
♥raiwa Posted July 17, 2017 Share Posted July 17, 2017 Malcolm @ArtcoInc Change to this and you will not have any more problems with it except for hardcoded links which do not use the tep_href_link function: define('HTTP_SERVER', 'https://www.<domain>.com'); thats the trick to make all your store ssl without bothering about changing all the links About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
ArtcoInc Posted July 17, 2017 Author Share Posted July 17, 2017 @raiwa 38 minutes ago, raiwa said: Why not change the tep_href_link function to default ssl instead? Because I am trying not to change 'core files' 24 minutes ago, raiwa said: Malcolm @ArtcoInc Change to this and you will not have any more problems with it except for hardcoded links which do not use the tep_href_link function: define('HTTP_SERVER', 'https://www.<domain>.com'); thats the trick to make all your store ssl without bothering about changing all the links Changed. And the quantity still can be adjusted. Thank you! Malcolm Link to comment Share on other sites More sharing options...
♥raiwa Posted July 17, 2017 Share Posted July 17, 2017 Malcolm @ArtcoInc, there are some hardcoded links in the social bookmark modules which produce ssl validation errors if I well remember. You might like to check and change them if you use them. About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
ArtcoInc Posted July 17, 2017 Author Share Posted July 17, 2017 @raiwa Thank you. Malcolm Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.