Click or drag to resize
ShoppingCartItemInfoProviderCalculateUnitAverageDiscountInternal Method
Calculates average discount per shopping cart item unit. If discount is applied to all units of the shopping cart item average discount is equal to unit discount. Result is in site main currency.

Namespace: CMS.Ecommerce
Assembly: CMS.Ecommerce (in CMS.Ecommerce.dll) Version: 8.2.23
Syntax
C#
protected virtual double CalculateUnitAverageDiscountInternal(
	ShoppingCartItemInfo item,
	IItemDiscount discount,
	double subtotalDiscount
)

Parameters

item
Type: CMS.EcommerceShoppingCartItemInfo
Shopping cart item
discount
Type: CMS.EcommerceIItemDiscount
Discount which should be applied to the shopping cart item
subtotalDiscount
Type: SystemDouble
Calculated subtotal discount

Return Value

Type: Double
See Also