Skip to main content
Save from cart lets customers keep items they remove from the cart instead of losing them. When enabled, Swish intercepts cart line removals and saves the product to the customer’s list so they can purchase it later.

How it works

  1. A customer removes an item from their cart.
  2. Swish saves the item to their list with source: "cart".
  3. A feedback toast confirms the save and offers an Undo action that removes the item again if pressed (optional).
If confirm is set, Swish asks before saving so the customer can choose whether to keep the item. Set it to "toast" (or true) to ask in a toast, or to "dialog" to ask in a modal dialog the customer can’t miss. In the customiser this is Global → Preferences → Cart → Ask before saving a cart line. The undo action is only shown when confirm is off, since prompting and offering undo would be redundant. In the drawer, each “Saved from cart” card has a heart that moves the item to the customer’s wishlist with its quantity, taking it out of “Saved from cart”, and a trash button that removes the item from “Saved from cart” after a confirmation. The wishlist item the heart saves carries the saved-from-cart tag. To remove one in code, call swish.api.smartLists.removeItem("saved-from-cart", itemId).

Enabling and disabling

Save from cart is enabled by default. Two settings control the feature:
  • intents.removeCartLine.saveCartLine — triggers the save when a cart line is removed. Enabled by default.
  • The saved-from-cart section in the home view shows the “Saved from cart” smart list in the drawer. Included by default.
To disable save from cart:

Configuration

Fine-tune the save behavior under intents.saveCartLine:

Saving to the wishlist instead

Set destination to "wishlist" for a “move to wishlist” behaviour: removed cart lines are saved as ordinary wishlist items rather than into the “Saved from cart” smart list. Each one carries the saved-from-cart tag. The saved-from-cart section in the home view then has nothing to show, and the “For you” lists-section in the saves view is hidden along with it. That section renders smart lists only, so hiding it also removes “Recently viewed” — there is currently no way to keep one without the other. Switching the destination in the customiser applies both changes for you; configuring destination in code does not, so hide the sections yourself.
Set confirm if you want customers to explicitly opt in to saving removed cart items rather than saving automatically. "dialog" is the hardest to miss on a wide screen; rename its text with the saveForLaterAlert keys in translations.

Further reading