All Sitecore Commerce 8.0 powered by Commerce Server and Commerce Server
11.2
property types are mapped, but you may want to change the Sitecore field
control used to edit the value of a specific Commerce Catalog property by name.
Complete the following prerequisites:
-
Create a new .config file in the Website\App_Config\Include
directory of your Sitecore site.
Note: The system applies the files in alphnumeric order. Ensure the file
containing your overrides is named to run after
CommerceServer.config, For example
zzCommerceServer.config or My.Overrides.CommerceServer.config
-
Create a configuration section that adds or overrides the sitecorename
attribute for the Commerce Catalog property you want to change.
For example, the following configuration adds a new field mapping that
directs the “ProductColor” property to be edited with a
Sitecore
Droplist control with a custom source:
<configuration
xmlns:patch="http://www.sitecore.net/xmlconfig/"><configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<commerceServer>
<catalogFieldTypeMapping>
<field sitecorename="Droplist" cspropertyname="ProductColor" source="/sitecore/system/Dictionary/ColorValues" />
</catalogFieldTypeMapping>
</commerceServer>
</sitecore>
</configuration>
Note: If
you are changing the Sitecore control associated with a Commerce property that is already defined in
CommerceServer.config, add an attribute
patch:instead="field[@cspropertyname='property']" where
property is the value of the
cspropertyname attribute in your <field>
element.
-
Save and close the file
-
Restart IIS.