Access shopping cart data, items, and checkout functionality
basket
object contains all information about the customer’s shopping cart. It’s available globally across all pages, making it perfect for cart widgets, mini-carts, and checkout processes.
Property | Type | Description |
---|---|---|
basket.isEmpty | Boolean | Check if cart is empty |
basket.items_count | Number | Number of items in cart |
basket.total_amount | String | Total amount for items in cart |
basket.items | Array | Object containing all products in cart |
basket.items
, each item has these properties:
Property | Type | Description |
---|---|---|
item.id | String | Product ID |
item.sku | String | Product article number |
item.url | String | Product link address |
item.title | String | Product title |
item.firstimage | String | Product image |
is_variant | Boolean | True if it’s a product variant |
variant_name | String | Variant designation |
item.price | String | Product unit price |
qty | Number | Quantity of product added to cart |
amount | String | Product total amount (unit price x quantity) |
paylink
provides the correct checkout URL when the cart is not empty:
{{#img}}
wrapper for cart item thumbnails