Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Solved this!
Using this method to generate string for csv import file:
private static string ToMetaStringDictionary(IList<string> list)
{
var dictionary = new MetaStringDictionary();
var serializer = new JavaScriptSerializer();
for (var i = 0; i < list.Count; i++)
{
dictionary.Add("Bullet" + i, list[i]);
}
return serializer.Serialize(dictionary);
}
It will generate something like this:
"[{""Key"":""bullet2"",""Value"":""value 1""},{""Key"":""bullet1"",""Value"":""value 2""},{""Key"":""bullet0"",""Value"":""value 3""}]"
and use this in mapping file:
<RuleItem>
<SourColumnName>Bullet Point List</SourColumnName>
<SourColumnType>System.String</SourColumnType>
<DestColumnName>BulletPointList</DestColumnName>
<DestColumnType>StringDictionary</DestColumnType>
<FillType>CopyValue</FillType>
<CustomValue />
<DestColumnSystem>False</DestColumnSystem>
</RuleItem>
Is it possible to import meta field of type 'String Dictionary' using EPiServer Commerce Csv import?
If so, then how that should look in mapping file and csv file?
PS. I'm using: "Entry w/ Meta Data" mapping type.
For example, to import meta filed type: 'Short string', mapping file part for that is:
<RuleItem>
<SourColumnName>Price Other</SourColumnName>
<SourColumnType>System.String</SourColumnType>
<DestColumnName>PriceOther</DestColumnName>
<DestColumnType>ShortString</DestColumnType>
<FillType>CopyValue</FillType>
<CustomValue />
<DestColumnSystem>False</DestColumnSystem>
</RuleItem>
and csv is stright forward one column.
Its described here:
http://sdk.episerver.com/commerce/1.1.1/Content/User%20Guide/CatalogManagement/Using%20CSV%20Files%20to%20Quickly.htm
But i cannot find anything about 'String Dictionary' meta field type.