Click or drag to resize
ECommerceHelperGetDiscountValue Method (Double, IItemDiscount, FuncDouble, Double)
Returns discount calculated from given price. Exchange rate applicator function will be applied if discount is global and flat.

Namespace: CMS.Ecommerce
Assembly: CMS.Ecommerce (in CMS.Ecommerce.dll) Version: 8.2.23
Syntax
C#
public static double GetDiscountValue(
	double price,
	IItemDiscount discount,
	Func<double, double> exchangeRateApplicator
)

Parameters

price
Type: SystemDouble
Price to calculate discount from.
discount
Type: CMS.EcommerceIItemDiscount
Discount to apply
exchangeRateApplicator
Type: SystemFuncDouble, Double
Converts flat discount in global main currency to currency in which the price is expressed.

Return Value

Type: Double
See Also