🚨 Announcing Vendure v2 Beta

ProductVariantPriceCalculationStrategy

ProductVariantPriceCalculationStrategy

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

Signature

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

Extends

Members

calculate

ProductVariantPriceCalculationArgs

The arguments passed the the calculate method of the configured ProductVariantPriceCalculationStrategy.

Signature

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

Members

inputPrice

property
type:
number

taxCategory

property
type:
TaxCategory

activeTaxZone

property
type:
Zone

ctx

property