• Resolved fabricoholic

    (@fabricoholic)


    Hi !

    I have a double problem with the IDs of my products.

    I worked with CSV files as we have more than 300 products to import.
    We chose an ID for each product, and we have used them for the “suggested product” column. These are very important.

    First problem : When I import my CSV in wordpress, the IDs are not the ones I have chosen. So it is problematic for the suggested products.

    So, I thought that maybe it will self actualize, so i wanted to try by creating another CSV file, super small, with just two products. To see if it would work anyways.
    So I have deleted all the products, to “start fresh”.

    Second problem :it ALWAYS says a product with the same ID already exists ! Even if there is NO product at all ! Or if I try with ID such as 20000000 ! I tried five times…

    This is driving me crazy, do you know where the problems could come from please ?
    *Thanks !

    • This topic was modified 2 years, 10 months ago by fabricoholic.
    • This topic was modified 2 years, 10 months ago by fabricoholic.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi there,

    Can you provide a copy of the CSV file (with 1-2 products that are having the issue) so that we can check? You can provide a link to the file as well.

    Thanks.

    Two observations:

    If you are importing new products then you shouldn’t use the ID column – this is assigned automatically by WordPress. Use an SKU instead.

    If you delete a product then it is set to ‘trash’ and still exists in the database!

    Thread Starter fabricoholic

    (@fabricoholic)

    Hi and thank you for your answers !

    Can you provide a copy of the CSV file (with 1-2 products that are having the issue) so that we can check? You can provide a link to the file as well.

    Here !

    =)

    If you delete a product then it is set to ‘trash’ and still exists in the database!

    Is it possible to clean the database in that case ?
    Yesterday I tried to use the plugin WP-Sweep, didn’t do anything, so I deleted directly from my database (I did a backup before) and it didn’t change anything neither…

    I guess we will have to go through that process.
    Also, do you know why we can create an ID column if we can’t set it ? It is totally impossible to chose it by ourselves ?

    Deleting things from the database directly isn’t a good idea either! Did you delete all the entries in the wp_postmeta table too?
    Try running WP Sweep again – it should now find orphaned data in wp_postmeta

    In All Products there should be a link to trash at the top of the list – you can empty it from there.

    The ID column is useful when you use a CSV upload to update existing products.

    Thread Starter fabricoholic

    (@fabricoholic)

    I didn’t, but I will use the WP Sweep again then. Thank you !
    I usually don’t use the DB directly like that, I was just very lost on what to do.

    I have one last question : then, can I use the SKU to make the suggested products ? Because if I recall well we are supposed to give the ID ?

    EDIT : it seems to work ! So I guess problem solved ??

    • This reply was modified 2 years, 10 months ago by fabricoholic.

    Yes, you can use an SKU if you’re creating new products – the ID will be created automatically

    Thread Starter fabricoholic

    (@fabricoholic)

    Thank you !
    Problem solved then !

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘ID not matching with the CSV’ is closed to new replies.