Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Cart empties on checkout, user must log in again


Recommended Posts



Users are able to add products to their cart normally on my new site (user "bit-bucket@wjarchitects.com", pass "testpass"), but when they go to check out, they are asked to log in again. After logging in again, they are taken to checkout, which then says that the cart is empty.


If the user goes back to shopping, their cart is miraculously filled up with items again, but if they try to checkout again, they are asked to log in again and around and around we go.


Sounds like a little session problem, right? checkout_shipping.php (v1.16 2003/06/09 23:03:53) starts off with:



// if the customer is not logged on, redirect them to the login page
 if (!tep_session_is_registered('customer_id')) {
   tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));


so it looks like the session is becoming unregistered. But the session is handled through includes/application_top.php, which handles it for every page, so why should it be different here?


I appreciate any help :blink:


- Miles

Link to comment
Share on other sites

when they check out, osC checks to see if they're logged in. If not, it redirects them to login.php.


Does the same thing happen when they login? I suspect it does.


Check your cookie and domain settings in configure.php.



Link to comment
Share on other sites

Yep, when the user logs in, it only remembers who they are on the page immediately after the login page.


Isn't it strange that you can continuously add items and it remembers what they all are until you try to log in though? Or is that information not stored in the cookie?


Part of my configure.php:

  define('HTTP_SERVER', 'http://southcountrycyder.com'); 
 define('HTTPS_SERVER', 'https://southcountry.secure.powweb.com');
 define('ENABLE_SSL', true);
 define('HTTP_COOKIE_DOMAIN', '.southcountrycyder.com');
 define('HTTPS_COOKIE_DOMAIN', '.southcountrycyder.com');
 define('HTTP_COOKIE_PATH', '/');
 define('HTTPS_COOKIE_PATH', '/');
 define('DIR_WS_HTTP_CATALOG', '/osCommerce/catalog/');
 define('DIR_WS_HTTPS_CATALOG', '/osCommerce/catalog/');
 define('DIR_WS_IMAGES', '/osCommerce/catalog/images/');
 define('DIR_FS_CATALOG', '/www/s/southcountry/htdocs/osCommerce/catalog/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 define('DIR_WS_INCLUDES', DIR_FS_CATALOG . 'includes/');
 define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
 define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
 define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
 define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
 define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

 define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');


Thanks for the help

Link to comment
Share on other sites

cookie paths should be /catalog/  (or /catalog - never sure whether the trailing slash is needed or not... one of them will work)

The paths are set correctly...the issue is with the HTTPS_COOKIE_DOMAIN setting. It should be:

define('HTTPS_COOKIE_DOMAIN', '.southcountry.secure.powweb.com');


Link to comment
Share on other sites


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

  • Create New...