docs
  1. Features
  2. Basket
  3. Composables

Interfaces

ModuleOptions

Properties

PropertyType
autoImports?boolean

Variables

module

Functions

basketContainsItem()

Returns true if the basket contains an item matching the given variantId or productId.

Parameters

ParameterTypeDescription
item| { variantId: number; } | { productId: number; }The item to check for in the basket.
basketItemsBasketItem<Product, Variant, PromotionEffect>An array of basket items.

Returns

boolean

  • True if found, false otherwise.

countAvailableBasketItems()

Counts the total quantity of available items in the basket.

Parameters

ParameterTypeDescription
itemsBasketItem<Product, Variant, PromotionEffect>An array of basket items to process.

Returns

number

The total count of available items.


findBasketItem()

Finds a basket item based on its variantId or productId.

Parameters

ParameterTypeDescription
item| { variantId: number; } | { productId: number; }The item to search for in the basket.
basketItemsBasketItem<Product, Variant, PromotionEffect>An array of basket items.

Returns

undefined | BasketItem<Product, Variant, PromotionEffect>

  • The matching basket item, or undefined if not found.

getTotalPriceWithoutReductions()

Calculates the total original price without any reductions applied.

Parameters

ParameterTypeDescription
costBasketTotalPriceThe basket total price object.

Returns

CentAmount

The total original price value without reductions