valueLists

Zuletzt geändert von Joel Schmalöer am 14.09.2022, 13:59

This page contains code examples for value lists in feed/export.

Tested for PIM 8.22 | PXM 1.3.7

Note: Exports attribute data regardless of a product affiliation.

Iterator

<#list valueLists as valueListId, valueList>
    ${valueListId}
</#list>

Example result

tdc_0565_VL
tdc_0489_VL
tdc_0131_VL
tdc_0112_VL
MC_Gewindeart
MC_CablePlating
tdc_0575_VL
510
511
MC_Language
512
...

All fields (in JSON format)

<#assign languages = ["de-DE", "en-GB"]>
{
    "valuelists" :
    <#list valueLists as ValueListId, ValueList>
    {
        "valuelistID" : "${ValueListId}",
        "shortDescription" :
        {
        <#list languages as language>
            "${language}": "${ValueList.shortDescriptions[language]!}",
        </#list>
        }
        "createdOn" : "${ValueList.createdOn!}",
        "changedOn" : "${ValueList.changedOn!}",
        "createdBy" : "${ValueList.createdBy!}",
        "changedBy  : "${ValueList.changedBy!}"
    }
    </#list>
}

Example Result

{
   "valuelists" :
    {
       "valuelistID" : "tdc_0565_VL",
       "shortDescription" :
        {
           "de-DE": "Value List of tdc_0565",
           "en-GB": "Value List of tdc_0565",
        },
       "createdOn" : "May 9, 2022 12:07:17 AM",
       "changedOn" : "May 9, 2022 12:07:17 AM",
       "createdBy" : "jcadmin",
       "changedBy" : "jcadmin"
    }
    {
       "valuelistID" : "tdc_0489_VL",
       "shortDescription" :
        {
           "de-DE": "Value List of tdc_0489",
           "en-GB": "Value List of tdc_0489",
        },
       "createdOn" : "May 9, 2022 12:07:17 AM",
       "changedOn" : "May 9, 2022 12:07:17 AM",
       "createdBy" : "jcadmin",
       "changedBy" : "jcadmin"
    }
    {
       "valuelistID" : "tdc_0131_VL",
       "shortDescription" :
        {
           "de-DE": "Value List of tdc_0131",
           "en-GB": "Value List of tdc_0131",
        },
       "createdOn" : "May 9, 2022 12:07:17 AM",
       "changedOn" : "May 9, 2022 12:07:17 AM",
       "createdBy" : "jcadmin",
       "changedBy" : "jcadmin"
    }
}
Tags: