Fejlesztőknek
Kezdj bele
Témák/Theme SDK/Modules/product/Types: BundleItem to PersonalizationIssue

Types: BundleItem to PersonalizationIssue

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

The types of @poltura/theme-sdk/product, BundleItem to PersonalizationIssue.

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

BundleItem

One item a bundle holds.

idrequiredstring

The bundle item's id; quotes and selections name it.

productIdrequiredstring

The item's product id.

productHandlerequiredstring | null

The item's product URL segment, or null.

variantIdrequiredstring

The item's variant id.

titlerequiredstring

The item's product title.

variantTitlerequiredstring | null

The variant's title, or null for a single-variant product.

imagerequiredMediaImageRef | null

The item's image, or null.

quantityrequirednumber

How many of it the bundle holds.

groupIdrequiredstring | null

The group the item is chosen in, or null for an ungrouped item.

optionalrequiredboolean

Whether the shopper may leave it out.

BundleQuote

The price of a bundle with the shopper's choice in it.

acceptedrequiredtrue

The bundle was priced.

BundleQuoteInput

What to price: one bundle with the shopper's choice in it.

bundleIdrequiredstring

The bundle's id.

variantIdstring

The variant of the product the bundle is offered with, when it has several.

itemsreadonly { readonly itemId: string; readonly variantId?: string; readonly quantity?: number; }[]

The chosen items; all of them when omitted.

quantitynumber

How many bundles; one by default.

BundleQuoteRefusal

Why a bundle could not be priced.

type BundleQuoteRefusal = 'stale' | 'expired' | 'currencyMismatch' | 'missingPrice' | 'invalidSelection' | 'inactive' | 'invalidPolicy' | 'unavailable'

BundleRecommendation

A bundle recommended for a product, with the choice that suits the shopper and its price.

bundleIdrequiredstring

The bundle's id.

titlerequiredstring

The bundle's title.

reasonrequiredBundleRecommendationReason

Why it is recommended.

itemsrequiredreadonly { readonly itemId: string; readonly variantId: string; readonly quantity: number; }[]

The recommended items and their quantities, by bundle item id.

totalrequiredMoney

The price of the recommended choice.

compareAtrequiredMoney

The price of the same items bought alone.

BundleRecommendationReason

Why a bundle is recommended with the product.

type BundleRecommendationReason = 'completeTheSet' | 'boughtTogether' | 'bundleAndSave' | 'rewardOffer'

WishlistButtonProps

Props of WishlistButton.

productIdrequiredstring

The id of the product the heart saves.

titlerequiredstring

The product's title; it names the button for assistive technology and the saved product in analytics.

categoryLabelstring | null

The product's category name, recorded with the save in analytics.

pricePriceView

The price recorded with the save in analytics; a card's `price`.

placement'card' | 'page'

`card` draws a round heart over a card's top-right image corner; `page` a square bordered one for a buy row.

classNamestring

Classes added to the button.

WishlistLinkProps

Props of WishlistLink.

showCountboolean

Whether the number of saved products shows on the heart; true by default.

classNamestring

Classes added to the link.

WishlistProduct

The product a toggle saves or removes.

idrequiredstring

The product's id.

titlerequiredstring

The product's title, recorded with a save in analytics.

WishlistState

The shopper's favourites.

enabledrequiredboolean

Whether the store has favourites turned on; when false nothing about favourites should show.

countrequirednumber

How many products are saved.

isSavedrequired(productId: string) => boolean

Whether the product is saved.

togglerequired(product: WishlistProduct) => Promise<boolean>

Saves a product that is not saved and removes one that is.

GiftCardDraft

What the shopper fills in to send a gift card.

recipientrequired'someone' | 'self'

Whether the card is for someone else or for the shopper.

recipientNamerequiredstring

The recipient's name.

recipientEmailrequiredstring

The address the card is sent to.

senderNamerequiredstring

The name the card comes from.

messagerequiredstring

The message on the card.

deliveryrequired'now' | 'schedule'

Whether the card goes out at once or on `sendOn`.

sendOnrequiredstring

The day the card goes out, as `YYYY-MM-DD`, when delivery is scheduled.

GiftCardIssue

Why a gift card field is not accepted.

type GiftCardIssue = 'required' | 'invalidEmail' | 'messageTooLong' | 'schedulingDisabled' | 'sendInPast' | 'sendTooFar'

GiftCardState

A gift card product's amount, recipient and delivery as the shopper fills them in.

kindrequiredGiftCardKind

Whether the card is loaded with an amount or redeems for a set item.

draftrequiredGiftCardDraft

What the shopper has filled in.

setDraftrequired(patch: Partial<GiftCardDraft>) => void

Changes parts of the draft.

issuesrequiredReadonly<Partial<Record<'recipientEmail' | 'message' | 'sendOn', GiftCardIssue>>>

What is wrong with a field; shown once the shopper tries to add the card.

messageMaxrequirednumber

The longest message accepted.

canSchedulerequiredboolean

Whether the merchant lets cards be sent on a later day.

amountsrequiredreadonly { readonly variantId: string; readonly amount: Money; readonly label: string; }[]

The amounts to choose from, priced in the shopper's currency; empty for a voucher.

selectedVariantIdrequiredstring | null

The variant of the chosen amount, or null.

selectAmountrequired(variantId: string) => void

Chooses an amount.

voucherrequired{ readonly title: string; readonly href: string | null; } | null

The item a voucher redeems for, or null for an amount card.

PersonalizationIssue

Why a personalisation text is not accepted.

type PersonalizationIssue = 'required' | 'tooLong'
Utoljára frissítve