You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All Order Discount Rule Providers inherit from a base class `OrderDiscountRuleProviderBase<TSettings>`. `TSettings` is the type of a Plain Old Class Object (POCO) model class representing the Discount Rule Providers settings.
@@ -54,7 +58,7 @@ See the [Settings Objects](discount-rules-and-rewards.md#settings-objects) secti
54
58
The class must be decorated with `DiscountRuleProviderAttribute` which defines the Discount Rule Providers `alias` and `name`, and can also specify a `description` or `icon` to be displayed in the backoffice. The `DiscountRuleProviderAttribute` is also responsible for defining a `labelView` for the Provider.
55
59
56
60
{% hint style="info" %}
57
-
See the [Label views](discount-rules-and-rewards.md#label-views) section below for more information on Label Views.
61
+
See the [Labels](discount-rules-and-rewards.md#labels) section below for more information on Label Views.
58
62
{% endhint %}
59
63
60
64
Rule Providers have a `ValidateRule` method that accepts a `DiscountRuleContext` as well as an instance of the Providers `TSettings` settings model. Inside this you can perform your custom logic, returning a `DiscountRuleResult` to notify Umbraco Commerce of the Rule outcome.
@@ -66,24 +70,26 @@ If the passed-in context (which contains a reference to the Order) meets the Rul
66
70
An example of an Order Line Discount Rule Provider would look something like this:
All Discount Reward Providers inherit from a base class `DiscountRewardProviderBase<TSettings>`. `TSettings` is the Type of a POCO model class representing the Discount Reward Providers settings.
@@ -129,7 +157,7 @@ See the [Settings Objects](settings-objects.md) documentation for more informati
129
157
The class must be decorated with `DiscountRewardProviderAttribute` which defines the Discount Reward Providers `alias` and `name`. It can also specify a `description` or `icon` to be displayed in the Umbraco Commerce backoffice. The `DiscountRewardProviderAttribute` is responsible for defining a `labelView` for the Provider.
130
158
131
159
{% hint style="info" %}
132
-
See the [Label views](discount-rules-and-rewards.md#label-views) section below for more information on Label Views.
160
+
See the [Labels](discount-rules-and-rewards.md#labels) section below for more information on Label Views.
133
161
{% endhint %}
134
162
135
163
Reward Providers have a `CalculateReward` method that accepts a `DiscountRewardContext` as well as an instance of the Providers `TSettings` settings model. Inside this, you can perform your custom calculation logic, returning a `DiscountRewardCalculation` instance that defines any Reward values to apply to the Order.
@@ -152,48 +180,67 @@ See the [Settings Objects](settings-objects.md) documentation for more informati
152
180
153
181
### Labels
154
182
155
-
Both the `DiscountRuleProviderAttribute` and the `DiscountRewardProviderAttribute` allow you to define a `LabelUiAlias` for the Provider. This should be the alias of a UI component registered as a Property Editor UI implementation.
183
+
Both the `DiscountRuleProviderAttribute` and the `DiscountRewardProviderAttribute` allow you to define a `ViewUiAlias` to use as a label for the Provider. This should be the alias of a UI component registered as a Property Editor UI implementation.
@@ -217,4 +264,4 @@ Umbraco Commerce will automatically look for the following entries:
217
264
|`ucDiscount{type}Providers_{providerAlias}Settings{settingAlias}Label`| A label for a rule/reward provider setting |
218
265
|`ucDiscount{type}Providers_{providerAlias}Settings{settingAlias}Description`| A description for a rule/reward provider setting |
219
266
220
-
Here `{type}` can be either `Rule` or `Reward`. `{providerAlias}` is the alias of the rule/reward provider, and `{settingAlias}` is the alias of a setting.
267
+
Here `{type}` can be either `Rule` or `Reward`. `{providerAlias}` is the alias of the rule/reward provider, and `{settingAlias}` is the alias of a setting.
0 commit comments