Module

CartActions

Methods

# inner addToCart(product) → {object}

An action to add product to the cart

Parameters:
Name Type Description
product object

View Source store/actions/cart.js, line 50

object

# inner clearCart() → {object}

An action to clear the cart entirely

View Source store/actions/cart.js, line 92

object

# inner loadCartItems(items) → {object}

An action to load user's cart items

Parameters:
Name Type Description
items array

cart items

View Source store/actions/cart.js, line 24

object

# inner removeProductFromCart(id) → {object}

An action to remove item from cart by id

Parameters:
Name Type Description
id string

product id to remove

View Source store/actions/cart.js, line 64

object

# inner setEmptyCart() → {object}

An action to define the cart got empty

View Source store/actions/cart.js, line 38

object

# inner startLoading() → {object}

An action to start showing loader

View Source store/actions/cart.js, line 118

object

# inner stopLoading() → {object}

An action to stop showing loader

View Source store/actions/cart.js, line 130

object

# inner updateCartInfo(info) → {object}

An action to update general cart info about products added

Parameters:
Name Type Description
info object

general cart info like number of items and total price

View Source store/actions/cart.js, line 104

object

# inner updateProductInCart(info) → {object}

An action to update product info in the cart

Parameters:
Name Type Description
info object

updated product info

View Source store/actions/cart.js, line 78

object