Table of Contents

Interface IPromotionCoveredQuantityCalculator

Namespace
CMS.Commerce
Assembly
CMS.Commerce.dll

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

item IPriceCalculationResultItem<ProductIdentifier, ProductData>

Price calculation result item the candidate belongs to.

candidate IPriceCalculationPromotionCandidate<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

item IPriceCalculationResultItem<ProductIdentifier, ProductData>

Price calculation result item the candidate belongs to.

candidate IPriceCalculationPromotionCandidate<CatalogPromotionCandidate>

Catalog promotion candidate of the item.

Returns

decimal

The number of covered units, or 0 when the candidate is not applied.