Click or drag to resize
ProductDiscountSourceCreatePercentageProductDiscount Method
Creates a new percentage product discount of the specified displayName. The amount of the discount is specified by rate parameter.

Namespace: CMS.Ecommerce
Assembly: CMS.Ecommerce (in CMS.Ecommerce.dll) Version: 11.0.0
Syntax
C#
protected virtual IDiscount CreatePercentageProductDiscount(
	string displayName,
	decimal rate,
	PriceParameters priceParams
)

Parameters

displayName
Type: SystemString
The display name of the discount.
rate
Type: SystemDecimal
The rate of the discount (use 0.2 for 20% discount).
priceParams
Type: CMS.EcommercePriceParameters
Other parameters.

Return Value

Type: IDiscount
Remarks
Override this method to change the way the system calculates percentage product discounts.
See Also