IPriceSelectionStrategy
Methods
calculateVariantPrice
Calculate the original and discount price for a given variant in a set of circumstances described in the context.
Parameters
data
object[]Required
data
object[]RequiredDetails relevant to determine the correct pricing of the variant
Returns
pricing details in an object containing the calculated lowest price,
the default price an all valid prices for the given variant
onVariantsPricesUpdate
Notify price selection strategy that variants prices have been updated.
Parameters
variantIds
string[]RequiredThe ids of the updated variants
Returns
Promise
Promise<void>RequiredwithTransaction
Parameters
transactionManager
EntityManagerReturns
calculateVariantPrice
(data: { quantity?: number ; variantId: string }[], context: PriceSelectionContext) => Promise<Map<string, PriceSelectionResult>>RequiredonVariantsPricesUpdate
(variantIds: string[]) => Promise<void>RequiredWas this section helpful?