Magento 1.9 – Does Persistent Shopping Cart Work for Guest Visitors?

cartmagento-1.9persistentsession

I'm wondering if the settings described under persistent shopping cart work for guest (unlogged) visitors. I.e. can I set them so that when a visitor comes in, adds things to cart, closes the browser, comes back a month later, he will see the items he added before?

The description of the "Persist Shopping Cart" option made me suspect so:

Set Persist Shopping Cart to one of the following:

Yes

If the session cookie expires, the persistent cookie is preserved. If
a guest shopper later logs in or creates a new account, the shopping
cart is restored.

No

The shopping cart is not preserved for guests after the session cookie
expires.

However, on trying it out, it seems that persistent_shopping_cart cookie is only created after log in.

I know I can "sort of" make it work by extending regular session expiration to e.g. one year, as described e.g. here but that's not what I'm after.

Many thanks!

Best Answer

That's how I thought it should work as well (see also: What does "Persistent Shopping Cart" do?)

But after inspecting the code, you are right, the persistent_shopping_cart cookie is only set on login and logout, and used for the "remember me" feature to automatically log in customers.

So the feature does not quite live up to its promises and I am not sure if this is intentional or a bug.