Podcast
Questions and Answers
What is the purpose of creating custom settings in the Admin Console?
What is the purpose of creating custom settings in the Admin Console?
What is the first step in creating a new settings class in Visual Studio?
What is the first step in creating a new settings class in Visual Studio?
Which class does the 'UserLabelSettings' class inherit from?
Which class does the 'UserLabelSettings' class inherit from?
What attribute is used to decorate the 'UserLabelSettings' class?
What attribute is used to decorate the 'UserLabelSettings' class?
Signup and view all the answers
What value is set for PrimaryGroupName in the 'UserLabelSettings' class?
What value is set for PrimaryGroupName in the 'UserLabelSettings' class?
Signup and view all the answers
What happens to settings groups that share the same PrimaryGroupName and Label?
What happens to settings groups that share the same PrimaryGroupName and Label?
Signup and view all the answers
Which interface must be implemented to make custom settings available in the Admin Console?
Which interface must be implemented to make custom settings available in the Admin Console?
Signup and view all the answers
What is displayed in the Admin Console above the settings of 'UserLabelSettings'?
What is displayed in the Admin Console above the settings of 'UserLabelSettings'?
Signup and view all the answers
What attribute decorates the 'LabelFormat' property in the UserLabelSettings class?
What attribute decorates the 'LabelFormat' property in the UserLabelSettings class?
Signup and view all the answers
What is the primary purpose of the GetValue method as used in the LabelFormat property?
What is the primary purpose of the GetValue method as used in the LabelFormat property?
Signup and view all the answers
What format string is used in the Default Value of the LabelFormat property?
What format string is used in the Default Value of the LabelFormat property?
Signup and view all the answers
What is the purpose of the FormatUserLabel class in the handler chain?
What is the purpose of the FormatUserLabel class in the handler chain?
Signup and view all the answers
Which class does FormatUserLabel inherit from?
Which class does FormatUserLabel inherit from?
Signup and view all the answers
What does the DisplayName property of the [SettingsField] attribute specify?
What does the DisplayName property of the [SettingsField] attribute specify?
Signup and view all the answers
What namespace is the UserLabelSettings class defined in?
What namespace is the UserLabelSettings class defined in?
Signup and view all the answers
What should the Order property of FormatUserLabel be set to ensure it runs last?
What should the Order property of FormatUserLabel be set to ensure it runs last?
Signup and view all the answers
What will the Description property of the [SettingsField] attribute do when displayed?
What will the Description property of the [SettingsField] attribute do when displayed?
Signup and view all the answers
What is the type of the parameter that FormatUserLabel's constructor accepts?
What is the type of the parameter that FormatUserLabel's constructor accepts?
Signup and view all the answers
Which aspect of the Execute method is highlighted in the content?
Which aspect of the Execute method is highlighted in the content?
Signup and view all the answers
What is the base class that UserLabelSettings inherits from?
What is the base class that UserLabelSettings inherits from?
Signup and view all the answers
What will happen if a setting does not exist in the database when GetValue is called?
What will happen if a setting does not exist in the database when GetValue is called?
Signup and view all the answers
How is the FormatUserLabel class decorated to provide its dependency name?
How is the FormatUserLabel class decorated to provide its dependency name?
Signup and view all the answers
What exception is thrown in the Execute method of the FormatUserLabel class?
What exception is thrown in the Execute method of the FormatUserLabel class?
Signup and view all the answers
What would likely happen if static characters were included in the label format?
What would likely happen if static characters were included in the label format?
Signup and view all the answers
What happens if the Label Format value is left blank?
What happens if the Label Format value is left blank?
Signup and view all the answers
How can you revert to the default value for a setting?
How can you revert to the default value for a setting?
Signup and view all the answers
What is the first action required to see the configured user label format in action?
What is the first action required to see the configured user label format in action?
Signup and view all the answers
What are settings primarily used for in Configured Commerce?
What are settings primarily used for in Configured Commerce?
Signup and view all the answers
What occurs when a new setting is first created?
What occurs when a new setting is first created?
Signup and view all the answers
Which statement is true regarding the standard settings in Configured Commerce?
Which statement is true regarding the standard settings in Configured Commerce?
Signup and view all the answers
Where can you view the configured setting after saving it?
Where can you view the configured setting after saving it?
Signup and view all the answers
What is one option available if the standard settings do not meet your needs?
What is one option available if the standard settings do not meet your needs?
Signup and view all the answers
What does the Execute
method in the FormatUserLabel
class do when the labelFormat
is not blank and result.UserProfile
is not null?
What does the Execute
method in the FormatUserLabel
class do when the labelFormat
is not blank and result.UserProfile
is not null?
Signup and view all the answers
In what situation is the user label not formatted according to the provided code?
In what situation is the user label not formatted according to the provided code?
Signup and view all the answers
What must be done before the user label settings can be seen in action?
What must be done before the user label settings can be seen in action?
Signup and view all the answers
Which namespace contains the FormatUserLabel
class?
Which namespace contains the FormatUserLabel
class?
Signup and view all the answers
What is the purpose of the userLabelSettings
variable in the FormatUserLabel
class?
What is the purpose of the userLabelSettings
variable in the FormatUserLabel
class?
Signup and view all the answers
What happens if the Order
property in the FormatUserLabel
class is set to a lower value than other handlers?
What happens if the Order
property in the FormatUserLabel
class is set to a lower value than other handlers?
Signup and view all the answers
Which method replaces placeholders in the formatted label?
Which method replaces placeholders in the formatted label?
Signup and view all the answers
What is the first step to navigate to the Admin Console for an application?
What is the first step to navigate to the Admin Console for an application?
Signup and view all the answers
Study Notes
Creating Custom Settings in Configured Commerce
-
Custom settings can be created to provide configuration for new features or additional configuration for existing features.
-
To create custom settings, you need to:
- Inherit from the BaseSettingsGroup class
- Implement the IExtension interface
-
The [SettingsGroup] attribute is used to decorate the settings class.
- The PrimaryGroupName maps to an existing primary settings group.
- The Label is the title displayed above the settings in the Admin Console.
-
Settings groups that share the same PrimaryGroupName will display within the same settings finger tab in the Admin Console.
-
Settings groups that share the same PrimaryGroupName and Label will display within the same settings finger tab and under the same sub-group heading in the Admin Console.
-
The [SettingsField] attribute is used to decorate the properties in the settings class.
- It specifies how the setting is displayed in the Admin Console.
- DisplayName defines the label for the form element.
- Description provides a tooltip to explain the setting, shown when a question mark icon is hovered.
-
The settings class can be used in code to access the configured settings.
- Example:
userLabelSettings.LabelFormat
- Example:
-
Custom settings can be configured in the Admin Console under Administration > System > Settings.
- They will appear in a new finger tab based on the PrimaryGroupName.
- Settings within the same sub-group will be grouped together under their Label heading.
-
When a setting value does not exist in the database, the default value specified in the code is used.
- This default value is then stored in the database.
- Users can restore the setting to its default value using the "Restore default" link.
-
The application uses the configured settings to display the user label on the storefront.
- The label is generated using the
LabelFormat
property. - You can use named tokens like
{userName}
,{firstName}
, and{lastName}
to replace data from the user profile.
- The label is generated using the
-
Configured Commerce relies on configuration for many of its features.
- This configuration is provided through settings.
- Creating custom settings allows you to configure the application to meet your specific needs.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Related Documents
Description
This quiz explores the process of creating custom settings for new and existing features in Configured Commerce. Participants will learn about inheriting from the BaseSettingsGroup class, implementing the IExtension interface, and using attributes like [SettingsGroup] and [SettingsField] to manage settings in the Admin Console.