Fejlesztőknek
Kezdj bele
Témák/Theme SDK/Modules/cart/Types: CartNetTotals to RemoveBundlesButtonProps

Types: CartNetTotals to RemoveBundlesButtonProps

Ez az oldal még csak angolul érhető el.

The types of @poltura/theme-sdk/cart, CartNetTotals to RemoveBundlesButtonProps.

Ezen az oldalon
import { … } from '@poltura/theme-sdk/cart';

CartNetTotals

The cart totals without tax.

itemsrequiredMoney

The items without tax.

discountrequiredMoney

The discounts without tax.

shippingrequiredMoney

Shipping without tax.

taxrequiredMoney

The tax added on top of the net total.

totalrequiredMoney

The total without tax.

CartPageView

What the cart page shows beside the cart itself.

recommendationsrequiredreadonly ProductCard[]

Products suggested to add, at most four.

minimumOrderrequiredMinimumOrder | null

The minimum order value not reached yet, or null.

bundlePriceReviewrequiredBundlePriceReview | null

The changed bundle price to accept, or null when no bundle price changed.

CartResult

The outcome of a cart action.

okrequiredtrue

The action worked.

CartState

The cart with the actions that change it; the host runs every mutation.

cartrequiredCart | null

The cart, or null before the shopper has one.

statusrequired'loading' | 'ready' | 'error'

Whether the cart is loading, ready, or failed to load.

addrequired(input: CartAddInput) => Promise<CartResult>

Adds a variant to the cart and opens the mini cart.

setQuantityrequired(lineId: string, quantity: number) => Promise<CartResult>

Changes a line's quantity.

removerequired(lineId: string) => Promise<CartResult>

Removes a line and its bundle components.

applyCoderequired(code: string) => Promise<CartResult>

Applies a code, trying it as a gift card first and then as a discount.

removeCoderequired(code: string) => Promise<void>

Removes an entered discount code.

removeGiftCardrequired(giftCardId: string) => Promise<void>

Removes an applied gift card.

checkoutrequired() => void

Goes to checkout; does nothing while a change is in flight.

isBusyrequiredboolean

Whether any change is in flight.

miniCartrequiredMiniCartState

The mini cart's open state.

CartTotals

What the cart adds up to.

itemsrequiredMoney

The items before discounts.

discountrequiredMoney

The discounts taken off.

shippingrequiredMoney

Shipping.

taxrequiredMoney

The tax in the total.

giftCardrequiredMoney

The gift card credit taken off.

totalrequiredMoney

What the shopper pays.

netrequiredCartNetTotals | null

The same totals without tax, or null when the market has no tax split.

taxIncludedrequiredboolean

Whether the prices include tax.

taxPendingrequiredboolean

Whether tax is not worked out yet, so the total is not final.

taxRatePercentrequirednumber | null

The tax rate as a percentage, or null when rates are mixed or unknown.

MiniCartState

The mini cart's open state.

openrequiredboolean

Whether the mini cart is open.

setOpenrequired(open: boolean) => void

Opens or closes the mini cart.

MinimumOrder

The minimum order value the cart does not reach yet.

minimumrequiredMoney

The minimum order value.

shortfallrequiredMoney

How much is missing.

basisrequired'gross' | 'net'

Whether the minimum is measured with or without tax.

CartButtonClassKey

The parts of CartButton that take their own classes.

type CartButtonClassKey = 'icon' | 'label' | 'count'

CartButtonProps

Props of CartButton.

icon'cart' | 'bag'

The icon: a cart or a bag.

showLabelboolean

Whether the word "Cart" shows beside the icon; omitted shows it from large screens up.

countPlacement'inline' | 'overlay'

Where the item count sits: beside the icon, or as a badge over it.

labelLayout'inline' | 'stack'

Whether the label sits beside the icon or under it.

classNamestring

Classes added to the button.

classesPartial<Record<CartButtonClassKey, string>>

Classes added to the icon, the label and the count.

MiniCartProps

Props of MiniCart.

surface'popover' | 'sheet'

The surface it fills: the desktop popover, or the narrow side sheet with larger touch targets and wallet buttons.

onClose() => void

Called when a link inside it is followed, so the surface around it can close.

classNamestring

Classes added to the mini cart.

CartLineItemProps

Props of CartLineItem.

linerequiredCartLine

The line to show, from `useCart().cart.lines`.

compactboolean

Draws the narrow layout the mini cart uses, for drawers and side panels.

classNamestring

Classes added to the line.

CartLineQuantityProps

Props of CartLineQuantity.

linerequiredCartLine

The line whose quantity it changes.

classNamestring

Classes added to the stepper.

CartLineRemoveProps

Props of CartLineRemove.

linerequiredCartLine

The line it removes, with its bundle items.

classNamestring

Classes added to the button.

CartSummaryProps

Props of CartSummary.

cartrequiredCart

The cart whose totals it lists.

classNamestring

Classes added to the summary.

CartCodeFormProps

Props of CartCodeForm.

classNamestring

Classes added to the form.

CartCodesProps

Props of CartCodes.

cartrequiredCart

The cart whose entered codes it lists.

classNamestring

Classes added to the list.

CheckoutButtonProps

Props of CheckoutButton.

labelstring

The button text; the translated default when omitted.

classNamestring

Classes added to the button.

EmptyCartProps

Props of EmptyCart.

headingstring

The heading; the translated default when omitted.

bodystring

The line under the heading; the translated default when omitted.

continueLabelstring

The button text; the translated default when omitted.

continueHrefstring

Where the button goes; the product listing when omitted.

classNamestring

Classes added to the empty state.

CartRecommendationsProps

Props of CartRecommendations.

itemsrequiredreadonly ProductCard[]

The products to suggest; the first four are shown.

classNamestring

Classes added to the section.

MinimumOrderNoticeProps

Props of MinimumOrderNotice.

minimumrequiredMinimumOrder

The minimum order value not reached yet.

classNamestring

Classes added to the notice.

BundlePriceNoticeProps

Props of BundlePriceNotice.

reviewrequiredBundlePriceReview

The changed bundle price.

classNamestring

Classes added to the notice.

CartLockBannerProps

Props of CartLockBanner.

classNamestring

Classes added to the banner.

RemoveBundlesButtonProps

Props of RemoveBundlesButton.

classNamestring

Classes added to the row around the button.

Utoljára frissítve