1. comercial@pandorasoft.com
  2. RO CSVI
  3. Friday, 23 June 2017
  4.  Subscribe via email
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>
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.
Kind regards,

Tharuna

=========================
If you use CSVI, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 1
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.
Kind regards,

Tharuna

=========================
If you use CSVI, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 2
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.
  1. more than a month ago
  2. RO CSVI
  3. # 3
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.
Kind regards,

Tharuna

=========================
If you use CSVI, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 4
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.
  1. more than a month ago
  2. RO CSVI
  3. # 5
Accepted Answer Pending Moderation
Hello,
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 CSVI, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 6
Accepted Answer Pending Moderation
I'm stuck and I do not give the solution, I need help.
I create a themplate to import the children, but I can not assign the value product_parent_sku since it is outside the node.
Any suggestions ??
Attachments (7)
  1. more than a month ago
  2. RO CSVI
  3. # 7
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.
Kind regards,

Tharuna

=========================
If you use CSVI, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 8
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>
Attachments (1)
  1. more than a month ago
  2. RO CSVI
  3. # 9
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.
Kind regards,

Tharuna

=========================
If you use CSVI, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 10
Accepted Answer Pending Moderation
I do not know how to do it, can you give an example?
  1. more than a month ago
  2. RO CSVI
  3. # 11
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.
Kind regards,

Tharuna

=========================
If you use CSVI, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 12
Accepted Answer Pending Moderation
If I put product in tab file, it only creates me a product son, instead of all.
Attachments (1)
  1. more than a month ago
  2. RO CSVI
  3. # 13
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
  1. more than a month ago
  2. RO CSVI
  3. # 14
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
  1. more than a month ago
  2. RO CSVI
  3. # 15
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.
Kind regards,

Tharuna

=========================
If you use CSVI, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 16
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!