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.
- keep
- RO CSVI
- Thursday, 27 May 2021
- Subscribe via email
0
Accepted Answer
Pending Moderation
Hello,
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.
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 our extensions, please post a rating and a review at the Joomla! Extension Directory
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
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.
Accepted Answer
Pending Moderation
Hello,
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.
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.
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 our extensions, please post a rating and a review at the Joomla! Extension Directory
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
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?
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?

Accepted Answer
Pending Moderation
Hello,
Thats correct.
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?
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 our extensions, please post a rating and a review at the Joomla! Extension Directory
Tharuna
=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
- Page :
- 1
There are no replies made for this post yet.
Be one of the first to reply to this post!
Be one of the first to reply to this post!
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here. Register Here »