Developer forum

Forum » Feature requests » Use of custom fields with UnitsFieldTypeProvider in JSON feeds

Use of custom fields with UnitsFieldTypeProvider in JSON feeds

Michael Knudsen
Reply

[This post is moved from PIM forum, since no activity]

I have a number of integrated product fields (from ERP) based on a Field Type which is using the UnitsFieldTypeProvider. The intension is to use the UnitsFieldTypeProvider to 'transform' the measurements from CM to MM, based on the Factor (x10). This works as expected in PIM user interface. Using the same products fields in a JSON feed is another story.

In one feed we want to use the product field value in CM and in another feed we want to use the product field value in MM, but how can we achieve this?

 

The JSON currently looks like the snippet below, but it doesn't offer the product field value in MM:

"Colli1Width": {"SystemName": "Colli1Width","Name": "Colli1Width","Type": "UnitOfLength","Value": {"Name": "51.5 cm ","Value": "51.5 cm"}},

 

 

If the JSON could contain the 'unit' could that also be very useful:

"Colli1Width": { "SystemName": "Colli1Width", "Name": "Colli1Width", "Type": "UnitOfLength",
"Values": [
  { "Name": "51.5 cm", "Value": "51.5", "Unit": "cm" },
  { "Name": "515 mm", "Value": "515", "Unit": "mm" }
] },

Br. Michael Knudsen


Replies