1. fotonio
  2. RO CSVI
  3. Thursday, 28 November 2024
  4.  Subscribe via email
Hi, i have some questions and i would appreciate some help and advice, please.

I use VM 4.2.18 and RO CSVI 8.12.1

I work in a shop with clothes and i want to import products from a supplier 's xml file. See attached sample.xml file with a product record.

1. I found a way to import the products by importing the xml file to Libreoffice thanks to this guy https://youtu.be/shc3CFOKp-0?si=dKJ9r6guTlFtFdXa and save it as csv.
Then i followed your tutorial for importing Multi variant products with the difference that i left the values of ramnification of the parent empty because the childs were inheriting the parents values in addition of their own values. So if the parent was T-shirt-green-xs (green color and xs size) and had a child product T-shirt-blue-S, the child was apeearing in the cart with Color blue and green and size xs and s.
So first question is if there is a trick to declare that childs dont inherit the values of the parent during the import.

2. Now that i imported the products i need to make a template for auto-updating the stock and price from the supplier 's xml.
As you will see in the sample.xml the supplier doesnt give unique SKU to products with different size and colors, only MODEL like A1234.
Me, in contrary i set different product_sku with the pattern: product_sku=MODEL-SIZE-COLOR.
So my product_sku 's look like A1234-XS-01-Black
I have tried with some combine rules to associate the xml records with my product_sku but it works only for one instance of each product.
I have also tried your xml import tutorial but cant find a solution. This xml has different structure.
I am attaching my template, so you can check.

3. Last question is what is the best way for updating product_stock and product_price?
To make one task for updating the stock using availability template and another task for the price with the price template or to update both with the import product template? Because in this case, stock and prices are in the same file.

Thanks in advance!
Attachments (3)
Accepted Answer Pending Moderation
Hello,
Can you please tell me which fields and what values i have to include in the multi variant template for parent and children so the children dont inherit the value of the custom fields of the parent?

The field to be used is noninheritable. This field holds virtuemart_customfield_id value from #__virtuemart_product_customfields table for parent product rows. The problem is we do not support this field yet with MultiVariants. I will add this feature to Multi variants import and send you a patch file when it is ready.
Kind regards,

Tharuna

=========================
If you use our extensions, 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
In the attachments you can see the settings that worked for me for the xml

In the csv attached you can see the template file i use for importing multivariants.
The desired result will be:
COM_VIRTUEMART_CLOTHES_SIZE -> value not to be inherited to children or the value of the children to override the inherited value from parent
COM_VIRTUEMART_COLORS -> value not to be inherited to children or the value of the children to override the inherited value from parent
COM_VIRTUEMART_SIZE_GUIDE -> value to be inherited to children
How do i do that?
Attachments (4)
  1. more than a month ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Dear Tharuna, i think i found the solution for the second problem with the nested values size,color,stock. I will post it later because i have to go out now.

Can you please tell me which fields and what values i have to include in the multi variant template for parent and children so the children dont inherit the value of the custom fields of the parent?

Thank you
  1. more than a month ago
  2. RO CSVI
  3. # 3
Accepted Answer Pending Moderation
1. Yes i think that will work but i need this to do it during the import of the parent and childs in the csv file. I use multi_variant_title and multi_variant_fields like in the tutorial.
Maybe custom_param is the field that do that?

2. I attach a csv file with two products but i need this to work with the xml of the supplier to update stock everyday, unless there is automatic way to get the xml, convert to csv and then pass it to CSVI.
Attachments (1)
  1. more than a month ago
  2. RO CSVI
  3. # 4
Accepted Answer Pending Moderation
Hello,
1. I found a way to import the products by importing the xml file to Libreoffice thanks to this guy https://youtu.be/shc3CFOKp-0?si=dKJ9r6guTlFtFdXa and save it as csv.
Then i followed your tutorial for importing Multi variant products with the difference that i left the values of ramnification of the parent empty because the childs were inheriting the parents values in addition of their own values. So if the parent was T-shirt-green-xs (green color and xs size) and had a child product T-shirt-blue-S, the child was apeearing in the cart with Color blue and green and size xs and s.
So first question is if there is a trick to declare that childs dont inherit the values of the parent during the import.

In VirtueMart for parent product there is a checkbox called noninheritable when clicked child products don't use parent values. See attached screenshot named noninheritance.png. Is that what you are looking for?

2. Now that i imported the products i need to make a template for auto-updating the stock and price from the supplier 's xml.
As you will see in the sample.xml the supplier doesnt give unique SKU to products with different size and colors, only MODEL like A1234.
Me, in contrary i set different product_sku with the pattern: product_sku=MODEL-SIZE-COLOR.
So my product_sku 's look like A1234-XS-01-Black
I have tried with some combine rules to associate the xml records with my product_sku but it works only for one instance of each product.
I have also tried your xml import tutorial but cant find a solution. This xml has different structure.
I am attaching my template, so you can check.

Since OPTIONS node has the child products and you want to loops through this node node to get product_sku, XML node names should be set based on OPTIONS node. See attached screenshots. The problem is it works for the sample XML file you sent since it has one product node. This will not work for multiple product nodes. You said you generated CSV file from XML, can you post that? We can check if it is possible to generate child products SKU with CSV file.

3. Last question is what is the best way for updating product_stock and product_price?
To make one task for updating the stock using availability template and another task for the price with the price template or to update both with the import product template? Because in this case, stock and prices are in the same file.

If products have one price you can use product template to update both price and availability.
Attachments (4)
Kind regards,

Tharuna

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


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