Click or drag to resize
DiscountInfoProviderCalculateUnitDiscount Method
Calculates shopping cart item unit discount after the specified discount is applied.

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

Parameters

item
Type: CMS.EcommerceShoppingCartItemInfo
Shopping cart item to which the discount should be applied
discount
Type: CMS.EcommerceDiscountInfo
Discount data
basePrice (Optional)
Type: SystemDouble
Price to apply discount to.

Return Value

Type: Double
See Also