Magento – Persistent shopping cart works even if disabled

cartmagento-1.7session

In the backend, I have got "Enable Persistence" set to "No". Still, If I use one browser to add something to cart, I can see that in the second browser after page reload. How can this work if persistent cart is disabled?

Best Answer

Persistent shopping cart isn't necessarily just the synchronization of the shopping cart experience, it is the persistence of the logged in session, meaning you don't get logged out after some period of inactivity. This always-logged-in experience (popularized by Amazon) gives the customer personalization and allows the store owner to merchandise in a more targeted fashion.

When you are actively logged in as a registered customer you utilize the same cart session and that session is shared by all devices as the records are stored in the database and are refreshed to your logged in sessions on each page load.

Update:

Your original question was 'why does my cart persist across devices even without persistent cart turned on' - which is the question I answered. Perhaps I over-simplified the feature.

So, hopefully this is to your satisfaction - having performed a code review on persistent cart in 1.8 Alpha this is the functionality introduced:

  • Adds "not [username]?" to the welcome statement, before logout link
  • Adds a 'remember me' checkbox to registration forms
  • Provides its own customer registration forms
  • Provides its own session object
  • Observes login / logout
  • Provides a shim between purchase and account access if the persistent login session is being used (to prevent unauthorized purchases, for instance)
  • Provides emulation of quotes, customer objects to piggyback data into the regular customer session
  • Provides a synchronizePersistentOnLogout/Login method that seems to log all browser sessions out if the customer session logs out of one browser (would appreciate some feedback here)

All of the above is to facilitate a non-expiring customer session that gives the store manager the ability to merchandise to the customer differently based on customer segment. With Enterprise Edition Banners, Customer Segments, Promotions one could provide a completely different site experience, based on customer segments alone (geographic location, items/categories purchased, total $ spend in a calendar year, etc.) that would persist to all devices.

Related Topic