Skip to content

abdallah-elsabeeh/local-storage-cart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

local storage cart

simple cart using HTML5 local storage

Installation

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}

Usage

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);

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Contact

alt text alt text alt text alt text

License

About

simple cart using HTML5 local storage

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published