commercetools / sphere-play-sdk

Java API client and helper classes for building a SPHERE.IO shop on Play 2.2
http://sphere.io
7 stars 6 forks source link

Provide values for enum facets #108

Closed salander closed 9 years ago

salander commented 10 years ago

would be nice to easily access the value (not only the key) of a enum or lenum type. to avoid building the localized facets values in frontend by messages files as they need to be extended every time a new enum value is created in backend. would that be possible, maybe by getting the attribute from producttype??

schleichardt commented 10 years ago

I would like to help you, but since I never ever worked with the facet I don't know where to start.

Can you give me code and class names to show me, what you want to achieve?

hajoeichler commented 10 years ago

In general we recommend to load the product type once and then have the key/label mapping in memory. @schleichardt I think the product types are only available in the JVM SDK, right?

schleichardt commented 10 years ago

Right.

hajoeichler commented 10 years ago

You may simply use the new SDK (next to the old) to get the product type including all attribute information (including the enum values)

schleichardt commented 9 years ago

declined