• Resolved mschuessler

    (@mschuessler)


    Hi,

    I duplicated an item and assigned a new SKU. The message appeared ‘Invaled or duplicate SKU’ – although I can not find the SKU in products at all. Does anybody have an idea what to do or where to look at and delete the duplicate? Thanks in advance

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

Viewing 15 replies - 1 through 15 (of 25 total)
  • Is it in the bin after being deleted?

    Thread Starter mschuessler

    (@mschuessler)

    Yes…the bin has been emptied in German and English

    • This reply was modified 4 years, 7 months ago by mschuessler.
    Plugin Contributor Niels Lange

    (@nielslange)

    Hello @mschuessler,

    The easiest way to list all SKUs is within the database. You can find the SKUs within the table wp_postmeta. You can list all SKUs using the following MySQL query:

    SELECT * FROM wp_postmeta WHERE meta_key LIKE '_sku';
    • This reply was modified 4 years, 7 months ago by Niels Lange.
    • This reply was modified 4 years, 7 months ago by Niels Lange.

    Maybe try WooCommerce-Status-Tools-Delete Orphaned Variations?

    Thread Starter mschuessler

    (@mschuessler)

    @nielslange

    the query gave error message: #1064 – You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘FROMwp_postmetaWHEREmeta_keyLIKE ‘_sku” at line 1

    • This reply was modified 4 years, 7 months ago by mschuessler.
    • This reply was modified 4 years, 7 months ago by mschuessler.
    Thread Starter mschuessler

    (@mschuessler)

    @seank123 Is this a plugin?

    Thread Starter mschuessler

    (@mschuessler)

    @nielslange

    Now I got this:

    SELECT
    * FROM
    wp_postmeta
    WHERE
    meta_key
    LIKE
    ‘_sku’ LIMIT 0, 25
    MySQL said: Documentation

    #1046 – No database selected

    Plugin Contributor Niels Lange

    (@nielslange)

    You need to run this MySQL query within the database of your WooCommerce installation.

    Thread Starter mschuessler

    (@mschuessler)

    @nielslange

    I not that techi…where do I do that?

    Plugin Contributor Niels Lange

    (@nielslange)

    I suggest that you reach out to your hosting company to ask them to point you to the database that had been used to install the WooCommerce site. Providing step by steps instructions on how to run SQL queries exceeds the scope of our support. If your hosting company should not be able to assist you on this issue, perhaps you could contact one of our recommended WooExperts to see if they can help assist you with something like this.

    Thread Starter mschuessler

    (@mschuessler)

    @nielslange Hi Niels,

    thanks. Actually I was in the database that has all the data for the installation on the host server. The query result was being shown in the previous messages. Is there any other way?

    Plugin Contributor Niels Lange

    (@nielslange)

    Do you see the table wp_postmeta in your database? It’s possible that the table has a different prefix, e.g. xyz_postmeta. That table contains the following columns:

    – meta_id
    – post_id
    – meta_key
    – meta_value

    Within the column meta_key you’ll find various entries with the value _sku. If you look up these rows, you’ll see all corresponding SKUs in the column meta_value then.

    Thread Starter mschuessler

    (@mschuessler)

    @nielslange The table is not there…I even filtered on the name…

    Plugin Contributor Niels Lange

    (@nielslange)

    As mentioned before, the table might have a different prefix. The table name ends with _postmeta. If you do not see that table in your database, then you’re looking at the wrong database as your WooCommerce site would not work without that table in the database.

    Thread Starter mschuessler

    (@mschuessler)

    @nielslange Now I found it…sorry – I am not that versed in SQL: it reads sw932_postmeta. Could that be it?

Viewing 15 replies - 1 through 15 (of 25 total)
  • The topic ‘Unable to create new SKU item’ is closed to new replies.