I need to import from the following code into virtumart the parent product and its children products (which are the sizes)
<product id="1152190830" currency="PLN" code_producer="SPE-23-000440">
<producer id="1208513650" name="Specna Arms"/>
<category xml:lang="pol" id="1205246905" name="Ubiór militarny/Wyposażenie Taktyczne/Komplety mundurowe"/>
<unit xml:lang="pol" id="0" name="szt."/>
<card url="https://gunfire.pl/product-pol-1152190830-Komplet-mundurowy-typu-ACU-czarny.feed10002.html"/>
<description>
<name xml:lang="pol"><![CDATA[Komplet mundurowy typu ACU - czarny]]></name>
<long_desc xml:lang="pol"><![CDATA[larga]]></long_desc>
<short_desc xml:lang="pol"><![CDATA[corta]]></short_desc>
</description>
<price gross="185.99" net="151.21" vat="23.0"/>
<images>
<large>
<image url="https://gunfire.pl/data/gfx/pictures/large/0/3/1152190830_1.jpg" date_changed="2015-12-23 15:30:10" hash="b2f322f99c30bc8d1a80cfd7ea490350"/>
</large>
</images>
<sizes>
<size id="3" size_name="S" code_producer="F-16-A1-830-S" code="1152190830-3" weight="1500">
<stock id="1" quantity="3"/>
</size>
<size id="5" size_name="L" code_producer="F-16-AP-830-L" code="1152190830-5" weight="1500">
<stock id="1" quantity="21"/>
</size>
<size id="6" size_name="XL" code_producer="F-16-AP-830-XL" code="1152190830-6" weight="1500">
<stock id="1" quantity="1"/>
</size>
<size id="7" size_name="XXL" code_producer="F-16-AP-830-XXL" code="1152190830-7" weight="0">
<stock id="1" quantity="6"/>
</size>
</sizes>
<srp gross="199.99" net="162.59" vat="23.0"/>
</product>
- comercial@pandorasoft.com
- RO CSVI
- Friday, 23 June 2017
- Subscribe via email
0
Accepted Answer
Pending Moderation
Hello,
You can add child products as Multi variants and as explained in Multi variants import document. For importing an XML file you need to map your XML nodes to CSVI template fields. You can check the explanation on XML node setting in Import XML document.
You can add child products as Multi variants and as explained in Multi variants import document. For importing an XML file you need to map your XML nodes to CSVI template fields. You can check the explanation on XML node setting in Import XML document.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Accepted Answer
Pending Moderation
Hello,
I realised something looking at your example XML in your post. The child products are part of one single node in your XML. In this case you may need to create two different templates for import. First template to import only the parent product by reading the product node details and the second template is to combine parent sku and to import sizes nodes child product details. You can follow the XML document i linked in my previous post to know on how to map the fields.
I realised something looking at your example XML in your post. The child products are part of one single node in your XML. In this case you may need to create two different templates for import. First template to import only the parent product by reading the product node details and the second template is to combine parent sku and to import sizes nodes child product details. You can follow the XML document i linked in my previous post to know on how to map the fields.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Accepted Answer
Pending Moderation
Thank you for responding so quickly, check the documentation and try to solve the problem, when you have it you put it here.
Accepted Answer
Pending Moderation
Hello,
There is no separate documentation on this. You need to create two different templates with different template fields . In the first template map the XML nodes for the parent product and in the second template map the child products which are Sizes. Mapping XML node is explained in Import XML document.
There is no separate documentation on this. You need to create two different templates with different template fields . In the first template map the XML nodes for the parent product and in the second template map the child products which are Sizes. Mapping XML node is explained in Import XML document.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Accepted Answer
Pending Moderation
<sizes>
<size id="0" size_name="uniwersalny" code_producer="A-23-C1-960, A-23-C0-960" code="1152192960-0" weight="740">
<stock id="1" quantity="6"/>
</size>
</sizes>
How can I do that if sizes/size/id = 0, do not update? Or do not create the product.
<size id="0" size_name="uniwersalny" code_producer="A-23-C1-960, A-23-C0-960" code="1152192960-0" weight="740">
<stock id="1" quantity="6"/>
</size>
</sizes>
How can I do that if sizes/size/id = 0, do not update? Or do not create the product.
Accepted Answer
Pending Moderation
Hello,
You can use Skip rule plugin for this case. In your skip rule set Method to match as Regular text and set values as 0. Assign the skip rule to the field where the node sizes/size/id is set. This rule will skip the records if matched value 0 is found.
How can I do that if sizes/size/id = 0, do not update? Or do not create the product.
You can use Skip rule plugin for this case. In your skip rule set Method to match as Regular text and set values as 0. Assign the skip rule to the field where the node sizes/size/id is set. This rule will skip the records if matched value 0 is found.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Accepted Answer
Pending Moderation
Hello,
Can you also post the sample of your import file? I need to see on how you have your node are set in import XML to help on product_parent_sku value. It would also be great if you can post the template XML file of your import. To get template XML file go to CSVI maintenance page, Select CSVI Pro on first option and Backup template on second option. Select your template and click continue. Download the XML file and post it.
Can you also post the sample of your import file? I need to see on how you have your node are set in import XML to help on product_parent_sku value. It would also be great if you can post the template XML file of your import. To get template XML file go to CSVI maintenance page, Select CSVI Pro on first option and Backup template on second option. Select your template and click continue. Download the XML file and post it.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Accepted Answer
Pending Moderation
The file I put in the first post, but I copy it again.
<?xml version="1.0" encoding="UTF-8"?>
<offer file_format="IOF" generated="2017-07-05 06:42:07" version="2.5" extensions="yes">
<products language="pol">
<product id="1152190830" currency="PLN" code_producer="SPE-23-000440">
<producer id="1208513650" name="Specna Arms"/>
<category xml:lang="pol" id="1205246905" name="Ubiór militarny/Wyposażenie Taktyczne/Komplety mundurowe"/>
<unit xml:lang="pol" id="0" name="szt."/>
<card url=" http://gunfire.pl/product-pol-1152190830-Komplet-mundurowy-typu-ACU-czarny.feed10002.html"/ >
<description>
<name xml:lang="pol"><![CDATA[Komplet mundurowy typu ACU - czarny]]></name>
<long_desc xml:lang="pol"><![CDATA[larga]]></long_desc>
<short_desc xml:lang="pol"><![CDATA[corta]]></short_desc>
</description>
<price gross="185.99" net="151.21" vat="23.0"/>
<images>
<large>
<image url=" http://gunfire.pl/data/gfx/pictures/large/0/3/1152190830_1.jpg " date_changed="2015-12-23 15:30:10" hash="b2f322f99c30bc8d1a80cfd7ea490350"/>
</large>
</images>
<sizes>
<size id="3" size_name="S" code_producer="F-16-A1-830-S" code="1152190830-3" weight="1500">
<stock id="1" quantity="3"/>
</size>
<size id="5" size_name="L" code_producer="F-16-AP-830-L" code="1152190830-5" weight="1500">
<stock id="1" quantity="21"/>
</size>
<size id="6" size_name="XL" code_producer="F-16-AP-830-XL" code="1152190830-6" weight="1500">
<stock id="1" quantity="1"/>
</size>
<size id="7" size_name="XXL" code_producer="F-16-AP-830-XXL" code="1152190830-7" weight="0">
<stock id="1" quantity="6"/>
</size>
</sizes>
<srp gross="199.99" net="162.59" vat="23.0"/>
</product>
</products>
</offer>
<?xml version="1.0" encoding="UTF-8"?>
<offer file_format="IOF" generated="2017-07-05 06:42:07" version="2.5" extensions="yes">
<products language="pol">
<product id="1152190830" currency="PLN" code_producer="SPE-23-000440">
<producer id="1208513650" name="Specna Arms"/>
<category xml:lang="pol" id="1205246905" name="Ubiór militarny/Wyposażenie Taktyczne/Komplety mundurowe"/>
<unit xml:lang="pol" id="0" name="szt."/>
<card url=" http://gunfire.pl/product-pol-1152190830-Komplet-mundurowy-typu-ACU-czarny.feed10002.html"/ >
<description>
<name xml:lang="pol"><![CDATA[Komplet mundurowy typu ACU - czarny]]></name>
<long_desc xml:lang="pol"><![CDATA[larga]]></long_desc>
<short_desc xml:lang="pol"><![CDATA[corta]]></short_desc>
</description>
<price gross="185.99" net="151.21" vat="23.0"/>
<images>
<large>
<image url=" http://gunfire.pl/data/gfx/pictures/large/0/3/1152190830_1.jpg " date_changed="2015-12-23 15:30:10" hash="b2f322f99c30bc8d1a80cfd7ea490350"/>
</large>
</images>
<sizes>
<size id="3" size_name="S" code_producer="F-16-A1-830-S" code="1152190830-3" weight="1500">
<stock id="1" quantity="3"/>
</size>
<size id="5" size_name="L" code_producer="F-16-AP-830-L" code="1152190830-5" weight="1500">
<stock id="1" quantity="21"/>
</size>
<size id="6" size_name="XL" code_producer="F-16-AP-830-XL" code="1152190830-6" weight="1500">
<stock id="1" quantity="1"/>
</size>
<size id="7" size_name="XXL" code_producer="F-16-AP-830-XXL" code="1152190830-7" weight="0">
<stock id="1" quantity="6"/>
</size>
</sizes>
<srp gross="199.99" net="162.59" vat="23.0"/>
</product>
</products>
</offer>
Attachments (1)
Accepted Answer
Pending Moderation
Hello,
As you said you are reading parent_product_sku XML value from an outside node and so the value is not imported. You need to set your XML record name to product in your template settings and on file tab.
As you said you are reading parent_product_sku XML value from an outside node and so the value is not imported. You need to set your XML record name to product in your template settings and on file tab.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Accepted Answer
Pending Moderation
Hello,
Please edit your import template and go to File tab, in the same tab you have set Record name as size, change it to product and save the template. Run the import and that should solve your problem.
Please edit your import template and go to File tab, in the same tab you have set Record name as size, change it to product and save the template. Run the import and that should solve your problem.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Accepted Answer
Pending Moderation
If I put product in tab file, it only creates me a product son, instead of all.
Attachments (1)
Accepted Answer
Pending Moderation
I think I have not explained well.
I will try to explain myself with an example of what I want to do.
This is my file, I left what I need, everything else I've deleted so as not to confuse.
<?xml version="1.0" encoding="UTF-8"?>
<offer file_format="IOF" generated="2017-07-05 06:42:07" version="2.5" extensions="yes">
<products language="pol">
<product id="1152211161" currency="PLN" code_producer="CLG-23-012860">
<description>
<name xml:lang="pol"><![CDATA[name product]]></name>
<long_desc xml:lang="pol"><![CDATA[long_desc]]></long_desc>
</description>
<price gross="322.22" net="261.97" vat="23.0"/>
<sizes>
<size id="3" size_name="S" code="1152211161-3" weight="600">
<stock id="1" quantity="10"/>
</size>
<size id="5" size_name="L" code_producer="D-17-C4-161" code="1152211161-5" weight="1600">
<stock id="1" quantity="30"/>
</size>
<size id="6" size_name="XL" code_producer="D-17-C1-161" code="1152211161-6" weight="6800">
<stock id="1" quantity="25"/>
</size>
</sizes>
</product>
</products>
</offer>
I already have a template that imports the main product which saves the following data
product_sku = product/code_producer -->CLG-23-012860
product_mpn = product/id -->1152211161
product_s_desc = description/short_desc -->long_desc
product_name = description/name -->name product
product_weight = sizes/size/weight -->600
product_in_stock = sizes/size/stock/quantity -->10
This template works perfectly, now I would like to import the children products that are the sizes
[color=red]And this is what I do not get, no matter how much I try it does not work.[/color]
The children products are the ones that are inside the sizes node
First child product
product_parent_sku = product/code_producer -->CLG-23-012860
product_sku = sizes/size/code_producer --> D-17-C4-161
product_mpn = sizes/size/code -->1152211161-5
product_name = description/name + (-) + size_name -->name product - L
product_weight = sizes/size/weight -->1600
product_in_stock = sizes/size/stock/quantity -->30
Second child product
product_parent_sku = product/code_producer -->CLG-23-012860
product_sku = sizes/size/code_producer --> D-17-C1-161
product_mpn = sizes/size/code -->1152211161-6
product_name = description/name + (-) + size_name -->name product - XL
product_weight = sizes/size/weight -->6800
product_in_stock = sizes/size/stock/quantity -->25
I hope you understand with this explanation
I will try to explain myself with an example of what I want to do.
This is my file, I left what I need, everything else I've deleted so as not to confuse.
<?xml version="1.0" encoding="UTF-8"?>
<offer file_format="IOF" generated="2017-07-05 06:42:07" version="2.5" extensions="yes">
<products language="pol">
<product id="1152211161" currency="PLN" code_producer="CLG-23-012860">
<description>
<name xml:lang="pol"><![CDATA[name product]]></name>
<long_desc xml:lang="pol"><![CDATA[long_desc]]></long_desc>
</description>
<price gross="322.22" net="261.97" vat="23.0"/>
<sizes>
<size id="3" size_name="S" code="1152211161-3" weight="600">
<stock id="1" quantity="10"/>
</size>
<size id="5" size_name="L" code_producer="D-17-C4-161" code="1152211161-5" weight="1600">
<stock id="1" quantity="30"/>
</size>
<size id="6" size_name="XL" code_producer="D-17-C1-161" code="1152211161-6" weight="6800">
<stock id="1" quantity="25"/>
</size>
</sizes>
</product>
</products>
</offer>
I already have a template that imports the main product which saves the following data
product_sku = product/code_producer -->CLG-23-012860
product_mpn = product/id -->1152211161
product_s_desc = description/short_desc -->long_desc
product_name = description/name -->name product
product_weight = sizes/size/weight -->600
product_in_stock = sizes/size/stock/quantity -->10
This template works perfectly, now I would like to import the children products that are the sizes
[color=red]And this is what I do not get, no matter how much I try it does not work.[/color]
The children products are the ones that are inside the sizes node
First child product
product_parent_sku = product/code_producer -->CLG-23-012860
product_sku = sizes/size/code_producer --> D-17-C4-161
product_mpn = sizes/size/code -->1152211161-5
product_name = description/name + (-) + size_name -->name product - L
product_weight = sizes/size/weight -->1600
product_in_stock = sizes/size/stock/quantity -->30
Second child product
product_parent_sku = product/code_producer -->CLG-23-012860
product_sku = sizes/size/code_producer --> D-17-C1-161
product_mpn = sizes/size/code -->1152211161-6
product_name = description/name + (-) + size_name -->name product - XL
product_weight = sizes/size/weight -->6800
product_in_stock = sizes/size/stock/quantity -->25
I hope you understand with this explanation
Accepted Answer
Pending Moderation
The result that I get with the template is the following:
product_parent_sku = product/code_producer -->CLG-23-012860
product_sku = sizes/size/code_producer --> D-17-C4-161
product_mpn = sizes/size/code -->1152211161-3
product_name = description/name + (-) + size_name -->
product_weight = sizes/size/weight -->600
product_in_stock = sizes/size/stock/quantity -->10
product_parent_sku = product/code_producer -->CLG-23-012860
product_sku = sizes/size/code_producer --> D-17-C4-161
product_mpn = sizes/size/code -->1152211161-3
product_name = description/name + (-) + size_name -->
product_weight = sizes/size/weight -->600
product_in_stock = sizes/size/stock/quantity -->10
Accepted Answer
Pending Moderation
Hello,
Let me explain on how you can import the child products keeping your example XML. As per the XML there is one parent product and two children. So you need to create three import templates, one to import the parent and one each to import the child. Since you are saying parent product import works good i will write on how you can import the child products.
For the first child product create a import template with product set as record name on File tab.
Your size node is same for both the child products and for parent product so we need to make the template fields read the size node accordingly. For first child product add template fields like below. We are adding skip field for first size node which actually belongs to parent and setting the XML node to actually read the second size node. We dont need to worry about the third size node as it is not needed for first child product and can be ignored.
product_parent_sku = product/code_producer
skip = sizes/size/code_producer
skip = sizes/size/code
skip = description/name + (-) + size_name
skip = sizes/size/weight
skip = sizes/size/stock/quantity
product_sku = sizes/size/code_producer
product_mpn = sizes/size/code
product_name = description/name + (-) + size_name
product_weight = sizes/size/weight
product_in_stock = sizes/size/stock/quantity
So by above fields we are doing like
<size id="3" size_name="S" code="1152211161-3" weight="600">
<stock id="1" quantity="10"/>
</size>
----> Skip these fields
<size id="5" size_name="L" code_producer="D-17-C4-161" code="1152211161-5" weight="1600">
<stock id="1" quantity="30"/>
</size>
-----> use these fields for product import
<size id="6" size_name="XL" code_producer="D-17-C1-161" code="1152211161-6" weight="6800">
<stock id="1" quantity="25"/>
-----> These are ignored for first product
For the second child product create a import template with product set as record name on File tab. You can then add template fields to template like below, the skip field will skip the first and second Size node and move to the last one
product_parent_sku = product/code_producer
skip = sizes/size/code_producer
skip = sizes/size/code
skip = description/name + (-) + size_name
skip = sizes/size/weight
skip = sizes/size/stock/quantity
skip = sizes/size/code_producer
skip = sizes/size/code
skip = description/name + (-) + size_name
skip = sizes/size/weight
skip = sizes/size/stock/quantity
product_sku = sizes/size/code_producer
product_mpn = sizes/size/code
product_name = description/name + (-) + size_name
product_weight = sizes/size/weight
product_in_stock = sizes/size/stock/quantity
So the XML will be like
<size id="3" size_name="S" code="1152211161-3" weight="600">
<stock id="1" quantity="10"/>
</size>
----> Skip these fields
<size id="5" size_name="L" code_producer="D-17-C4-161" code="1152211161-5" weight="1600">
<stock id="1" quantity="30"/>
</size>
----> Skip these fields
<size id="6" size_name="XL" code_producer="D-17-C1-161" code="1152211161-6" weight="6800">
<stock id="1" quantity="25"/>
-----> use these fields for product import
If you have more of child products you need to add more of import templates and add the skip fields accordingly. This example is only for two child products. Hope it is clear.
Let me explain on how you can import the child products keeping your example XML. As per the XML there is one parent product and two children. So you need to create three import templates, one to import the parent and one each to import the child. Since you are saying parent product import works good i will write on how you can import the child products.
For the first child product create a import template with product set as record name on File tab.
Your size node is same for both the child products and for parent product so we need to make the template fields read the size node accordingly. For first child product add template fields like below. We are adding skip field for first size node which actually belongs to parent and setting the XML node to actually read the second size node. We dont need to worry about the third size node as it is not needed for first child product and can be ignored.
product_parent_sku = product/code_producer
skip = sizes/size/code_producer
skip = sizes/size/code
skip = description/name + (-) + size_name
skip = sizes/size/weight
skip = sizes/size/stock/quantity
product_sku = sizes/size/code_producer
product_mpn = sizes/size/code
product_name = description/name + (-) + size_name
product_weight = sizes/size/weight
product_in_stock = sizes/size/stock/quantity
So by above fields we are doing like
<size id="3" size_name="S" code="1152211161-3" weight="600">
<stock id="1" quantity="10"/>
</size>
----> Skip these fields
<size id="5" size_name="L" code_producer="D-17-C4-161" code="1152211161-5" weight="1600">
<stock id="1" quantity="30"/>
</size>
-----> use these fields for product import
<size id="6" size_name="XL" code_producer="D-17-C1-161" code="1152211161-6" weight="6800">
<stock id="1" quantity="25"/>
-----> These are ignored for first product
For the second child product create a import template with product set as record name on File tab. You can then add template fields to template like below, the skip field will skip the first and second Size node and move to the last one
product_parent_sku = product/code_producer
skip = sizes/size/code_producer
skip = sizes/size/code
skip = description/name + (-) + size_name
skip = sizes/size/weight
skip = sizes/size/stock/quantity
skip = sizes/size/code_producer
skip = sizes/size/code
skip = description/name + (-) + size_name
skip = sizes/size/weight
skip = sizes/size/stock/quantity
product_sku = sizes/size/code_producer
product_mpn = sizes/size/code
product_name = description/name + (-) + size_name
product_weight = sizes/size/weight
product_in_stock = sizes/size/stock/quantity
So the XML will be like
<size id="3" size_name="S" code="1152211161-3" weight="600">
<stock id="1" quantity="10"/>
</size>
----> Skip these fields
<size id="5" size_name="L" code_producer="D-17-C4-161" code="1152211161-5" weight="1600">
<stock id="1" quantity="30"/>
</size>
----> Skip these fields
<size id="6" size_name="XL" code_producer="D-17-C1-161" code="1152211161-6" weight="6800">
<stock id="1" quantity="25"/>
-----> use these fields for product import
If you have more of child products you need to add more of import templates and add the skip fields accordingly. This example is only for two child products. Hope it is clear.
Kind regards,
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
- Page :
- 1
There are no replies made for this post yet.
Be one of the first to reply to this post!
Be one of the first to reply to this post!
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here. Register Here »