items
simpleCart.Item.decrement( [amount] )
arguments:
- amount (optional): number to decrement the quantity of the item by. If nothing is provided, item is incremented by 1
If the quantity of the item is 0 or less after it is decremented, the item is removed from the cart
var myItem = simpleCart.add({ name: "Cool Thing" , price: 4, quantity: 5 }); myItem.decrement(); myItem.quantity(); // 4 myItem.decrement( 2 ); myItem.quantity(); // 2
Comments
- There are no comments for this entry yet.