Jump to content
Latest News: (loading..)
eaglik

add to cart / buy now with SSL - Solved ?

Recommended Posts

Recently been having problems with shopping cart and the buy now  / add to cart buttons after forcing my site to HTTPS.

Prior to that all worked fine but after forcing the site to HTTPS I had problems with Buy Now and Add to Cart buttons. (My hosting provider had an option to force entire site to HTTPS which I used, so whether your type in http or https you go to the https version )

Buy Now would work from the catergory pages but the Add to Cart Button on the product detail page would go through the motions but not actually add anyting to the shopping carts

Made the changes in the config files but still the same answer.

This is what I changed it to originally  ( also tried entering data in the cookie path fields but still no joy )

<?php
  define('HTTP_SERVER', 'http://www.hgvremaps.co.uk');
  define('HTTPS_SERVER', 'https://www.hgvremaps.co.uk');
  define('ENABLE_SSL', true);
  define('HTTP_COOKIE_DOMAIN', 'hgvremaps.co.uk');
  define('HTTPS_COOKIE_DOMAIN', 'hgvremaps.co.uk');
  define('HTTP_COOKIE_PATH', '/');
  define('HTTPS_COOKIE_PATH', '/');
  define('DIR_WS_HTTP_CATALOG', '/');
  define('DIR_WS_HTTPS_CATALOG', '/');

 

But I could not get it to work properly. 

Everything I read suggest there was a problem with passing data between cookie domains.

I tired all kinds of suggestions I found on these forums and others but still no joy.

 

In the end I changed it to this

<?php
  define('HTTP_SERVER', 'https://www.hgvremaps.co.uk');
  define('HTTPS_SERVER', 'https://www.hgvremaps.co.uk');
  define('ENABLE_SSL', true);
  define('HTTP_COOKIE_DOMAIN', 'hgvremaps.co.uk');
  define('HTTPS_COOKIE_DOMAIN', 'hgvremaps.co.uk');
  define('HTTP_COOKIE_PATH', '/');
  define('HTTPS_COOKIE_PATH', '/');
  define('DIR_WS_HTTP_CATALOG', '/');
  define('DIR_WS_HTTPS_CATALOG', '/');

Note the HTTP server is now shown as HTTPS on the first line

This worked a treat for me and the shopping cart and buy and add buttons work fine

Whether this is simply a function of how my own hosting provider forces the https connections or whether this will help others with similar problems I am not sure. 

If all else fails give it a try, it might work for you.


Thanks

Kevin Eagling

KEE Automotive Ltd

Share this post


Link to post
Share on other sites

Also change:

define('HTTP_COOKIE_DOMAIN', 'hgvremaps.co.uk');
define('HTTPS_COOKIE_DOMAIN', 'hgvremaps.co.uk');

To:

define('HTTP_COOKIE_DOMAIN', '.hgvremaps.co.uk');
define('HTTPS_COOKIE_DOMAIN', '.hgvremaps.co.uk');

 


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest current code (community-supported responsive 2.3.4.1BS Edge) here

 

Share this post


Link to post
Share on other sites

Not sure what those extra “ . “  do but I have not included them and it seems to work without. 

 

Maybe as they were missing they caused some of the problems I had ?


Thanks

Kevin Eagling

KEE Automotive Ltd

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

×