unitOfMeasures

Last modified by Joel Schmalöer on 14.09.2022, 13:59

This page contains code examples for units of measures in feed/export.

Tested for PIM 8.22 | PXM 1.3.7

Note: Exports data regardless of a product affiliation.

Iterator

<#list unitOfMeasures as unitOfMeasureKey, unitOfMeasure>
    ${unitOfMeasureKey}
</#list>

Example result

DD
PR
KTM
HP
PX
MTR
MTS
077
110
078
035
MLT
OHM
039
WTT
...

All Fields (in JSON Format)

{
    "unitOfMeasures" :
    <#list unitOfMeasures as unitOfMeasureKey, unitOfMeasure>
    {
        "UOMID" : "${(unitOfMeasure.UOMID!)}",
        "symbol" : "${(unitOfMeasure.symbol!)}",
        "translations" :
        {
            <#list unitOfMeasure.translations! as translation>
            "${translation.languageId!}" : "${translation.description!}",
            </#list>
        }
    }
    </#list>
}

Example Result

{
   "unitOfMeasures" :
    {
       "UOMID" : "DD",
       "symbol" : "°",
       "translations" :
        {
           "de" : "Grad",
           "en" : "degrees",
        }
    }
    {
       "UOMID" : "PR",
       "symbol" : "",
       "translations" :
        {
           "de" : "Paar",
           "en" : "pair",
        }
    }
    {
       "UOMID" : "KTM",
       "symbol" : "km",
       "translations" :
        {
           "en" : "kilometer",
           "de" : "Kilometer",
        }
    }
}
Tags: