Remove Item from cart using the api doesn't work


The id is correct I checked it

Snipcart.api.cart.items.remove('gutschein-basic');
data-item-id="gutschein-basic"

Hi @muslim.hasma,

The remove method takes the product’s unique Id, which is created when you add an item in the cart, not the user-defined id.

You can find all the items aswell as their uniqueId using this method: Snipcart.store.getState().cart.items.items:

Let me know if that helps,

Cheers!