Removes a product with specified index from customer's cart.
// returns cart details with items array. Use it to get the index
Ecwid.Cart.get(function(cart){
console.log(cart);
})
// remove first product from customer's cart
Ecwid.Cart.removeProduct(0);
Ecwid.Cart.removeProduct()
receives one argument: index
Name | Type | Description |
---|---|---|
index | integer | index of a product in cart object you need to remove from customer's cart |
Subscribe to the Ecwid.OnAPILoaded
JS API event to ensure availability of this function.