In this tutorial you’ll learn how to enable the Persistent Shopping Cart for your Magento 2 store. You can use the Persistent Cart functionality to keep the products in the shopping cart after the customer logout.
Enable the Persistent Shopping Cart
1. Login to your Magento 2 Admin Panel and go to the Stores > Configuration section.
2. Then, expand the Customers menu and tap Persistent Shopping Cart.
3. Set the Enable Persistence to “Yes”.
Configure the Persistent Shopping Cart
The new options will appear:
Persistence Lifetime (seconds)
Set the time the persistent cookie to be valid. The maximum time allowed is 31,536,000 seconds, which is equal to 1 year.
Enable “Remember Me”
To allow your customers to save the shopping cart information after the logout, set the option to “Yes”. After enabling the “Remember Me” checkbox will be displayed on the Login page.
‘Remember Me’ Default Value
Set the default value for the “Remember Me” checkbox. In case you select “Yes” the “Remember Me” checkbox will be set to “Yes” by default.
Clear Persistence on Sign Out
Set the option to “No” to keep the shopping cart data after a registered customer logs out.
Persist Shopping Cart
Select Persist “Yes” to preserve the persistent cookie if the session cookie expires.
Do not forget to Save the settings and clear Magento cache.
➤ Note, you can configure the Persistent Shopping Cart for different scopes.
Choose the needed Website or Store View from the Store View selector.