wpallimport variation before parent product in xml, products not imported succesfully

81 Views Asked by At

I am trying to import a XML with products in Woocommerce. The problem is that for some variable products the variations xml elements are before the variable element. So for these products the variations are created as separate products. Is it possible to connect them after the import finishes?

Each variation element has a parentid which connects it to the variable - parent product.

For example these elements are parsed succesfully because variable is before variation:

<product>
<id>16962</id>
<name>
<![CDATA[ Βαμβακερό Παρεό με Ρίγα Milos Παρεό | 100x190cm ]]>
</name>
<type>
<![CDATA[ configurable ]]>
</type>
</product>
<product>
<id>16965</id>
<name>
<![CDATA[ Παρεό | 100x190cm Ανθρακί ]]>
</name>
<parentid>16962</parentid>
<type>
<![CDATA[ simple ]]>
</type>
</product>

These are not parsed succesfully because variation is before variable:

<product>
<id>19900</id>
<name>
<![CDATA[ Βαμβακερό Πετσετέ Πατάκι Μπάνιου Flow σε 2 Αποχρώσεις 50x75cm 50x75cm Κοραλί ]]>
</name>
<parentid>19901</parentid>
<type>
<![CDATA[ simple ]]>
</type>
</product>
<product>
<id>19901</id>
<name>
<![CDATA[ Βαμβακερό Πετσετέ Πατάκι Μπάνιου Flow σε 2 Αποχρώσεις 50x75cm 50x75cm ]]>
</name>
<type>
<![CDATA[ configurable ]]>
</type>
</product>
0

There are 0 best solutions below