1. shimon
  2. RO CSVI
  3. Tuesday, 05 January 2016
  4.  Subscribe via email
Hi,

If I do a product import of an item that already exists in the data base, and there are related products, the related products get duplicated.

I do not know if what I am explaining is clear, so as an example if I import Product A that has related products Prod-B and Prod-C, the first time I have {Prod-B,Prod-C}. The second time I import it Product A has {Prod-A, Prod-B, Prod-A, Prod-B}.

The list of related products just keeps growing. What am I doing wrong?

Thanks
Accepted Answer Pending Moderation
Hello Shimon,
Please try loading the attached patch file and try doing the import.


patch_vm_related_products_2016-01-06.zip
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. # 1
Accepted Answer Pending Moderation
Hello Shimon,

I cannot reproduce the issue you are describing. You said
The list of related products just keeps growing. What am I doing wrong?
Does the import finish normally? If so, after you finished an import check in your database if the table csvi_related_products is empty. That is where CSVI retrieves the related products from on import. Once the import is finished, this table is emptied.

Attached is a very simple test file I used to test the related import.
Attachments (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. # 2
Accepted Answer Pending Moderation
I had the same problem of duplicate related products when I imported a file that already had them listed. I applied the patch file, and it seemed to fix the problem. However, as of this morning, that problem has returned! No changes to Joomla, VM or CSVI Pro since the patch was applied.

On a related note, how would I remove related products from a product that previously had some? Emptying the field did not have an effect.
  1. more than a month ago
  2. RO CSVI
  3. # 3
Accepted Answer Pending Moderation
Hello,
Can you send me the site administrator login, FTP and phpmyadmin login details so i can have a look at 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. # 4
Accepted Answer Pending Moderation
I can provide ftp and admin access, but the test site is sharing a server with other sites, and I can't provide phpmyadmin access (company rules). Would you be able to do anything meaningful without access to the db tables?
  1. more than a month ago
  2. RO CSVI
  3. # 5
Accepted Answer Pending Moderation
Could you provide us with an export of the virtuemart tables?
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. # 6
Accepted Answer Pending Moderation
I'll be moving the site to a new host, so I can provide admin, ftp, and db access.
In the mean time, here is the csv.
Attachments (1)
  1. more than a month ago
  2. RO CSVI
  3. # 7
Accepted Answer Pending Moderation
Hello,
Posting the solution here so it helps others coming up with same issue.
For Virtuemart version 3 and above, the field value virtuemart_vendor_id is 0 in #__virtuemart_customs table for related products and related categories(core inserts of Virtuemart). CSVI script checks related products against value 0 and not 1. Changing virtuemart_vendor_id field for related products to 0 will solve the issue of inserting related products repeatedly.
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. # 8
Accepted Answer Pending Moderation
Thanks.

I think that I understand you.

So I should go into table _virtuemart_customs and edit the two entries that have custom_title field = ( COM_VIRTUEMART_RELATED_PRODUCTS and COM_VIRTUEMART_RELATED_CATEGORIES )and set the virtuemart_vendor_id to 0.

OK.

Now I have to go through the DB and get rid of all the duplicates.

Do you by any chance have a query that will do this?
  1. more than a month ago
  2. RO CSVI
  3. # 9
Accepted Answer Pending Moderation
Hello Shimon,
Thanks.

I think that I understand you.

So I should go into table _virtuemart_customs and edit the two entries that have custom_title field = ( COM_VIRTUEMART_RELATED_PRODUCTS and COM_VIRTUEMART_RELATED_CATEGORIES )and set the virtuemart_vendor_id to 0.

OK.

Yes, doing that will avoid duplicate related product entries.

Now I have to go through the DB and get rid of all the duplicates.

Do you by any chance have a query that will do this?

You dont have to remove the duplicate entries, Please try doing a fresh import, CSVI will remove the old entries related with product and new rows will be imported.
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. # 10
Accepted Answer Pending Moderation
Thanks for finding the cause.

Rather than going into the database to edit the tables, is there a field/value we can add to the import csv file and template to fix this? Or is this something that will be fixed or patched in CSVI Pro?

If editing the db tables is the only fix, is it something that only has to be done once?
  1. more than a month ago
  2. RO CSVI
  3. # 11
Accepted Answer Pending Moderation
Hello,
Thanks for finding the cause.

Rather than going into the database to edit the tables, is there a field/value we can add to the import csv file and template to fix this? Or is this something that will be fixed or patched in CSVI Pro?

The fix for solving the duplicated issue in CSVI pro for virtuemart related products is coming with our next release CSVI Pro 6.5.0. This fix is based on the change in core virtuemart related products entry.

If editing the db tables is the only fix, is it something that only has to be done once?

As i said in my previous post, it was the problem with core Virtuemart inserts in your case, unless the core values are altered intentionally there is no requirement of fixing it again.
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. # 12
Accepted Answer Pending Moderation
CSVI 6.5.7
VM3.0.16
J3.5.1

Hi,

I have the latest CSVI 6.5.7 but still am getting added related products with every import; I have gone into the database and looked at the values as per your post but I find your instructions a little confusing???

I was hoping your last update would fix it but no!
  1. more than a month ago
  2. RO CSVI
  3. # 13
Accepted Answer Pending Moderation
Hello Rick,

If you know how, have a look at the csvi_related_products table. If there is still any data in there, can you empty that table? You can do that with the command
TRUNCATE TABLE X__csvi_related_products
and you need to replace X with your own prefix. That would at least clear those values out and be no longer added to the products.

My question is, do you then still need to import more related products?
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. # 14
Accepted Answer Pending Moderation
Hi Roland,

The csvi_related_products table is empty

I used to update my products with related_products import field always there with no issue of duplication, do I now need to do it as a separate import?

Any idea as to how to get all current duplicated related product images off website?

Thanks

Rick
  1. more than a month ago
  2. RO CSVI
  3. # 15
Accepted Answer Pending Moderation
Hello Rick,
I used to update my products with related_products import field always there with no issue of duplication, do I now need to do it as a separate import?
Any idea as to how to get all current duplicated related product images off website?

Since you are saying you have duplicated related products that can be a cause of duplicate images. Can you try importing products again with just related_products field? This would clean up the old ones and do a fresh insert of related products.
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. # 16
Accepted Answer Pending Moderation
Okay, did an import with related_products field blank, unfortunately it did not wipe out the related product images.
As instructed I only imported product_sku and related_products
  1. more than a month ago
  2. RO CSVI
  3. # 17
Accepted Answer Pending Moderation
Hello,
unfortunately it did not wipe out the related product images.

Importing related products wont clean up the product image, the import is to check if your duplicate entry for related products is solved. Did that solve?
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. # 18
Accepted Answer Pending Moderation
All i'm trying to do is get it to work like it used to work, now everytime I import I get another set of images. (my related_products was part of an upload with many other product fields that was updated constantly without duplicates)

I dont understand what you're asking now.

What I want is to get rid of duplicate images or all images so I can do a fresh upload. How can I do that?

I guess what you're telling me is that it won't work as before and that related_products needs to be a one time seperate upload; if thats the case I guess I can accept it but the way it was set up before was easier, one less upload
  1. more than a month ago
  2. RO CSVI
  3. # 19
Accepted Answer Pending Moderation
Hello,
I think the confusion is in the word related product images, did you mean images means as in the attached screenshot?


related_products-2.png
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. # 20
  • Page :
  • 1
  • 2


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