-
Notifications
You must be signed in to change notification settings - Fork 814
Closed
Description
What type of issue is it? (Choose one - delete the others)
Wrong documentation
What article/section is this about?
Describe the issue
In the example code for custom discount reward provider, the attributes used on the properties of the TieredPercentageSettings class are wrong. They are of type DiscountRuleProviderSetting, but they should be DiscountRewardProviderSetting.
So this code:
public class TieredPercentageSettings
{
[DiscountRuleProviderSetting(Key = "baseTierPercentage")]
public decimal BaseTierPercentage { get; set; }
[DiscountRuleProviderSetting(Key = "midTierThreshold")]
public decimal MidTierThreshold { get; set; }
[DiscountRuleProviderSetting(Key = "midTierPercentage")]
public decimal MidTierPercentage { get; set; }
[DiscountRuleProviderSetting(Key = "highTierThreshold")]
public decimal HighTierThreshold { get; set; }
[DiscountRuleProviderSetting(Key = "highTierPercentage")]
public decimal HighTierPercentage { get; set; }
}
should be changed to:
public class TieredPercentageSettings
{
[DiscountRewardProviderSetting(Key = "baseTierPercentage")]
public decimal BaseTierPercentage { get; set; }
[DiscountRewardProviderSetting(Key = "midTierThreshold")]
public decimal MidTierThreshold { get; set; }
[DiscountRewardProviderSetting(Key = "midTierPercentage")]
public decimal MidTierPercentage { get; set; }
[DiscountRewardProviderSetting(Key = "highTierThreshold")]
public decimal HighTierThreshold { get; set; }
[DiscountRewardProviderSetting(Key = "highTierPercentage")]
public decimal HighTierPercentage { get; set; }
}