Hi,
In 7.5, the dictionary types are not supported by Catalog contents. You need to update to latest nuget package (7.7.2 or later) to enable the support.
Regards.
/Q
Thanks for replying.
I have updated project through nuget and it is still not working. Is it sufficient just declaring the property like above, or do I need to decorate the property with a specific attribute?
I have version 7.7.2.24 of Mediachase.
I'm sorry to read it too fast. The dictionary types we're supporting are Single and Multi dictionary. The StringDictionary, as it has some special characteristics, will not be supported for now - You'll need to edit it via CM.
Thank you.
/Q
Ok, so I will not be able to handle the string dictionary as Content. The reason is that I am writing an import job, that creates variantions and add them to the catalog. So basically I would need to either change the datatype to a multivalue dictionary. Or handle the standard properties as content and then pull out the old trusted MetaHelper and edit them the same way as before.
So how do you decorate the property for Single and Multi dictionary? Neither of following is working:
public virtual MetaDictionary SchoolType { get; set; }
public virtual DictionarySingleEditorDescriptor MySingleDictionaryProperty { get; set; }
Can't seem to find any info on what to use for the Dictionary properties?
I'm running Commerce 7.7.
/J
Found it:
[BackingType(typeof(PropertyDictionarySingle))]
public virtual string MyTestDictionary { get; set; }
[BackingType(typeof(PropertyDictionaryMultiple))]
public virtual ItemCollection<string> MyTestMultiDictionary { get; set; }
/J
I am creating a site with EPiServer Commerce 7.5 and I want to declare my variation metaclass from code.
Everything works fine except I have two fields that is of the StringDictionary in Commerce.
How do i declare those properties and decorate them so that they are interpreted as the type stringdictionary?
As of i now i have only done this:
[Display(Name = "OffersText")]
public virtual MetaStringDictionary OffersText { get; set; }
But I get the following error:
The type Mediachase.MetaDataPlus.MetaStringDictionary can not be mapped to a MetaDataType
I have also tried wth the type StringDictionary but i get the following error.