Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Cookie Transfer from HTTP to HTTPS


olajideolaolorun

Recommended Posts

Posted

Hi, well if anyone knows I posted a topic here some days ago about getting cookie errors on the ssl connection, well I already got that fixed and everyhting works perfectly except that cookies from the http connection are not being transfered to the secure connection.

 

For example, if I was to buy a product in the http connection and move to the checkout... my secure cart is gone....

 

I think it is because of the cookie, but I have tried everything I can...

 

This is part of my CONFIGURE.PHP

 

  define('HTTP_SERVER', 'http://www.agapejewelry.com'); // eg, http://localhost  
 define('HTTPS_SERVER', 'https://st05.startlogic.com/~agapejew'); // eg, https://localhost 
 define('ENABLE_SSL', true); // secure webserver for checkout procedure?
 define('ENABLE_SSL_CATALOG', true); 
 define('HTTP_COOKIE_DOMAIN', 'agapejewelry.com');
 define('HTTPS_COOKIE_DOMAIN', 'st05.startlogic.com');
 define('HTTP_COOKIE_PATH', '/store');
 define('HTTPS_COOKIE_PATH', '/~agapejew/store');
 define('DIR_WS_HTTP_CATALOG', '/store/');
 define('DIR_WS_HTTPS_CATALOG', '/store/');

 

This is my second CONFIGURE.PHP for another site

 

  define('HTTP_SERVER', 'http://store.baloinc.com'); // eg, http://localhost - 
 define('HTTPS_SERVER', 'https://69.9.164.194/~baloinc/store'); // eg, https://localhost - 
 define('ENABLE_SSL', true); // secure webserver for checkout procedure?
 define('ENABLE_SSL_CATALOG', true); 
 define('HTTP_COOKIE_DOMAIN', 'store.baloinc.com');
 define('HTTPS_COOKIE_DOMAIN', '69.9.164.194');
 define('HTTP_COOKIE_PATH', '/');
 define('HTTPS_COOKIE_PATH', '/~baloinc/store/');
 define('DIR_WS_HTTP_CATALOG', '/');
 define('DIR_WS_HTTPS_CATALOG', '/');

 

Please if anyone can help, please reply....

Best Reagrds

Olajide Olaolorun

Posted

You're using shared SSL, so that the domain for the HTTPS pages is different from that of the HTTP pages. If you force cookies, you'll lose context, because cookies CAN NOT be shared across different domains.

 

The way to deal with this in osC is to NOT force cookies on. Then PowWeb will pass the session ID when it switches modes. That's how it works on my store.

Posted

So how do I not force cookies...

 

By turning ENABLE_SSL off?

 

And what do I do after that when you say the PowWeb will do something... what is the powwed?

Best Reagrds

Olajide Olaolorun

Posted

turn it off in your admin panel log in go to configure --- sessions-- 2nd option (Force Cookies) set to false

Posted

Thanks men... I have been trying to get everything to work since forever...

 

Thanks a lot for this great script OSC Team and hoping for the next release soon... :D

 

:D

:)

Best Reagrds

Olajide Olaolorun

Posted
You're using shared SSL, so that the domain for the HTTPS pages is different from that of the HTTP pages. If you force cookies, you'll lose context, because cookies CAN NOT be shared across different domains.

 

The way to deal with this in osC is to NOT force cookies on. Then PowWeb will pass the session ID when it switches modes. That's how it works on my store.

thanks helped me too

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...