Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions 16/umbraco-commerce/key-concepts/settings-objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ There are places in Umbraco Commerce where you can use Settings Objects to pass
The settings objects have a number of responsibilities.

* **Typed Settings Model** - The type represents a strongly typed settings model the given Provider accepts. Any stored settings in the database will be deserialized to this type before being passed to the Provider for processing. This provides strongly typed access to the relevant configuration settings.
* **UI Scaffold** - The settings object defines metadata on its properties via an Attribute implementing `UmbracoCommerceSettingAttribute`, each Provider type has its own attribute type in case they require additional config, for example `DiscountRewardProviderSettingAttribute`, `DiscountRuleProviderSettingAttribute` or `PaymentProviderSettingAttribute`. The attributes are used to dynamically build the AngularJS-based UI for the given Provider configuration. See the [UI Scaffolding](settings-objects.md#ui-scaffolding) section below for more information on UI Scaffolding.
* **UI Scaffold** - The settings object defines metadata on its properties via an Attribute implementing `UmbracoCommerceSettingAttribute`, each Provider type has its own attribute type in case they require additional config, for example `DiscountRewardProviderSettingAttribute`, `DiscountRuleProviderSettingAttribute` or `PaymentProviderSettingAttribute`. The attributes are used to dynamically build the UI for the given Provider configuration. See the [UI Scaffolding](settings-objects.md#ui-scaffolding) section below for more information on UI Scaffolding.
* **JavaScript Settings Model** - The settings object also defines the JavaScript settings model passed to the Provider editor UI, using either the settings Property name as the object property key, or using the `Key` property of the Setting Attribute declared on the given Property.

## UI Scaffolding
Expand All @@ -30,7 +30,11 @@ public class MyDiscountRewardProviderSettings
}
```

Attributes define an optional `Key` parameter to override the default setting alias which would otherwise be the property name in camel case. An optional `EditorUiAlias` and `EdiutorConfig` options can also be defined to control the Umbraco property editor used to edit the given property. If no view is defined, one will attempt to be automatically chosen based on the property's value type.
Attributes define an optional `Key` parameter to override the default setting alias which would otherwise be the property name in camel case. An optional `EditorUiAlias` and `EditorConfig` options can also be defined to control the Umbraco property editor used to edit the given property. If no view is defined, one will attempt to be automatically chosen based on the property's value type.

{% hint style="info" %}
See the CMS documentation for a list of [available Property Editor UI elements and their config properties](/umbraco-cms/reference/property-editor-uis).
{% endhint %}

Labels and descriptions for settings are controlled through [Localization](#localization) entries.

Expand Down