fdk-cart
Deprecation Notice
Vue-based themes will soon be deprecated. Please switch to React-based themes, as all future updates and support will focus exclusively on React.
Cart Action Component
Tag
fdk-cart
Description
This action component is used to perform cart actions including, adding items to cart, updating cart items, removing cart items, removing coupons, applying and removing rewards points, updating cart meta information including employee details and GST number comments.
Props
Key | Type | Description | Payload |
---|---|---|---|
addToCart | function | It is used to add items to cart, list of objects of item is passed as a parameter in the function. | {body,buy_now} |
updateCart | function | It is used to increase or decrease items quantity in the cart, object of item is passed as a parameter. | {items} |
removeCart | function | It is used to remove item with any quantity from cart, object of item is passed as a parameter. | {items} |
updateCartMeta | function | It is used to update the cart meta information including comments, gst details and employee name, meta information is passed as body along with bag id. | body,id |
updateRewardsPoints | function | It is used to add or remove user's rewards point. | {points,id} |
removeCoupon | function | It is used to remove applied coupon, bag id is passed as a parameter. | {id} |
updateCheckoutMode | function | It is used to add or remove checkout mode, checkout mode is passed along with bag id as a parameter. | {body,id} |
applyCoupon | function | Apply Coupon | { body, id } |
getLadderOffers | function | Fetches ladder price promotion. | {"slug","storeId","promotionId","pageSize"} |
getPromotionsOffer | function | Fetches available promotions. | {"slug","pageSize","promotionGroup"} |
getCart | function | Fetches all items added to the cart. | NA |
Example
theme/global/components/cart/cart-chip-item.vue
<fdk-cart>
<template slot-scope="cart">
///code
</template
</fdk-cart>