simpleCart(js)

items
Items:
Total:

simpleCart.empty()

This function removes all items from the cart.

simpleCart.add({ name: "Shirt" , price: 5 , quantity: 1 });

simpleCart.quantity(); // returns 1

simpleCart.empty();

simpleCart.quantity(); // returns 0

Comments

  1. Jun 13, 2012

    adelphia  said:

    Just fyi, in order to get empty to work I had to do a “simpleCart.update();” before and after the “simpleCart.empty();” call.

Commenting is not available in this channel entry.