Skip to main content

ProductVariantPriceCalculationStrategy

ProductVariantPriceCalculationStrategy

Defines how ProductVariant are calculated based on the input price, tax zone and current request context.

info

This is configured via the catalogOptions.productVariantPriceCalculationStrategy property of your VendureConfig.

Signature
interface ProductVariantPriceCalculationStrategy extends InjectableStrategy {
calculate(args: ProductVariantPriceCalculationArgs): Promise<PriceCalculationResult>;
}

ProductVariantPriceCalculationArgs

The arguments passed the calculate method of the configured ProductVariantPriceCalculationStrategy.

Signature
interface ProductVariantPriceCalculationArgs {
inputPrice: number;
taxCategory: TaxCategory;
activeTaxZone: Zone;
ctx: RequestContext;
}

inputPrice

property
number

taxCategory

property

activeTaxZone

property

ctx