Doesn't Sign-in and Empty Cart ...


Since I currently can't post new Topics to Troubleshoot, I am posting it here.

I am running CSC Pro 3.0.6 and I am having issues an “Empty Cart” issue.

An existing Customer adds Products to his/her Cart and then does a Checkout. The Customer is asked to Sign-in. The Sign-in doesn't work (name does not appear in the pull-down) and the “Empty Cart” is displayed.

However, if the Customer goes to “Home”, does a Sign-in (the name appears in the pull-down), adds Products to Cart and does a Checkout, the Customer can make the purchase.

I can reproduce this over and over again …

Also, sometimes, upon Sign-in, I get the Validation image and sometimes I don't … can't figure this out either.

There are two Threads in Troubleshooting about this … and I have implemented both “fixes”:

  1. I added to config.php:

    define('SKIP_SESSION_VALIDATION', true);

    And this line was already commented out:

    // define('SESS_VALIDATE_IP', true); // link session ID with ip address

    I uncommented it, and got the same results.

  2. I added to core/classes/session.php:

    /* Problem with empty cart after signing in /

    The this fix was found in the Forum /

    $data['ip'] = $ip['host']; */

    if (!empty($ip['proxy'])) {

    $data['ip'] = $ip['proxy'];

    } else {

    $data['ip'] = $ip['host'];


    However, no matter what I try, I get the same results … No Sign-in and Empty Cart for a returning Customer. The above “fixes” were to address the problem in CSC 2 … well, I guess the issue still exist in CSC 3. Is it still there in the up and coming CSC 4?

    An actual Customer brought this to our attention, here are his comments:

    “Fix your ridiculously broken shopping cart system. I add items, click checkout and it asks me to sign in. I sign in, and it say shopping cart empty. I add the items again, press checkout again, and it says to sign in again. I sign in again and it says shopping cart empty. It repeats this cycle over and over. How on earth do you expect to do any business with this broken system.”

    Any help in resolving this would be appreciated.

    Thanks for listen!

Also, it seems we are having an issue of not being able to Sign-in if the 3rd SSL option is checked:

Enable secure connection for authentication, profile and orders pages (SSL certificate is required to be installed on your server)

More specifically the user cannot escape SSL to browse normally unless the entire session continues in SSL mode.

This is getting even stranger …

I am logged out of Cart. I add a Product to Cart. I check out. I get the #1 Please sign-in or Register page. I sign in. I get an Empty Cart page and it appears I am not signed in either.

Using the Sign-in link, I get the Auth page. I sign in. My name appears in the menu, and the Cart has the Product I had added.

This does not happen on the CSC Demo Store … I tend to believe this is happening because of SSL …

We require SSL enable on the Checkout … not logged in, the Store is at … upon Checkout or Sign-in, the Store is at

Now how do I fix it … any suggestions?

CSC Support / Development fixed the Empty Cart issue I was having … here's the fix:

[size=1]In order to resolve the issue with your CS-Cart installation, I replaced this part of code:[/size]

session_regenerate_id(true); // remove old session to prevent ability to use the old one.

[size=1]with the following ones:[/size]

$old_session = $_SESSION;

$new_id = self::reset_id();

$_SESSION = $old_session;

[size=1]in the session.php file located in the core/classes directory of your CS-Cart installation. [/size]

So the actual fix looks like this:

//session_regenerate_id(true); // remove old session to prevent ability to use the old one.

$old_session = $_SESSION;

$new_id = self::reset_id();

$_SESSION = $old_session;

One line commented out, three new lines added.

Hope this helps others solve the “Empty Cart” for existing Customers when the sub-domain changes when going SSL.

Hope some one can help. I have what I think is the same problem as this. Before I try to alter code, which I really need to avoid, as suggested above I just wish to make sure. I’m using Ultimate 4 but not the latest upgrade. (I could not stomach an upgrade presently).

The first shop has SSL organised last night as we offer to collect credit card details for customers than wish to do this. ( - test shop 1) For my other stores I have never organised ssl in the past as we do not collect credit card information. Most of the other information collected is sent via emails (addresses, etc) so we just never pretend it is secure because of the other ways it is used. - test shop 2

If you wish to look at them, both shops are live even though they are underdevelopment. Yes I know I should not do this however I am sick of testing and wanted easier access.

If you need to, feel free to place orders using names like test. Leave a message in the message area stating it is a test. Pick a payment method that does not require credit cards if you wish to go right to the end of the buying process. I will delete all the information later.


Or do I have to buy SSL for the second and third shop fronts and will this solve the problem.

Really hoping someone out there can help with suggestions to remove my headache soon as it is growing by the minute. :confused: :confused: :confused: :confused:

[size=5]THANKS[/size] if you can help.

Sorry shop 2 is actually under the following domain while being developed