caleres-virtual-cart
v0.3.0
Published
The functional parts for caleres-virtual-cart
Downloads
1
Readme
Caleres Virtual Cart
This is going to define the global variable for virtual cart. Here's an example file:
window.setCartCount = require('./../../../scripts/bundles/_components/set-cart-count.js');
window.virtualCartSizeValidation = function(){
/* CUSTOMIZE THIS FUNCTION TO DO WHATEVER YOU'D LIKE WHEN A SIZE ISN'T SELECTED AND SOMEONE IS TRYING TO ADD AN ITEM --- */
};
window.virtualCartItemAdded = function(){
/* USE THIS FOR TRACING PIXELS, ETC. --- */
};
window.virtualCartModal = require('caleres-virtual-cart');
virtualCartModal is the object that's created by this module, but you'll need a few other things.
Other things:
- set-cart-count component - This will update the cart count. Create an independent component that will update the item count in the header
- virtualCartSizeValidation - This fires whenever you do not have a size selected.
- virtualCartItemAdded - This is the script to handle items added to the cart
Nothing will break if you don't define these, but it won't work very well. :)