Skip to main content

Save For Later

The Save for Later feature lets customers move items from their cart to their wishlist with a single click. This is useful for customers who aren't ready to buy immediately but don't want to lose track of items they're considering.

Updated this week

Save for Later

The Save for Later feature lets customers move items from their cart to their wishlist with a single click. This is useful for customers who aren’t ready to buy immediately but don’t want to lose track of items they’re considering.

How It Works

  1. Customer has items in their cart

  2. They click “Save for Later” next to an item

  3. The item is added to their wishlist

  4. The item is automatically removed from their cart

  5. The button shows a success state

Adding Save for Later to Your Cart

Add this button next to each item in your cart template:

```liquid {% for item in cart.items %}

Save for Later

{% endfor %} ```

Required Attributes

Attribute

Description

data-product-handle

The product’s URL handle

data-variant-id

The specific variant ID in the cart

data-line-item-key

The cart line item key (required for removal)

Optional Attributes

Attribute

Description

data-success-text

Text to show after saving (e.g., “Saved!”)

data-icon-type

Icon to display (e.g., “icon_heart”)

The Line Item Key

The data-line-item-key attribute is crucial. It tells Shopify which specific cart item to remove. In Liquid, this is available as item.key.

Without this attribute, the item will be added to the wishlist but NOT removed from the cart.

Cart Refresh

After removing an item from the cart, the app:

  1. Dispatches a cart:refresh custom event

  2. Attempts to call window.Shopify.theme.cart.update() if available

Most themes will update automatically. If your cart doesn’t refresh, you may need to add custom JavaScript:

javascript document.addEventListener('cart:refresh', function() { // Your cart refresh logic location.reload(); // Simple but effective });

Styling

Add CSS to style the Save for Later button:

```css .wishlist-save-for-later { background: transparent; border: none; color: #666; text-decoration: underline; cursor: pointer; font-size: 14px; }

.wishlist-save-for-later:hover { color: #333; }

.wishlist-save-for-later.success { color: #4caf50; }

.wishlist-save-for-later.busy { opacity: 0.5; pointer-events: none; } ```

AJAX Carts

If your theme uses an AJAX cart (drawer or popup), the implementation is the same. Ensure:

  1. The buttons are rendered with each cart item

  2. Your cart refresh logic works with AJAX updates

Requirements

Save for Later requires:

  • Customer to be logged in, OR

  • Guest wishlists to be enabled

If neither condition is met, clicking the button will show a login prompt.

Best Practices

  1. Position clearly - Place the button near the remove button

  2. Use clear text - “Save for Later” is universally understood

  3. Show feedback - Use data-success-text="Saved!" for confirmation

  4. Style consistently - Match your cart’s design

  5. Test the flow - Verify items move correctly between cart and wishlist


Did this answer your question?