Skip to content

Commit 5472b6a

Browse files
Add example of using ViewUiAlias
1 parent 1e543a0 commit 5472b6a

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

16/umbraco-commerce/key-concepts/discount-rules-and-rewards.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public class CustomerEmailDomainRuleProvider : OrderDiscountRuleProviderBase<Cus
4444

4545
public class CustomerEmailDomainSettings
4646
{
47-
[DiscountRuleProviderSetting(Key = "emailDomain")]
47+
[DiscountRuleProviderSetting(Key = "emailDomain", LabelUiAlias = "My.PropertyEditorUi.MyDiscountRuleLabel")]
4848
public string EmailDomain { get; set; }
4949
}
5050
```
@@ -180,7 +180,15 @@ See the [Settings Objects](settings-objects.md) documentation for more informati
180180

181181
### Labels
182182

183-
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.
184+
185+
```csharp
186+
public class CustomerEmailDomainSettings
187+
{
188+
[DiscountRuleProviderSetting(Key = "emailDomain", ViewUiAlias = "My.PropertyEditorUi.CustomerEmailDomainDiscountRuleLabel")]
189+
public string EmailDomain { get; set; }
190+
}
191+
```
184192

185193
A basic label component is defined as follows:
186194

0 commit comments

Comments
 (0)