Skip to main content

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

KeyTypeDescriptionPayload
addToCartfunctionIt is used to add items to cart, list of objects of item is passed as a parameter in the function.{body,buy_now}
updateCartfunctionIt is used to increase or decrease items quantity in the cart, object of item is passed as a parameter.{items}
removeCartfunctionIt is used to remove item with any quantity from cart, object of item is passed as a parameter.{items}
updateCartMetafunctionIt 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
updateRewardsPointsfunctionIt is used to add or remove user's rewards point.{points,id}
removeCouponfunctionIt is used to remove applied coupon, bag id is passed as a parameter.{id}
updateCheckoutModefunctionIt is used to add or remove checkout mode, checkout mode is passed along with bag id as a parameter.{body,id}
applyCouponfunctionApply Coupon{ body, id }
getLadderOffersfunctionFetches ladder price promotion.{"slug","storeId","promotionId","pageSize"}
getPromotionsOfferfunctionFetches available promotions.{"slug","pageSize","promotionGroup"}
getCartfunctionFetches 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>

Was this section helpful?