Simple JS library to handle shopping cart object and events on E-Com Plus (not only) stores.
GitHub
Examples
// ES import default
import ecomCart from '@ecomplus/shopping-cart'
// Optional named ES import for default instance and constructor
import { ecomCart, EcomCart } from '@ecomplus/shopping-cart'
// With CommonJS
const ecomCart = require('@ecomplus/shopping-cart')
<!-- Global `ecomCart` from CDN on browser -->
<script src="https://cdn.jsdelivr.net/npm/@ecomplus/shopping-cart/dist/ecom-cart.var.min.js"></script>
<!-- Bundle from CDN with `ecomUtils` and `EventEmitter3` -->
<script src="https://cdn.jsdelivr.net/npm/@ecomplus/shopping-cart/dist/ecom-cart.bundle.min.js"></script>
Returns:
Default `EcomCart` instance object.
- Type
- EcomCart