Fejlesztőknek
Kezdj bele
Témák/Theme SDK/Modules/product/Defaults: VariantPicker to BundleSelector

Defaults: VariantPicker to BundleSelector

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

The defaults of @poltura/theme-sdk/product, VariantPicker to BundleSelector.

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

VariantPicker

The complete variant picker of the nearest product, built from its parts.

VariantPicker(props: VariantPickerProps): ReactElement | null

Props: VariantPickerProps

import { VariantPicker } from '@poltura/theme-sdk/product';

export function BuyColumn() {
  return <VariantPicker display='auto' />;
}

See also: useVariantPicker, VariantOption, VariantOptionValue, VariantSwatch

BundleSelector

The complete bundle offer of the product page: its items, groups, suggested sets and savings.

BundleSelector(props: BundleSelectorProps): ReactElement | null

Place one with placement='below' under the product's columns too: a wide bundle draws there, and the buy box scrolls to it.

Props: BundleSelectorProps

Example

import { BundleSelector } from '@poltura/theme-sdk/product';

export function Offer() {
  return <BundleSelector className='mt-4' />;
}

export function WideOffer() {
  return <BundleSelector placement='below' />;
}

See also: useBundleSelection

Utoljára frissítve