1. atrus
  2. RO CSVI
  3. Wednesday, 22 June 2016
  4.  Subscribe via email
Hi Roland,

We are facing the following issue when trying to import related products in VM3:

- The related products always get appended to the old ones, there is no way to replace the old entries, creating a mess :unsure:

The Overwrite existing data options is set to YES but it seems it is not working when importing related products.

Would appreciate your advice!

CSVI 6.5.7 / Joomla 3.5.1 / VM 3.0.16

Rgrds,
Chris
Accepted Answer Pending Moderation
Hello Chris,

When doing a product import and the related_products field is used, CSVI will delete any existing related products assuming it can find the relation.

Things that CSVI checks before deleting the related items is that there is an entry in the virtuemart_customs table with vendor ID 0 and field_type of R. My guess is, this is either missing or has a different value in your case. Can you verify that?
Kind regards,

RolandD

=========================
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 Roland,

Checked and the R entry is there, however in our installation (where we have only one vendor) it is virtuemart_vendor_id = 1.

Could this be the issue?

Rgrds,
Chris
  1. more than a month ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Hello Chris,

That is the issue indeed. Don't know how it got changed to 1 but this should be 0. If you make that change, your import should be good to go.
Kind regards,

RolandD

=========================
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
Thanks Roland, i'm afraid the virtuemart_vendor_id field is all over our vm tables and could accidentally break smth, is there any way in order to avoid this?
  1. more than a month ago
  2. RO CSVI
  3. # 4
Accepted Answer Pending Moderation
Hello,

I didn't mean to change it all over your database, just that one field for Related products. If that is not something you want to do, you can change the CSVI core code by changing the file adminstrator\components\com_csvi\addons\com_virtuemart\helper\com_virtuemart.php around line 448 you will see
->where($this->db->quoteName('virtuemart_vendor_id') . ' = 0')
and change the 0 to 1.
Kind regards,

RolandD

=========================
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
Thanks Roland,

For now i have decided just to make this small change in com_virtuemart.php and it works fine :)

Rgrds,
Chris
  1. more than a month ago
  2. RO CSVI
  3. # 6
  • Page :
  • 1


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