How to use loop in a loop XML
Posted: Fri Aug 17, 2018 6:27 pm
Hello,
I need to set a second loop in XML Feed in order to gather all relative data <ARTICLE> under the parent data <PRODUCT>.
First loop is set to pull all parent data from the web.
Second loop doesnt work and would appreciate your advice how should I set it up?
1) This is the loop that works:
<PRODUCTDATA type="full">
{each type="product"}
<PRODUCT>
<P_NR>{sku|parent}</P_NR>
(...)
2) Than later within I need to collect all articles under assigned product - and it doesnt work:
<ARTICLEDATA type="full">
{each type="article"}
<ARTICLE>
<A_NR>{sku}</A_NR>
(...)
3) Closure of both loopes:
{/each}
</ARTICLE>
</ARTICLEDATA>
</PRODUCT>
{/each}
</PRODUCTDATA>
Please, could you help me?
I`ve no clue (and not an expert at all).
I need to set a second loop in XML Feed in order to gather all relative data <ARTICLE> under the parent data <PRODUCT>.
First loop is set to pull all parent data from the web.
Second loop doesnt work and would appreciate your advice how should I set it up?
1) This is the loop that works:
<PRODUCTDATA type="full">
{each type="product"}
<PRODUCT>
<P_NR>{sku|parent}</P_NR>
(...)
2) Than later within I need to collect all articles under assigned product - and it doesnt work:
<ARTICLEDATA type="full">
{each type="article"}
<ARTICLE>
<A_NR>{sku}</A_NR>
(...)
3) Closure of both loopes:
{/each}
</ARTICLE>
</ARTICLEDATA>
</PRODUCT>
{/each}
</PRODUCTDATA>
Please, could you help me?
I`ve no clue (and not an expert at all).