• Resolved Michael Larcom-Bizier

    (@mlarcombizier)


    Hello,

    We recently updated the theme and checkout process of our floral e-commerce store. This was done over the course of about two months in a development environment. During this time, a handful of new products were added in preparation for Valentine’s Day. Before pushing the updated site live, we used the native WooCommerce product export/import function to transition these products into the dev site, which was successful.

    Now that the site is live, we noticed the SKU numbers for variation products were missing. We attempted to add them back in, but are receiving the error “invalid or duplicate sku” even though this is the only product with the sku number in question (SV2217 with variation of SV2217D). I exported the product library to a csv file to search for a duplicate of the SKU, which I did not find – only one set of products with the SKU SV2217, however there does seem to be a discrepancy in the ID numbers.

    Here is a screenshot of the comparison:
    https://studleys.s3.amazonaws.com/Screen+Shot+2022-01-27+at+2.51.35+PM.png

    Any insight or assistance is greatly appreciated.

    Thank you,
    Michael

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @mlarcombizier

    Would you mind trying to import them again? However, during the import, disable the mapping for the “ID” field.

    If the issue persists even with that option disabled, could you please share a copy of your site’s System Status?

    You can find it via WooCommerce > Status. Select “Get system report” and then “Copy for support”.?

    Once you’ve done that, paste it here in your response.

    Thank you!

    Thread Starter Michael Larcom-Bizier

    (@mlarcombizier)

    Thank you for your response André. I exported the product library to CSV and found there were duplicates of the product that were using the SKU I was trying to assign to the variations. These seem to only be in the database and not in the WooCommerce product list. I swapped the SKU values and re-imported the CSV, which resolved the issue.

    My only question now is, should I worry about these database duplicates or just ignore them since they are not live products that can be accessed outside of the database? I am hesitant to delete them because I do not want to lose any data that may be associated with them (previous orders, etc.)

    Thread Starter Michael Larcom-Bizier

    (@mlarcombizier)

    To clarify, I first searched by SKU and did not find duplicates. I tried again by product name and was able to see the duplicates.

    Mirko P.

    (@rainfallnixfig)

    Hi @mlarcombizier,

    See if clearing the product/shop transients cache and orphaned variations help remove duplicate SKUs in the database.

    Otherwise, make a full backup and run this SQL query to select duplicate SKUs:

    https://gist.github.com/yanknudtskov/035dbb2bcfacf8afa76b63d4ca6735aa

    Change wp_fanatic_shop_postmeta to your postmeta table that is wp_postmeta by default.

    Once you find the duplicate SKUs you can delete them but make sure you have a backup of your site and database in case anything goes wrong.

    You could consider using a service like Jetpack or installing a plugin like UpdraftPlus. If something goes wrong it’s nice to know that you can restore your site to the previous state.

    Thanks.

    Mirko P.

    (@rainfallnixfig)

    Hi there,

    We haven’t heard from you in a while, so I’m going to mark this as resolved. Feel free to start a new thread if you have any more questions.

    Cheers.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Invalid or Duplicate SKU’ is closed to new replies.