How to persist shopping cart?

8 0 5

Our customers complain that they added items to their shopping cart but after a day or two get cleaned out.  Can we persist the shopping cart? here is what we like to have:

  1. New customer - we want to persist the shopping cart and user can retrieve it if they use the same browser (or maybe within certain long days, 30 or longer, not just 1 or 2 days).
  2. Repeat customers - for customers who have account in our site, we want to persistently associate their cart with them, so they can pick up cart items across devices.
  3. If customers add skus into cart without signed in, and then sign in, we want Shopify to combine the added skus and this customer's persistent cart, then a new persistent cart with update line items.

We've done some tests about the cart, and some questions come up, I will add them in following reply.

8 0 5

Some tests we've done:

  1. Sign in and add skus to cart, sign out, the skus are still in cart.
  2. In Browser A, sign in and add skus to cart, in Browser B, add skus to cart without sign in, then sign in, the skus added in Browser A are not combined into cart in Browser B.

Conclusion: cart is only assiciated with browser, not with customer.

So some questions come up:

  1. What's cart's expire time? Will it be different if customer is signed in or not?
  2. How does Shopify extend cart's expire time? When user visits site? When user visits cart page? When user adds item into cart?
  3. We checked cookies used by Shopify, seems some are cart related, do you know which one is related to cart session, i.e. we can check its expiration to know cart's.



New Member
2 0 0

Did you end up figuring this out, would love to know?

15 0 0

Does anyone have a solution to this?

We need persistent cart so that customers can see their cart across multiple devices. For example, they sign into their account and add items to cart on desktop. Then when they sign in on mobile, the same items should be in their cart.

How can we get this done?