Click or drag to resize
ItemDiscountProviderCalculateUnitDiscount Method
Calculates value of the unit discount when it is applied to the given shopping cart item.

Namespace: CMS.Ecommerce
Assembly: CMS.Ecommerce (in CMS.Ecommerce.dll) Version: 8.2.23
Syntax
C#
public static double CalculateUnitDiscount(
	ShoppingCartItemInfo item,
	IItemDiscount discount,
	double basePrice = 0
)

Parameters

item
Type: CMS.EcommerceShoppingCartItemInfo
Shopping cart item
discount
Type: CMS.EcommerceIItemDiscount
Discount data
basePrice (Optional)
Type: SystemDouble
Price to apply discount to.

Return Value

Type: Double
See Also