1.0.16 • Published 6 years ago

products-in-cart v1.0.16

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

products-in-cart

This package uses with method addTocart(). The idea of this package determine from which page (pip or conf) customer added product to cart. This data will be stored at localStorage.

Usage

Initialization

const CartProducts = require('products-in-cart');
const Cart = new CartProducts();
Methods

Cart.addProduct('productId','pageType');
Cart.deleteProduct('productId');
Cart.getProduct('productId');
Results

Result will be stored at localStorage inside property productsInCart

localStorage {productsInCart: "{"productId":{"pip":count,"conf":count,"quantity":count}}", length: 1}

Run test

npm run test
1.0.16

6 years ago

1.0.15

6 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago