3

If a product is added in the cart, it automatically gets empty after 2-3 hours. why does that happens? thanks

  • 2
    Log into Magento admin panel and go` Sytem > Configuration > Web > Session and Cookie Management ` . Then check what is th value there – Sukeshini Aug 24 '14 at 13:01
5

Logged in customers get their cart quote saved and the quotes are retrievable because the they are indexed to a user ID independent of session.

Guest customer and not-logged-in registered customer carts only last as long as the session cookie hasn't expired. Once expired, there is no session to match the guest quote which causes it to be unfindable even though it still exists.

You'll probably find if you actually test it, that a guest or nli cart only lasts about 20 minutes.

It's why newer versions of Magento have the Persistent Carts feature.

You can play with System > Configuration > Web > Session and Cookie Management to see if you can change it, but you probably will find that you need to actually read up on php session.gc_maxlifetime and its various siblings to get it to stick.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.