One of the most exciting features in EPiServer Commerce 7.5 (for me) is MetaClass and MetaField mapping from code to the Catalog system in EPiServer Commerce. In short this allows you to create/edit/access MetaClass and MetaFields in EPiServer Commerce 7.5 through code in the same way you can for any other content type in EPiServer.

MetaField/MetaClass mapping can shorten front end integration time and ensures CMS developers who are familar with EPiServer 7.x can work with product data from EPiServer Commerce, just like any other content. The primary difference when working with MetaField/MetaClass mapping is that updates will affect the Catalog system (rather than the EPiServer Content database).

I wanted to describe what effect this mapping had in the Catalog system in a visual way so put together two diagrams to describe MetaClass and MetaField mapping.

MetaClass mapping

(click for full size)

MetaClass mapping

 

MetaField Configuration

(click for full size)

MetaField Configuration

 

Other attributes for MetaField control

Attributes also exist that give you further control over your MetaClass Configuration. The following table shows the attributes you can apply to your MetaFields for control over your MetaFields in code:

AttributeCommerce Manager Description
[CultureSpecific] Supports Multiple Languages
[Tokenize] Tokenize
[Encrypted] Use Encryption
[UseInComparison] Use in comparing
[IncludeValuesInSearchResults] Include Values in Search Results
[IncludeInDefaultSearch] Include in the Default Search
[SortableInSearchResults] Enable Sorting Search Results
[DecimalSettings] Decimal Precision/Scale
[Required] Allow Null Values

 

Further reading

The SDK contains info about the attributes described above: http://world.episerver.com/Documentation/Class-library/?documentId=commerce/7.5/abe65e91-7f2b-d4db-ff82-64fcc6f8a5db


Comments