Quan Mai
Mar 27, 2019
  3894
(6 votes)

New feature in Commerce 13.1: StringDictionary support for catalog content

When we introduced strongly typed content type support for catalog items in Commerce 7.5, some of the metafield types were left unsupported. One of them was StringDictionary. While it's not the most common metafield type, it is used by several customers and we get the questions about supporting it from time to time.

We have had to say no each time, until now!

Upcoming Commerce 13.1 will add support for StringDictionary metafield type for catalog content. If you already have a StringDictionary with name "StringDict" (yeah, it's a bad name, but let's be generic) in your FashionProduct metaclass, you can map it with a strongly typed property in your FashionProduct content type like this:

[BackingType(typeof(PropertyStringDictionary))]
 public virtual IDictionary<string, string> StringDict { get; set; }

BackingType attribute is required to indicate that the underlying metafield is StringDictionary. If you don't have a StringDict metafield of type StringDictionary already, Commerce will automatically create and assign it to the metaclass for you.

The support is at API level, we don't support editing StringDictionary property in Catalog UI yet, and it's unlikely to happen. However if you have code in your website that load MetaObjects to read the StringDictionary metafields, update them and save it back, you can now simply do it in an entirely "content way". Now you can load, delete and update the items in StringDict directly using content APIs as other property types.

Commerce 13.1 is a few weeks away from release. 

Mar 27, 2019

Comments

Praful Jangid
Praful Jangid Jun 23, 2019 05:23 PM

This sounds very useful. Will this be render as a property list or what?

Please login to comment.
Latest blogs
Opti ID overview

Opti ID allows you to log in once and switch between Optimizely products using Okta, Entra ID, or a local account. You can also manage all your use...

K Khan | Jul 26, 2024

Getting Started with Optimizely SaaS using Next.js Starter App - Extend a component - Part 3

This is the final part of our Optimizely SaaS CMS proof-of-concept (POC) blog series. In this post, we'll dive into extending a component within th...

Raghavendra Murthy | Jul 23, 2024 | Syndicated blog

Optimizely Graph – Faceting with Geta Categories

Overview As Optimizely Graph (and Content Cloud SaaS) makes its global debut, it is known that there are going to be some bugs and quirks. One of t...

Eric Markson | Jul 22, 2024 | Syndicated blog

Integration Bynder (DAM) with Optimizely

Bynder is a comprehensive digital asset management (DAM) platform that enables businesses to efficiently manage, store, organize, and share their...

Sanjay Kumar | Jul 22, 2024

Frontend Hosting for SaaS CMS Solutions

Introduction Now that CMS SaaS Core has gone into general availability, it is a good time to start discussing where to host the head. SaaS Core is...

Minesh Shah (Netcel) | Jul 20, 2024

Optimizely London Dev Meetup 11th July 2024

On 11th July 2024 in London Niteco and Netcel along with Optimizely ran the London Developer meetup. There was an great agenda of talks that we put...

Scott Reed | Jul 19, 2024