Hi,
I have a question regarding the synchronization between virtuemart products and categories. Suppose I have 10 categories and 100 products, assigned to the various categories. Suppose the categories are deleted, and a new set of 11 categories are imported through CSVI, where 10 categories have the same category_path as the original 10. Although the 10 categories have the same category_path, the 100 products were linked to the categories via category_id, and therefore the links are now broken.
To avoid the issue above, what is the best way to structure the category/product CSVI import/export? Or, what is the best way to manage this?
Thanks
- andkit02
- RO CSVI
- Monday, 06 August 2018
- Subscribe via email
0
Accepted Answer
Pending Moderation
Hello Roderic,
Something came to mind since you have category_id in import file you can use RO CSVI custom table import and directly import into #__virtuemart_categories_XX_XX language table. Here XX_XX is the language you want to import translated category name.
Something came to mind since you have category_id in import file you can use RO CSVI custom table import and directly import into #__virtuemart_categories_XX_XX language table. Here XX_XX is the language you want to import translated category name.
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
Hello Roderic,
With category_path we find the parent of the category and the also level it belongs to. With category name we will not know the parent category to create category tree.
And there I do not see, why there is the need for the category path, as that's already there from the original import. It's not always so easy to get the category path from an external program.
With category_path we find the parent of the category and the also level it belongs to. With category name we will not know the parent category to create category tree.
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
Good Morning,
I see I haven't replied to this one yet. We changed the import file so that there is also a category path for the translations. It would have been easier, if I could have made a import file that looks like:
<category>
<category_id>123</category_id>
<category_name>translated category name</category_name>
</category>
And there I do not see, why there is the need for the category path, as that's already there from the original import. It's not always so easy to get the category path from an external program.
Cheers
I see I haven't replied to this one yet. We changed the import file so that there is also a category path for the translations. It would have been easier, if I could have made a import file that looks like:
<category>
<category_id>123</category_id>
<category_name>translated category name</category_name>
</category>
And there I do not see, why there is the need for the category path, as that's already there from the original import. It's not always so easy to get the category path from an external program.
Cheers
Accepted Answer
Pending Moderation
Hello,
With Keep category ID option set to Yes and import with parent first and then child category structure then importing with IDs should not be a problem.
What is the problem with the import? Category translation import with virtuemart_category_id works the same way as normal category import. You need virtuemart_category_id, category_path and category_path_trans fields and Keep category ID option should be set to Yes.
I have XML files coming from an external program and the category ID's in Virtuemart are based on those in the XML file. I don't see any issues as long as no extra categories are being added through Virtuemart (Auto increment). This should never happen so the ID's in the XML file are leading. I've ran this import a few times and all ID's seem to be imported correctly and stay the same.
With Keep category ID option set to Yes and import with parent first and then child category structure then importing with IDs should not be a problem.
Now I would like to import the translations based on the ID. With my setup, I don't see what the issue would be, doing the category translation by virtuemart_category_id. Or am I overseeing something?
What is the problem with the import? Category translation import with virtuemart_category_id works the same way as normal category import. You need virtuemart_category_id, category_path and category_path_trans fields and Keep category ID option should be set to Yes.
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
Hello, not sure if it's best to start a new topic or add to this one. But I'll just add to this one for now:
I have XML files coming from an external program and the category ID's in Virtuemart are based on those in the XML file. I don't see any issues as long as no extra categories are being added through Virtuemart (Auto increment). This should never happen so the ID's in the XML file are leading. I've ran this import a few times and all ID's seem to be imported correctly and stay the same.
Now I would like to import the translations based on the ID. With my setup, I don't see what the issue would be, doing the category translation by virtuemart_category_id. Or am I overseeing something?
With another website, the one I've been creating quite a few tickets for in the past, I've been importing Product Categories by ID for over 3 years and this hasn't caused any issues. So I don't see why doing the category translations by ID would be any problem.
Also, being able to import more than one Translation in one file would be desirable as well (Less files, less templates). Like this:
Cheers
I have XML files coming from an external program and the category ID's in Virtuemart are based on those in the XML file. I don't see any issues as long as no extra categories are being added through Virtuemart (Auto increment). This should never happen so the ID's in the XML file are leading. I've ran this import a few times and all ID's seem to be imported correctly and stay the same.
Now I would like to import the translations based on the ID. With my setup, I don't see what the issue would be, doing the category translation by virtuemart_category_id. Or am I overseeing something?
With another website, the one I've been creating quite a few tickets for in the past, I've been importing Product Categories by ID for over 3 years and this hasn't caused any issues. So I don't see why doing the category translations by ID would be any problem.
Also, being able to import more than one Translation in one file would be desirable as well (Less files, less templates). Like this:
Cheers
Attachments (1)
Accepted Answer
Pending Moderation
Hello,
You cannot update category id using CSVI import. category id field is the primary key field and it is handled by database. We have no control over it. This is the reason why we use category_path field as needed field in CSVI category import. This way CSVI checks if the category in the given path exists, if not inserts a new category.
Yes having a category id in import file says the category already exists and the record gets updated.
I'm wondering is it possible to set the category-id when uploading/importing list of categories?
You cannot update category id using CSVI import. category id field is the primary key field and it is handled by database. We have no control over it. This is the reason why we use category_path field as needed field in CSVI category import. This way CSVI checks if the category in the given path exists, if not inserts a new category.
I tried adding the category-id field, but categories with the same set of category-path and category-id lists got assigned to new category-ids at each upload
Yes having a category id in import file says the category already exists and the record gets updated.
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
Thanks, I see. I'm wondering is it possible to set the category-id when uploading/importing list of categories? I tried adding the category-id field, but categories with the same set of category-path and category-id lists got assigned to new category-ids at each upload. How can I set the values of the category-id through csvi import?
Thanks!
Thanks!
Accepted Answer
Pending Moderation
Hello,
Since the category ids have been changed, you should be doing a product import with category_path so the products gets assigned to the new ids of the categories.
To avoid the issue above, what is the best way to structure the category/product CSVI import/export? Or, what is the best way to manage this?
Since the category ids have been changed, you should be doing a product import with category_path so the products gets assigned to the new ids of the categories.
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 »