After July 2021, the 2.3.x release line no longer received quality updates or user guide updates. PHP 7.3 reached end of support in December 2021, and Adobe Commerce 2.3.x reached end of support in September 2022. We strongly recommend upgrading to Adobe Commerce 2.4.x to help maintain PCI compliance.

Configuring a Persistent Cart

This site contains archived merchant documentation for a version of Adobe Commerce and Magento Open Source that has reached end-of-support. The documentation available here is intended for historical reference only and is not maintained. The Adobe Commerce Merchant Documentation for current releases is published on the Adobe Experience League.

During the setup of a persistent shopping cart, you can specify the lifetime of the cookies, and which options you want to make available for various customer activities.

For more information about how the customer workflow is determined by these settings, see Persistent Cart Workflow.

If the session cookie expires while the customer is logged in, the persistent cookie remains active.

  1. On the Admin sidebar, go to Stores > Settings > Configuration.

  2. In the left panel, expand Customers and choose Persistent Shopping Cart.

  3. To enable the persistent shopping cart and display additional options, set Enable Persistence to Yes.

    Enabling and configuring the cart persistence

    You might need to clear the Use system value checkbox to modify these settings.

  4. For Persistence Lifetime (seconds), enter the length of time, in seconds, that you want the persistent cookie to last.

    The default value of 31,536,000 seconds is equal to one year, and is the maximum time allowed.

  5. Set Enable “Remember Me” to one of the following:

    Yes Displays the Remember Me checkbox on the Login page of your store, so that customers can choose to save their shopping cart information.
    No Persistence can still be enabled, but customers are not given the option to choose if they want to save their information.
  6. To preselect the Remember Me checkbox for the customer, set Remember Me Default Value to Yes.

    The customer can deselect this option if they choose.

  7. Set Clear Persistence on Log Out to one of the following:

    Yes The shopping cart is cleared when a registered customer logs out.
    No The shopping cart is saved when a registered customer logs out.

    If the session cookie expires while the customer is still logged in, the persistent cookie remains in use.

  8. 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.
  9. Click Save Config.