1. ettolo
  2. RO CSVI
  3. Thursday, 06 June 2019
  4.  Subscribe via email
Hi,
i have problems importing multivariant products.
Sometimes the childs (fileArticoliFigli_test_01.csv attached) are not created correctly. After importing the fathers (fileArticoli_test_01.csv) the plugf_virtuemart_product_customfields table in database is correcty filled with:
usecanonical=0|showlabels=0|sCustomId=0|selectoptions=[{"voption":"clabels","clabel":"P1","values":""}]|clabels=0|options={"27630":["0"]}|

and
usecanonical=0|showlabels=0|sCustomId=0|selectoptions=[{"voption":"clabels","clabel":"P1","values":""}]|clabels=0|options={"27376":["0"]}|

for the two fathers i'm importing

After running childs import the same fields are
usecanonical=0|showlabels=0|sCustomId=0|selectoptions=[{"voption":"clabels","clabel":"P1","values":"Rubino\r\nZaffiro Blu\r\nSmeraldo"}]|clabels=0|options={"27630":["0"],"27701":["Rubino"],"27702":["Zaffiro Blu"],"27703":["Smeraldo"]}|

and
usecanonical=0|showlabels=0|sCustomId=0|selectoptions=[]|clabels=0|options={"27387":[],"27388":[],"27389":[]}|


As you can see the first is correct but the second no! In attach you'll find the logs of the two imports.

What am I doing wrong?
Thanks in advance,
Nicola


i'm using
PHP version 5.6.14-0+deb8u1
Joomla! version 3.9.4
VirtueMart 3.2.14
CSVI Pro 7.5.1
CSVI Pro - VirtueMart Plugin 7.5.1
Accepted Answer Pending Moderation
Hello Nicola,
In your import template settings on Options tab you have set Delete custom fields relations to Yes, with this setting when a custom field is imported all the previous values are deleted and new values are imported. This should be causing problem in your case. When you import the child product the custom field values which are imported by parent file is deleted. Set this field to No and run the import.
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
Sadly the 'No Delete' doesn't solve the problem.
Attached the new templates and logs. Import files are the same.
I think the problem occurs when inserting/updating child products: at line 2465 of com_csvi.log.ArticoliFigli NO DELETE log you find:
UPDATE `plugf_virtuemart_product_customfields` SET `customfield_params` = 'usecanonical=0|showlabels=0|sCustomId=0|selectoptions=[]|clabels=0|options={\"27387\":[],\"27388\":[],\"27389\":[]}|' WHERE `virtuemart_product_id` = 27376

I think this destroies the correct configuration of father

Best regards,
Nicola
Attachments (3)
  1. more than a month ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Hello Nicola,
One thing i noticed from your debug log is that your are using CSVI 7.5.1 version. With latest CSVI version and with your import files i am not seeing any issue running import on my local test site. Can you update your CSVI and then run the import? See if that fixes the issue.
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. # 3
Accepted Answer Pending Moderation
No luck!
Updated CSVI and VM extension to 7.12.
Same result
Created two new test files changing product skus to make csvi create new products
Same result
In attach new imported files and logs
In childs you can find almost same line:
[QUERY]	 UPDATE `plugf_virtuemart_product_customfields` SET `customfield_params` = 'usecanonical=0|showlabels=0|sCustomId=0|selectoptions=[]|clabels=0|options={\"53368\":[],\"53369\":[],\"53370\":[]}|' WHERE `virtuemart_product_id` = 53364

I think this update is wrong... it overwrites the correct update done in fathers:
UPDATE `plugf_virtuemart_product_customfields` SET `customfield_params` = 'usecanonical=0|showlabels=0|sCustomId=0|selectoptions=[{\"voption\":\"clabels\",\"clabel\":\"P1\",\"values\":\"\"}]|clabels=0|options={\"53364\":[\"0\"]}|' WHERE `virtuemart_product_id` = 53364
Attachments (4)
  1. more than a month ago
  2. RO CSVI
  3. # 4
Accepted Answer Pending Moderation
Hello,
Please also post your import template XML file. To get the template XML go to CSVI Maintenance page, select CSVI Pro in first drop down, Backup templates in second dropdown. Click continue. Please post the downloaded XML file.

Also please post the screenshots of setup of your custom fields varianti_multiple and P1 from VirtueMart custom fields page.
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
Accepted Answer Pending Moderation
  1. more than a month ago
  2. RO CSVI
  3. # 6
Accepted Answer Pending Moderation
Hello,
Thank you so much for sending those requested files. I am still not able to reproduce the issue with your template. Please check the screenshot on how the multi variants looks for product test01. Also the query you are saying that is emptying the values looks like below in my debug log. Can i take a look at your site? You can send me the login details to tharuna@csvimproved.com.

[QUERY]	UPDATE `blpk7_virtuemart_product_customfields` SET `customfield_params` = 'usecanonical=0|showlabels=0|sCustomId=0|selectoptions=[{\"voption\":\"clabels\",\"clabel\":\"P1\",\"values\":\"Rubino\\r\\nZaffiro Blu\\r\\nSmeraldo\"}]|clabels=0|options={\"2\":[\"0\"],\"6\":[\"Rubino\"],\"7\":[\"Zaffiro Blu\"],\"8\":[\"Smeraldo\"]}|' WHERE `virtuemart_product_id` = 2
Attachments (1)
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. # 7
Accepted Answer Pending Moderation
The problem has been resolved by Tharuna: he didn't give up leaving me in a mess! After several tests on the site he made a fix in the plugin core code!
Great assistance!
  1. more than a month ago
  2. RO CSVI
  3. # 8
  • Page :
  • 1


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