How to fix it
- If the file came from another store, clear the ID column, or delete it, before importing. SKUs are a safer way to match products.
- If you are re-importing to change products, tick "Update existing products" instead.
- Make sure no ID appears on two rows.
Example
A file with this problem
ID,Type,SKU,Name,Published,Visibility in catalog,Tax status,In stock?,Stock,Regular price,Images,Parent,Attribute 1 name,Attribute 1 valu... 10,simple,MUG-1,Mug,1,visible,taxable,1,5,12.00,,,,, 10,simple,MUG-2,Large Mug,1,visible,taxable,1,5,15.00,,,,,
What the checker says about it
- Line 3: ID 10 is also on line 2. On a new-products import only the first is imported and this row is skipped with "A product with this ID already exists."; with "Update existing products" ticked, this row overwrites the same product instead, or both are skipped with "No matching product exists to update." if the ID is not in your store.
Once the listed rows are fixed, check the file again; the checker also looks for the other problems in WooCommerce's import code, so you do not trade one error for the next.
Questions
- What does "A product with this ID already exists." mean in WooCommerce?
- The ID column holds product IDs from the store the file was exported from. On a new-products import, WooCommerce skips a row whose ID it has already imported in the same file, which happens when the same ID appears on two rows (007 and 7 count as the same ID).
- How do I fix it?
- If the file came from another store, clear the ID column, or delete it, before importing. SKUs are a safer way to match products. If you are re-importing to change products, tick "Update existing products" instead. Make sure no ID appears on two rows.
Other WooCommerce import errors
- Invalid product type.
- Variation cannot be imported: Missing parent ID or parent does not exist yet.
- Variation cannot be imported: Parent product cannot be a product variation
- Invalid catalog visibility option.
- Invalid product tax status.
- Unable to use image
- All checks
Sources
- WooCommerce 11.2.2 source: class-wc-product-csv-importer.php: https://github.com/woocommerce/woocommerce/blob/11.2.2/plugins/woocommerce/includes/import/class-wc-product-csv-importer.php
Based on WooCommerce 11.2.2's import code and documentation. Not tested on a live store.