Developers
Start building
Themes/Theme SDK/Modules/product/Types: NotifyMeCopy to BundleGroup

Types: NotifyMeCopy to BundleGroup

The types of @poltura/theme-sdk/product, NotifyMeCopy to BundleGroup.

On this page
import { … } from '@poltura/theme-sdk/product';

NotifyMeCopy

Texts of NotifyMe that replace the platform's own.

titlestring

The heading.

descriptionstring

The line under the heading.

emailLabelstring

The address field's label.

emailPlaceholderstring

The address field's placeholder.

submitstring

The button text.

submittingstring

The button text while sending.

newsletterstring

Ignored: the newsletter box always shows the store's consent sentence.

successstring

The message once the request is in.

privacystring

The privacy line under the form.

NotifyMeProps

Props of NotifyMe.

variantIdrequiredstring

The variant to hear about.

reasonrequiredNotifyMeReason

Why it cannot be bought now.

copyNotifyMeCopy

Texts that replace the platform's own.

classNamestring

Classes added to the form.

NotifyMeReason

Why a shopper asks to hear when a variant can be bought.

type NotifyMeReason = 'comingSoon' | 'preorderFull' | 'outOfStock'

NotifyMeState

The state of a notify-me form: the address, the newsletter choice and the request.

enabledrequiredboolean

Whether the store sends stock notices at all.

emailrequiredstring

The address the notice goes to, the signed-in customer's by default.

setEmailrequired(email: string) => void

Changes the address.

newsletterrequiredboolean

Whether the shopper also subscribes to the newsletter.

consentrequiredstring

The store's marketing consent sentence: the newsletter box's label, held to every sign-up.

setNewsletterrequired(newsletter: boolean) => void

Changes the newsletter choice.

statusrequiredNotifyMeStatus

Where the request stands.

confirmationSentrequiredboolean

After `done`, whether a confirmation email was sent that the shopper must click first.

errorrequiredstring | null

Why the request failed, in the page language, or null.

submitrequired() => Promise<NotifyMeStatus>

Sends the request and resolves with the status it ends in.

NotifyMeStatus

Where a notify-me request stands.

type NotifyMeStatus = 'idle' | 'invalid' | 'submitting' | 'done' | 'error'

ProductScopeProps

Props of ProductScope.

productrequiredProduct

The product the code below is about.

childrenrequiredReactNode

The code that reads the product.

ProductBuy

The buy box of the nearest product: the chosen variant, the quantity and adding it to the cart.

productrequiredProduct

The product being bought.

variantrequiredVariant | null

The chosen variant, or null while the choice matches none.

quantityrequirednumber

The quantity to add.

setQuantityrequired(quantity: number) => void

Changes the quantity to add.

canAddrequiredboolean

Whether the chosen variant can be added now.

isAddingrequiredboolean

Whether an add is under way.

errorrequiredstring | null

Why the last add failed, in the page language, or null.

addrequired() => Promise<CartResult>

Adds the chosen variant and quantity to the cart; on the product page also the personalisation, gift card and bundle filled in.

ctaLabelrequiredstring

The buy button's text: add to cart, pre-order or sold out, in the page language.

walletrequired{ readonly visible: boolean; }

The express wallets of the product page.

wholesalerequiredWholesaleTiersView | null

A wholesale buyer's tier prices for the chosen variant, or null for everyone else.

personalizationrequiredPersonalizationState | null

The texts the shopper fills in to personalise the item, or null when the product has none or the box is not the product page's.

giftCardrequiredGiftCardState | null

The gift card's amount, recipient and delivery, or null for a product that is not a gift card or a box that is not the product page's.

bundlerequiredBundleSelectionState | null

The bundle offered with the product and the shopper's choice in it, or null without an offer.

GalleryAspect

How a gallery frame crops its image.

type GalleryAspect = 'square' | 'portrait' | 'landscape' | 'natural'

ProductGalleryImageProps

Props of ProductGalleryImage.

imagerequiredMediaImageRef | null

The image, or null for the placeholder.

aspectGalleryAspect

How the frame crops the image; defaults to square.

priorityboolean

Loads the image first, for the one above the fold.

classNamestring

Classes added to the frame.

ProductGalleryProps

Props of ProductGallery.

layout'grid' | 'carousel' | 'single'

Every image stacked, one image with thumbnails, or the first image alone; defaults to the stack.

aspectGalleryAspect

How the frames crop the images; defaults to square.

classNamestring

Classes added to the gallery.

ProductGalleryThumbsProps

Props of ProductGalleryThumbs.

imagesrequiredreadonly MediaImageRef[]

The images, in order.

activerequirednumber

The index of the image shown.

onSelectrequired(index: number) => void

Shows the image at an index.

classNamestring

Classes added to the row.

BundleConfiguratorProps

Props of BundleConfigurator.

bundlerequiredBundle

The bundle to configure.

horizontalboolean

Lays the items out in a row.

hideHeadingboolean

Leaves out the bundle's heading.

classNamestring

Classes added to the configurator.

BundleSuggestionsProps

Props of BundleSuggestions.

bundlesrequiredreadonly Bundle[]

The bundles to suggest, best first.

activeBundleIdrequiredstring | null

The id of the bundle being configured, which shows as selected.

onSelectBundlerequired(bundleId: string) => void

Called with the id of the bundle the shopper chose to configure.

classNamestring

Classes added to the panel.

Bundle

A bundle: products sold together at a saving.

idrequiredstring

The bundle's id.

titlerequiredstring

The bundle's title.

moderequiredBundleMode

How the bundle sells.

headingrequiredstring | null

The merchant's heading for the offer, or null.

subtextrequiredstring | null

The merchant's line under the heading, or null.

badgerequiredstring | null

The merchant's badge text, such as "Save 15%", or null.

productIdrequiredstring

The product the bundle is offered with.

currencyCoderequiredstring | null

The currency of the bundle's amounts, or null while unknown.

groupsrequiredreadonly BundleGroup[]

The groups items are chosen in.

itemsrequiredreadonly BundleItem[]

The items, in the merchant's order.

BundleGroup

A group of bundle items the shopper picks a number of, such as "Choose 2 sauces".

idrequiredstring

The group's id.

labelrequiredstring

The group's label in the page language.

minrequirednumber

The fewest items to choose.

maxrequirednumber

The most items to choose.

Last updated