Background of the issue:
I'm using the built-in CSV importer. The first import with products in language EN completes without errors. The next import with products in language DE shows an error. I didn't tick the option 'Existing products that match by ID or SKU will be updated. Products that do not exist will be skipped.' In the CSV files, I have the three WPML fields 'Meta:_wpml_import_translation_group, Meta:_wpml_import_language_code, Meta:_wpml_import_source_language_code'.
Symptoms:
The second import shows the error: 'Import complete! Products were skipped' and for each product: 'A product with this SKU already exists.'
Questions:
Why are products being skipped during the second import? It should import both csv files (ie. for both languages)
What's the issue/solution ?
This does not work, because relationships between variant and variations are controlled by the SKU. Also your example files on your own website show identical SKU's.
I’ve escalated the issue to our second-tier support team for further investigation. I will keep you updated as soon as I receive any feedback from them.
Our second-tier team has further investigated the issue and confirmed that there is an error in the example provided in the documentation. We have notified the documentation team to address and correct these examples.
Regarding the default import, the SKU can be added to entries in the primary language, but it should remain empty for entries in secondary languages. WPML will automatically handle and set the SKU for secondary languages during processing.
Therefore, I recommend adjusting the CSV file accordingly and reimporting it.
I adjusted the translation csv (removed SKU's) and ran both imports, followed by the wpml export and import function. The result is not as expected. All products in mixed languages are listed under language EN. I would expect to only see two products: two products under EN and two products under DE.
I imported the products and it worked for me but I made some adjustments as below on de import file
- Removed the sku fields and set it to be empty.
- On Meta:_wpml_import_source_language_code I added en as this is required, since it's translations of English.
- While importing set the sku to do not import for De.
Can you make this changes and try to see if it helps.
Still not working 100%. Looking at the test site, I don't see any product variations in language DE. They are only shown in EN. When you look at a product in DE you can't select any 'options/variants'.
It appears that WooCommerce relies on the SKU for linking product variations. Since the SKUs were left blank, this caused the issue to arise.
I’ve now added unique SKUs for the German products and updated the parent field in the CSV file. It seems to be working fine on my end — could you please verify this from your side?
Looking forward to your response.
Thanks
The topic ‘[Closed] an error during import of csv file’ is closed to new replies.