cart
The cart: its lines, totals, codes and gift cards, the state and actions the cart hook returns, and the cart page's parts.
On this page
import { … } from '@poltura/theme-sdk/cart';
| Name | What it is |
|---|
useCart | The cart with its actions, usable anywhere on the storefront. |
useCartPage | What the cart page shows beside the cart: recommendations, the minimum order and a changed bundle price. |
| Name | What it is |
|---|
CartLineItem | One cart line: image, title, variant, delivery note, personalisation, price, quantity and remove, with its bundle items under it. |
CartLineQuantity | The quantity stepper of a cart line, following the store's quantity steps; read-only while the cart is locked. |
CartLineRemove | The button that removes a cart line; renders nothing while the cart is locked. |
CartSummary | The order summary: subtotal, shipping, tax, discounts, gift cards and the total, on the visitor's price basis. |
CartCodeForm | The field that applies a gift card or discount code, with the entered codes under it. |
CartCodes | The discount codes the shopper entered, each with its status and a remove button. |
CheckoutButton | The button that goes to checkout; disabled while a change runs or the cart blocks checkout. |
EmptyCart | What the cart shows when it holds nothing: an icon, a heading, a line and a button back to the shop. |
CartRecommendations | Products suggested to add to the cart, each with its own add button; renders nothing while the cart is locked. |
MinimumOrderNotice | How much is missing to the minimum order value, with a progress bar. |
BundlePriceNotice | The notice that a bundle price changed, with the new total and the button that accepts it. |
CartLockBanner | The banner of a cart an app has locked, such as a quote: what holds it, a way back to an editable cart and a link to the app's page. |
RemoveBundlesButton | A row with the button that removes every bundle from the cart, its items with it; a failure shows as a toast. |
| Name | What it is |
|---|
CartButton | The header's cart button: the item count, and the mini cart it opens, a popover on large screens and a side sheet below. |
MiniCart | The mini cart's body: compact lines, the total, the minimum order, and the cart and checkout buttons, or its empty and loading states. |
| Name | What it is |
|---|
cartRegions | The cart template's regions, where merchants place blocks. |
Last updated