ProductVariantPriceSelectionStrategy
The strategy for selecting the price for a ProductVariant in a given Channel.
Info
This is configured via the catalogOptions.productVariantPriceSelectionStrategy property of
your VendureConfig.
- Extends:
InjectableStrategy
selectPrice
method
(ctx: RequestContext, prices: ProductVariantPrice[]) => ProductVariantPrice | undefined | Promise<ProductVariantPrice | undefined>The default strategy for selecting the price for a ProductVariant in a given Channel. It first filters all available prices to those which are in the current Channel, and then selects the first price which matches the current currency.
- Implements:
ProductVariantPriceSelectionStrategy
selectPrice
method
(ctx: RequestContext, prices: ProductVariantPrice[]) => Was this chapter helpful?