2

Our site does not use accounts or logins, so basically all of our users go through a 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 does not register.

So if an anonymous users 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 Oct 19 '15 at 21:50
  • Its saved for how long? – nick_warren Oct 20 '15 at 7:40
  • I don't know :) a while! not that much. – Nickool Oct 20 '15 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. – Jan Żankowski Aug 29 '16 at 7:23
4

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 honoured first and then cookie lifetime.

So once session is expired the cart will be emptied.

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.