Hi all,
I try to parse the sku of an order in Woocommerce based on the quantity.
So for example,
If someone ordered 1X item_X and 2x item_Y
My custom XML is:
<products>
<artnr>{sku}</artnr>
<Quantity>{Quantity}</Quantity>
</products>
the output now in my xml is (based on above):
<products>
<artnr>
Item_X
</artnr>
<artnr>
Item_Y
</artnr>
<Quantity>
1
</Quantity>
<Quantity>
2
</Quantity>
</products>
But i would like to have an output in XML like:
<products>
<artnr>
Item_X
</artnr>
<artnr>
Item_Y
</artnr>
<artnr>
Item_Y
</artnr>
</products>
So an output one Item_x and two times Item_Y
I tried to do something like:
Or can i beter use functions, or create the export in a different way?
<artnr>[FOREACH({Quantity})]{@SKU}[ENDFOREACH]</artnr>
Hope you guys can help me out
Thanks!