If you're using a shared SSL certificate, make sure you change your HTTPS_COOKIE_DOMAIN to match your HTTPS_SERVER domain in configure.php so your session will be carried across. I've seen several configure.php files posted here that made that same mistake. Sessions use cookies, and cookies are inherently tied to domains such that a cookie from one domain cannot be accessed by another domain. So if both HTTPS domain settings do not match, the cookie will be created for one domain, and inaccessible by the other when hopping back and forth between http and https protocols.
Correct config example:
Code:
// Define the webserver and path parameters
// * DIR_FS_* = Filesystem directories (local/physical)
// * DIR_WS_* = Webserver directories (virtual/URL)
define('HTTP_SERVER', 'http://webpage.com'); // eg, http://localhost - should not be empty for productive servers
define('HTTPS_SERVER', 'https://www.sslserver.com/webpage'); // eg, https://localhost - should not be empty for productive servers
define('ENABLE_SSL', true); // secure webserver for checkout procedure?
define('HTTP_COOKIE_DOMAIN', 'webpage.com');
define('HTTPS_COOKIE_DOMAIN', 'www.sslserver.com');
...
...
...
The behavior I was seeing was very similar to what I've seen others report elsewhere in the forums:
- Customer logs and adds some things to the cart
- Customer goes to check out and is met with the login screen again, and after logging in again, their cart is empty.
- The cycle repeats itself
I just spent an hour and a half troubleshooting this issue and couldn't find this simple answer anywhere in the forums to what seems to be a very commonplace problem. Granted, there are several things which can cause similar behavior in OSC, so here's one more possible solution. Hope it helps!
Bookmarks