1. keep
  2. RO CSVI
  3. Thursday, 27 May 2021
  4.  Subscribe via email
As far as I can see the key field for VirtueMart category import is category_path.
Is it possible to customize what the key field should be? In my case vituemart_category_id would be the best. Currenty I can't import based on the primary key of the table.
Accepted Answer Pending Moderation
Hello,
As far as I can see the key field for VirtueMart category import is category_path.

Thats correct.

Is it possible to customize what the key field should be? In my case vituemart_category_id would be the best. Currenty I can't import based on the primary key of the table.

There is no option to customise the key field. As you know vituemart_category_id is primary key field and it should be handled by database. RO CSVI checks the existing category based on the category_path. If the category_path does not exists it inserts new record else it updates the existing category record. May i ask why you are using vituemart_category_id and not category_path?
Kind regards,

Tharuna

=========================
If you use CSVI, please post a rating and a review at the Joomla! Extension Directory
  1. 2 weeks ago
  2. RO CSVI
  3. # 1
Accepted Answer Pending Moderation
There is a site with ~200 categories and 4 languages. A want to keep up2date an other site-copy with the languages. In this case there would be much easier a simple export-import for the fields wich are in #__virtuemat_categories_en_gb tables, like virtuemart_category_id, name, desc, meta, etc.
Here is a one category example with two languages
English: car
German: wagen
The #__virtuemart_category has one record (virtuemart_category_id=1) and the language tables have also one record with the same primary key.

The site owner modifies both of them to 'my car' and 'mein wagen'
If you copy this using the name as key, csvi would create a new category instead of update the existing one, so I would get 'car' and 'my car' as well.
Or am I missed something? :)
  1. 2 weeks ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Hello,
There is a site with ~200 categories and 4 languages. A want to keep up2date an other site-copy with the languages. In this case there would be much easier a simple export-import for the fields wich are in #__virtuemat_categories_en_gb tables, like virtuemart_category_id, name, desc, meta, etc.

You can do this using RO CSVI Custom table import. In RO CSVI custom table import template on Options tab set import based on field as virtuemart_category_id, select the table name as #__virtuemat_categories_en_gb table. Save the template. With this import you can update final category_name along with virtuemart_category_id. Let me know if that helps.

Here is a one category example with two languages
English: car
German: wagen
The #__virtuemart_category has one record (virtuemart_category_id=1) and the language tables have also one record with the same primary key.

The site owner modifies both of them to 'my car' and 'mein wagen'
If you copy this using the name as key, csvi would create a new category instead of update the existing one, so I would get 'car' and 'my car' as well.

The problem here is RO CSVI VirtueMart import runs based on category_path field. Since the category_path my car' and 'mein wagen' does not exist, RO CSVI creates a new category.
Kind regards,

Tharuna

=========================
If you use CSVI, please post a rating and a review at the Joomla! Extension Directory
  1. 2 weeks ago
  2. RO CSVI
  3. # 3
Accepted Answer Pending Moderation
The problem here is RO CSVI VirtueMart import runs based on category_path field
- indeed, but if you check VM Product import template, there is a 'Import based on' field where you can specify the key of the import. If you could extend VM Category import with a same functionality, it could help with this.
  1. one week ago
  2. RO CSVI
  3. # 4
Accepted Answer Pending Moderation
Hello,
indeed, but if you check VM Product import template, there is a 'Import based on' field where you can specify the key of the import. If you could extend VM Category import with a same functionality, it could help with this.

Thats correct and that is because there are few unique fields in VirtueMart Product table like product_sku or product_mpn or product_gtin, so there is an option to specify Import based on field. But in VirtueMart category import there are no such unique fields and so import works based on category_path field.
Kind regards,

Tharuna

=========================
If you use CSVI, please post a rating and a review at the Joomla! Extension Directory
  1. one week 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!