Interface IPromotionCoveredQuantityCalculator
Calculates the number of units of a price calculation result item that a promotion candidate covers.
public interface IPromotionCoveredQuantityCalculator
- Extension Methods
Remarks
The methods return a value only for applied candidates. Call them after the price calculation decides which candidates apply to which item. Before that, every candidate is not applied and the methods return 0.
Methods
GetCoveredQuantity(IPriceCalculationResultItem<ProductIdentifier, ProductData>, IPriceCalculationPromotionCandidate<CartItemPromotionCandidate>)
Gets the number of units of the item the cart item promotion candidate covers.
decimal GetCoveredQuantity(IPriceCalculationResultItem<ProductIdentifier, ProductData> item, IPriceCalculationPromotionCandidate<CartItemPromotionCandidate> candidate)
Parameters
itemIPriceCalculationResultItem<ProductIdentifier, ProductData>Price calculation result item the candidate belongs to.
candidateIPriceCalculationPromotionCandidate<CartItemPromotionCandidate>Cart item promotion candidate of the item.
Returns
- decimal
The number of covered units, or 0 when the candidate is not applied.
GetCoveredQuantity(IPriceCalculationResultItem<ProductIdentifier, ProductData>, IPriceCalculationPromotionCandidate<CatalogPromotionCandidate>)
Gets the number of units of the item the catalog promotion candidate covers.
decimal GetCoveredQuantity(IPriceCalculationResultItem<ProductIdentifier, ProductData> item, IPriceCalculationPromotionCandidate<CatalogPromotionCandidate> candidate)
Parameters
itemIPriceCalculationResultItem<ProductIdentifier, ProductData>Price calculation result item the candidate belongs to.
candidateIPriceCalculationPromotionCandidate<CatalogPromotionCandidate>Catalog promotion candidate of the item.
Returns
- decimal
The number of covered units, or 0 when the candidate is not applied.