Developers
Start building
Themes/Theme SDK/Modules/price

price

Money, prices and price access: what a visitor may see and on which tax basis.

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

Hooks

NameWhat it is
usePriceThe amounts behind a price, for code that must compute with them.
usePriceAccessWhether the visitor may see prices, on which tax basis, and what unlocks them when hidden.

Parts

NameWhat it is
PriceThe price a shopper pays, on the visitor's tax basis, filled in per visitor on pages with live prices.
PriceRangeThe lowest to highest price across a product's variants, or its single price when they agree.
CompareAtPriceThe struck-through price before the markdown; nothing at full price.
DiscountBadgeThe markdown as a percentage label such as -20%; nothing at full price.
UnitPriceThe price per base measure, such as "12 900 Ft / kg", the EU unit price rule asks for.
TaxNote"+ VAT" or "net" beside prices for a visitor who sees net prices; nothing on gross.
PriceGateThe sign-in or apply link shown instead of prices to visitors the store hides them from.

Types

NameWhat it is
MeasureUnitA unit a product's contents or a unit price is measured in.
MoneyAn amount of money in major units (12.99, not 1299).
PriceAccessWhether and how the current visitor may see prices.
PriceBoundsThe lowest and highest price of a product's variants.
PriceDisplayModeWhich basis prices are shown on: with tax, without tax, or without tax plus a tax note.
PriceGateReasonWhy prices are hidden from the visitor: they must sign in, or apply for a business account.
PriceRefThe opaque key the storefront fills a live price into on pages with live prices.
PriceViewA price as a view model carries it; render it with the price parts.
ResolvedPriceA price worked out for the visitor's display mode, ready to show.
UnitMeasureA quantity with its unit, such as 500 g.
UnitPriceInfoThe price per base quantity the EU unit-pricing rules (98/6/EC) require, such as 4.20 per kg.
UnitPricingWhat a variant contains and the quantity its unit price is quoted per.
PricePropsProps of Price, CompareAtPrice, DiscountBadge and UnitPrice.
PriceRangePropsProps of PriceRange.
PriceNotePropsProps of TaxNote and PriceGate.
Last updated