Cart
fetch function:
fetch function:no parameter
return: promise
zid.store.cart.fetch().then(function (response) {
})addProduct function:
addProduct function:parameters:
product_id
quantity
options - optional
custom_fields - optional
return: promise
// use this if product is simple
// for more details please check
// https://themes.zid.dev/product-template
zid.store.cart.addProduct({productId, quantity}).then(function (response) {
})
// product_id can be passed from onclick functionupdateProduct function:
updateProduct function:parameters:
product_id
quantity
return: promise
zid.store.cart.updateProduct(product_id, quantity).then(function (response) {
})
// product_id can be passed from onclick functionremoveProduct function:
removeProduct function:parameters:
product_id
return: promise
zid.store.cart.removeProduct(product_id).then(function (response) {
})
// product_id can be passed from onclick functionredeemCoupon function:
redeemCoupon function:parameters:
coupon_code
return: promise
zid.store.cart.redeemCoupon(coupon_code).then(function (response) {
})removeCoupon function:
removeCoupon function:no parameter
return: promise
zid.store.cart.removeCoupon().then(function (response) {
})Last updated
Was this helpful?