OK, I can open those, but they are not what I was expecting at all.
We had previously been talking about using the WooCommerce product import tool to import products along with product categories.
These new CSV files you shared just have Categories, but no products, and a lot of the rows are empty, with no values for the Categories, though they do have language information.
You also have the WP All Import plugin, are you using that now instead of the WooCommerce import tool?
Sorry to go backwards, but it seems like we need to clarify what we are trying to do and what the problem is again.
Going back over this thread, my understanding is
1. your site had English products (imported)
2. you translated these products to Dutch
4. you added product categories in English
3. you translated the product categories to Dutch
At this point the categories are not assigned to the products, in either language.
Rather than assign them within the WordPress UI you prefer to use a spreadsheet to assign them.
So,
5. you exported the Dutch products and the English products
6. in the spreadsheet you added the product categories to the products (Dutch categories to Dutch products, English categories to English products. From your description it sounds like you handled both languages in the same CSV file.)
7. you imported this spreadsheet, and then you ran the WPML Export & Import wizard to set the language information
That's when you encountered problems. Rather than the categories being assigned as intended, some of them were duplicated.
Assuming all of the above is correct, I'm not sure what these latest CSV files you shared are for. If the intention is to connect categories to products, then the CSV file should contain both the products and the categories.
Your assumption is totally correct. I am using a csv to connect categories to products.
I tried to keep the csv as clean as possible (so just a product ID, category and WPML info) to avoid issues.
The empty rows are the variations of a variable product. They inherent the product category of the parent so no need to assign a category to them.
And we have used this method in other sites (without WPML) as well where it worked fine. But with WPML we keep getting an issue with duplicate categories.
One thing I can think of is that is can not handle "the same" names. For example under "brands" (english) and "merken" (dutch), we have brand names that are identical. If that would be the case that would be a serious issue, because we can not change those names.
What you are aiming to do isn't what the WPML Export & Import plugin is designed for, and after further testing I can confirm that it is the wrong tool for this job, and it's not needed. You should remove the plugin.
If the purpose of exporting and importing CSV files is to simply connect the products with the relevant product categories, across each language, then you should only export the products in the default language.
Specifically
- export the products in the default language
- edit the CSV to add the product categories in that language
- import that CSV file, overwriting the existing products
That's it. That will connect the product categories to the products in the default language.
If in WPML > Settings > Posts and pages synchronization you have the option "Copy taxonomy to translations" checked, that should also connect the translations of the product categories to the translations of the products.
If you don't have that setting checked, you can always go to WPML > Support and follow the link to the Troubleshooting page, and then run the batch process to "Synchronize post taxonomies" for Products.
I wasn't specifically testing variable products, but I expect the same result.
The topic ‘[Closed] Issue with import of categories in secondary language’ is closed to new replies.