Saving Carts

How cart saving works

When a customer saves their cart, we securely store all the essential details. This includes:

  • Products: The specific items in the cart, including:
    • Product name
    • Selected variant (e.g., size, color)
    • Quantity
    • Any custom properties
    • Selling plan
  • Notes: Any notes the customer has added to their cart.

Important: Saved carts stay up-to-date. If you make changes to a product’s details in your store, these changes will automatically reflect in your customers’ saved carts. This includes:

  • Changes to variant names or images
  • Updates to product prices

Saving a cart

Because carts belong to specific customer accounts, the user is required to be logged in before they can save a cart.

Using JavaScript

You can use the JavaScript API to save a cart by enabling the Tools app embed. This will give you access to the createCart function. Here is an example of how to use it.

const lineItems = [{ variantId: "1234", quantity: 1 }];

window.cartSaver.createCart(lineItems, { title: "My new cart" });

Carts can also be saved by adding a link to https://{YOUR_STORE}/a/saved-carts/new where {YOUR_STORE} would be replaced by the URL for your store. Any time someone is logged in and visits that page, their cart will be saved.

Selling plans

Carts including items with selling plans are restricted to a maximum of 20 line items. B2B customers cannot save carts with selling plan items.