is it possible to add some kind of key value pair as a product property. We need a color definition where we have to define a code '0010' and the name of the color 'red'. We want to see both in the administration and want to use both via the api.
With the Enum data type, you define a value and a display name, for every enum entry. So you can define the enum value as "0010" and the display name as "red".
Key/Value as Product Property
Hi,
is it possible to add some kind of key value pair as a product property. We need a color definition where we have to define a code '0010' and the name of the color 'red'. We want to see both in the administration and want to use both via the api.
Any recommendation?
Thanks and regards,
Stefan
Hi Stefan,
I think the Enum data type can do what you want.
With the Enum data type, you define a value and a display name, for every enum entry. So you can define the enum value as "0010" and the display name as "red".
Hope that helps,
Lars
Hi Lars,
thanks for your reply. Sometimes it is to simple...
How can I access the display name for my culture via the API?
Thanks,
Stefan
Hi Stefan,
You can get the enum property by calling the GetProperty() method on the product, something like this:
And get the display name like this:
/Lars
Hi Lars,
Great! Thats exactly what I was looking for.
Thanks!
Stefan
is working on a reply...