Interfaces
ModuleOptions
Properties
Variables
module
Functions
basketContainsItem()
Returns true if the basket contains an item matching the given variantId or productId.
Parameters
| Parameter | Type | Description | 
|---|---|---|
item | | { variantId: number; } | { productId: number; } | The item to check for in the basket. | 
basketItems | BasketItem<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
| Parameter | Type | Description | 
|---|---|---|
items | BasketItem<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
| Parameter | Type | Description | 
|---|---|---|
item | | { variantId: number; } | { productId: number; } | The item to search for in the basket. | 
basketItems | BasketItem<Product, Variant, PromotionEffect> | An array of basket items. | 
Returns
BasketItem<Product, Variant, PromotionEffect> | undefined
- The matching basket item, or undefined if not found.
 
getTotalPriceWithoutReductions()
Calculates the total original price without any reductions applied.
Parameters
| Parameter | Type | Description | 
|---|---|---|
cost | BasketTotalPrice | The basket total price object. | 
Returns
CentAmount
The total original price value without reductions