docs
  1. SCAYLE Resource Center
  2. Developer Guide
  3. Features
  4. Pages
  5. Basket
  6. Composables

Composables

The basket feature offers composables that make it easier to access different properties of the basket data.

useBasketSubscription

A composable that provides easy access to basket item data relevant for subscriptions

Parameters

basketItem

(Required) Basket item used as data source

Returns

hasSubscriptionData

Boolean indicating if the basket item contains custom data needed for subscriptions

subscriptionAttributes

List of attributes cotaining the delivery date and inverval

useBasketPromotionReductions

Composable to group and sum up applied reductions of a basket

Parameters

cost

(Required) Basket costs

items

(Required) List of all basket items

Returns

totalPromotionReductions

The total combined amount for all promotion reductions.

itemsWithPromotionReductions

A list of applied promotions and their total reduction amounts.

useBasketItem

A composable to provide easy access to basket item data

Parameters

item

(Required) basket item used as data source

Returns

isFreeGift

A Boolean indicating whether the item is a gift or not.

isSoldOut

A Boolean indicating wether the item is sold out or not.

price

Price object of the current item.