Our site does not use accounts or logins, so basically all of our users go through guest checkout.

I was under the impression that the "Persistent Shopping Cart" does exactly that - saves the contents of the cart even for users who do not register.

So if an anonymous user comes to the site, adds items to the cart and leaves, his cookie is still saved in case he returns to the site.

Apparently I was mistaken - after further reading the documentation I understand that the feature is used more towards accessing the cart from multiple devices while logged on and persisting the cart.

So now, assuming I want to ANONYMOUS, GUEST users to be able to return to the site and maintain their previous cart state, what is the best way to do that?

Should I just extend the session cookie to a year? I'm not sure what are the consequences of doing that if that's the best /easiest way?

Thank you!

  • actually I do not need to do anything if I am a guest it will be saved, I don't know if someone had configured anything but I think by default it will be saved. I just checked mine.
    – Nickool
    Commented Oct 19, 2015 at 21:50
  • Its saved for how long? Commented Oct 20, 2015 at 7:40
  • I don't know :) a while! not that much.
    – Nickool
    Commented Oct 20, 2015 at 17:58
  • For reference of other people who are confused by Magento docs on the question of Persistent Shopping Cart and guest visitors: magento.stackexchange.com/questions/133219 The fact is that Persistent Shopping Cart doesn't work for guest (unlogged) visitors. Commented Aug 29, 2016 at 7:23

1 Answer 1


The time duration for which Item saved into cart depends on two parameters

  1. Magento Admin: System -> Configuration -> Web -> Session Cookie Management Cookie Lifetime
  2. PHP.ini - session.gc_maxlifetime

Here your Session Cookie Management Cookie Lifetime should be less than the session.gc_maxlifetime.

The session.gc_maxlifetime will be honored first and then cookie lifetime.

So once the session is expired the cart will be emptied.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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