ProductDiscountSourceCreatePercentageProductDiscount Method |
Creates a new percentage product discount of the specified displayName.
The amount of the discount is specified by rate parameter.
Namespace: CMS.EcommerceAssembly: CMS.Ecommerce (in CMS.Ecommerce.dll) Version: 12.0.0
Syntax 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:
IDiscountRemarks
Override this method to change the way the system calculates percentage product discounts.
See Also