Click or drag to resize
MultiBuyDiscountsEvaluatorCanBeDiscounted Method
Checks if given item can be discounted using given discount.

Namespace: CMS.Ecommerce
Assembly: CMS.Ecommerce (in CMS.Ecommerce.dll) Version: 9.0.0
Syntax
C#
protected virtual bool CanBeDiscounted(
	ShoppingCartItemInfo item,
	IMultiBuyDiscount discount,
	IDictionary<ShoppingCartItemInfo, int> basedOnItems,
	IDictionary<ShoppingCartItemInfo, int> alreadyDiscountedItems
)

Parameters

item
Type: CMS.EcommerceShoppingCartItemInfo
Item to be checked.
discount
Type: CMS.EcommerceIMultiBuyDiscount
Discount to be checked.
basedOnItems
Type: System.Collections.GenericIDictionaryShoppingCartItemInfo, Int32
Units with number of units found as base for given discount.
alreadyDiscountedItems
Type: System.Collections.GenericIDictionaryShoppingCartItemInfo, Int32
Units with number of units already found as suitable for given discount.

Return Value

Type: Boolean
Returns true if discount is applicable on given item.
See Also