simple cart using HTML5 local storage
you can call this file and pass the cart items as mentioned in the Usage section also you can pass any type of json objects in any sorting type but you have to modify update cart function the currnet sorting is {ID,PRICE,QUANTITY,TYPE}
var product = {};
// here you have to get the id from the jquery identifier
product.id = $(this).closest('article').attr('id');
// here you have to get the price from the jquery identifier
product.price = parseInt($(this).parent().parent().parent().find(".price:first").text());
// here you have to get the price from the jquery identifier
product.quantity = quantity;
// here you have to get the product Type
product.type = productType;
//call the add to cart function
addToCart(product);
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D