Tom Miller
Tom Miller

Reputation: 451

Retrieve culture specific value of definition field in uCommerce

We're creating some custom fields by adding new definition fields to category and product definition items in uCommerce.

When we retrieve an instance of the ctegory or prouduct from the uCommerce.Entitiesv2 we're having trouble getting the culture specific value for these fields when multilingual is selected?

There is a collection on the Product object called ProductDefinitionField but not sure whether .Value returns the culture specific version of whether we need to call another method (extention method maybe)

Has anyone got a code snipper for this?

Upvotes: 0

Views: 391

Answers (1)

Martin
Martin

Reputation: 123

When accessing or retrieving Multilingual properties on a uCommerce you can use the GetProperty method on a product.

It has two overloads, one taking name (string) and another one taking name (string) and culturecode (string).

If you want to retrieve the full collection of multilinqual properties you can use GetProperties which also have two overloads. One without parameters and the other with a string culturecode.

Depending on the version of uCommerce you're using some of them might be missing/not a part of the API.

Best regards Martin

Upvotes: 1

Related Questions