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?
- To improve the performance of the application.
- To delete existing standard settings.
- To provide configuration for new or existing features. (correct)
- To automate testing processes in the 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?
- Add a new project.
- Open the Configured Commerce solution. (correct)
- Open the Admin Console.
- Create a new solution.
Which class does the 'UserLabelSettings' class inherit from?
Which class does the 'UserLabelSettings' class inherit from?
- UserSettings
- BaseSettingsGroup (correct)
- ISettingsGroup
- BaseSettingsManager
What attribute is used to decorate the 'UserLabelSettings' class?
What attribute is used to decorate the 'UserLabelSettings' class?
What value is set for PrimaryGroupName in the 'UserLabelSettings' class?
What value is set for PrimaryGroupName in the 'UserLabelSettings' class?
What happens to settings groups that share the same PrimaryGroupName and Label?
What happens to settings groups that share the same PrimaryGroupName and Label?
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?
What is displayed in the Admin Console above the settings of 'UserLabelSettings'?
What is displayed in the Admin Console above the settings of 'UserLabelSettings'?
What attribute decorates the 'LabelFormat' property in the UserLabelSettings class?
What attribute decorates the 'LabelFormat' property in the UserLabelSettings class?
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?
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?
What is the purpose of the FormatUserLabel class in the handler chain?
What is the purpose of the FormatUserLabel class in the handler chain?
Which class does FormatUserLabel inherit from?
Which class does FormatUserLabel inherit from?
What does the DisplayName property of the [SettingsField] attribute specify?
What does the DisplayName property of the [SettingsField] attribute specify?
What namespace is the UserLabelSettings class defined in?
What namespace is the UserLabelSettings class defined in?
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?
What will the Description property of the [SettingsField] attribute do when displayed?
What will the Description property of the [SettingsField] attribute do when displayed?
What is the type of the parameter that FormatUserLabel's constructor accepts?
What is the type of the parameter that FormatUserLabel's constructor accepts?
Which aspect of the Execute method is highlighted in the content?
Which aspect of the Execute method is highlighted in the content?
What is the base class that UserLabelSettings inherits from?
What is the base class that UserLabelSettings inherits from?
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?
How is the FormatUserLabel class decorated to provide its dependency name?
How is the FormatUserLabel class decorated to provide its dependency name?
What exception is thrown in the Execute method of the FormatUserLabel class?
What exception is thrown in the Execute method of the FormatUserLabel class?
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?
What happens if the Label Format value is left blank?
What happens if the Label Format value is left blank?
How can you revert to the default value for a setting?
How can you revert to the default value for a setting?
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?
What are settings primarily used for in Configured Commerce?
What are settings primarily used for in Configured Commerce?
What occurs when a new setting is first created?
What occurs when a new setting is first created?
Which statement is true regarding the standard settings in Configured Commerce?
Which statement is true regarding the standard settings in Configured Commerce?
Where can you view the configured setting after saving it?
Where can you view the configured setting after saving it?
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?
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?
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?
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?
Which namespace contains the FormatUserLabel
class?
Which namespace contains the FormatUserLabel
class?
What is the purpose of the userLabelSettings
variable in the FormatUserLabel
class?
What is the purpose of the userLabelSettings
variable in the FormatUserLabel
class?
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?
Which method replaces placeholders in the formatted label?
Which method replaces placeholders in the formatted label?
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?
Flashcards
Custom Settings
Custom Settings
Configurable options for features in Configured Commerce
BaseSettingsGroup
BaseSettingsGroup
Parent class for custom settings groups
IExtension Interface
IExtension Interface
Requirement for custom settings; adds features from this interface
[SettingsGroup]
[SettingsGroup]
Signup and view all the flashcards
PrimaryGroupName
PrimaryGroupName
Signup and view all the flashcards
Label
Label
Signup and view all the flashcards
SettingsGroup Tabs
SettingsGroup Tabs
Signup and view all the flashcards
[SettingsField]
[SettingsField]
Signup and view all the flashcards
DisplayName
DisplayName
Signup and view all the flashcards
Description
Description
Signup and view all the flashcards
Accessing Settings
Accessing Settings
Signup and view all the flashcards
Admin Console Settings
Admin Console Settings
Signup and view all the flashcards
Default Value
Default Value
Signup and view all the flashcards
Restore Default
Restore Default
Signup and view all the flashcards
User Label on Storefront
User Label on Storefront
Signup and view all the flashcards
LabelFormat
LabelFormat
Signup and view all the flashcards
Named Tokens
Named Tokens
Signup and view all the flashcards
Configured Commerce
Configured Commerce
Signup and view all the flashcards
Configuration
Configuration
Signup and view all the flashcards
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.