1. icsolutions
  2. RO CSVI
  3. Tuesday, 02 January 2018
  4.  Subscribe via email
Hi,

for a website I've to update all URL's from the downloads which are added to VM products. For adding the downloads to the product, I've used a plugin https://www.wdmtech.com/hexsys-virtuemart-product-attachment-plugin.

I've 3 downloads per language for every product.
When I do the following product import:
product_sku, custom_param, custom_title, custom_value (also tried with adding custom_price because I read it is mandatory)
He only updates (or add) the latest value of my file and he deletes the already existing values for the downloads of the product.

So when I try to add/update 2 downloads URL's and there exists already 6, after the update I only have 1 updated URL left, all the rest is gone.

thanks in advance
Accepted Answer Pending Moderation
Hello,
Looks like the downloads plugin uses its fields as VirtueMart custom fields for a product. We don't support this plugin but i don't see anything wrong with your import file provided the plugin saves its values as VirtueMart custom fields. Can you post the debug log of the import to check? To know on how to get the debug log check How to get debug information document.
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
Hi,

thanks for the support.

Please find logs in attachment
Attachments (1)
  1. more than a month ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Hello,
Thank you for posting the debug log. As i said earlier we don't support this plugin and so we are not aware on its behaviour. There is a delete query in our code which would clear the current custom fields and do a fresh import of values for the plugins CSVI supports. That query is the reason for your existing custom field getting deleted. What you can do is set a override file for your product import and in your override product.php file look for commented line "// Empty out any existing values" at around line 2173 under which the delete query is written. Comment the line $this->db->setQuery($query)->execute(); at line 2180 and then 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. # 3
Accepted Answer Pending Moderation
Hi,

The override where the existing values are not deleted is a good solution for me.
First I tried to create an override but I didn't get the productcustom in my drop down.
So I changed the product.php file itselfs and also changed the added text to the log to check if it effectively has been updated.

I commented out first only the execute as you suggested but it's still imports only the latest record of my import.
I commented out a lot more but without succes.

I add log in attachment, can you take another look please?
thanks
Attachments (1)
  1. more than a month ago
  2. RO CSVI
  3. # 4
Accepted Answer Pending Moderation
Hello,
The debug log shows there is no delete query which says existing custom fields are not removed, so that is good. Next thing i notice is that for the first record there is an insert query to product custom field table and from second record the inserted record is been updated, that is because the CSVI select query for getting the matching product custom field row is getting the id of the already inserted record and gets updated. CSVI checks for matching record using three fields virtuemart_product_id, virtuemart_custom_id and custom_value. These values must be same in your import file for all records except for custom_param field. You need to write your own custom code for inserting the records rather than updating. We are out of our limits in helping more here as this plugin data is not supported by CSVI.
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!