Tags/topics: 
4
Answers
Vote up!
1
Vote down!

This SKU is already in use and must be unique. Please supply another value.

I'm getting this error using the inline entity form module but the product has not been added anywhere else. Any ideas?

Asked by: jprugh
on June 15, 2012

4 Answers

Vote up!
1
Vote down!

Hey @jprugh,
Currently the inline entity form (IEF) only supports creating new entities (products). Go to store > products and find the product/sku your referencing and then delete it. Then you'll be able to re-create it in the IEF widget. If you cannot delete the product, it is because it's referenced by a shopping cart or completed order. In that case, you can change the "widget type" for your product reference back to autocomplete, then add the product, then change it back to IEF. There is an issue open to extend the IEF widget to allow existing entieies to be associated. http://drupal.org/node/1526084. Some of my clients had the same problem which prompted me to get involved to get this feature added to the IEF module.
Thanks
Andy

Andy Giles
Answer by: Andy Giles
Posted: Jun 18, 2012

Comments

I have the same problem, from time to time, and I can confirm that the new product is not in any way a duplicate of any previously entered product. So the following...

"Go to store > products and find the product/sku your referencing and then delete it."

...can't solve anything.

/marcus

- farrington on June 19, 2012
Vote up!
0
Vote down!

Hi marcus,

I think i understand your situation.

I still have this problem with the newest commerce kickstart2. I think the problem may because the separation of products and products display. For some reason(crash of the program, or cancel of the operation in the middle of the process...), it happens, there are products in the database but the product is not shown in the admin panel/ mange products. Therefore, when user try to create the same product (SKU) he can not see in the mange products, system checked the database and tell there is only this SKU.

If you want to use the same SKU, i think you have to go into the database and manually find that SKU and delete it, then create you new product with this SKU in the admin panel/mange products again. At lease that is what I did.

Maybe some one can come up with a deep understanding and reason for it?

Answer by: harpsichord
Posted: Jun 8, 2013
Vote up!
0
Vote down!

I was a little changed of views "Commerce Backoffice: Products" and add to it field "bulk operation" with "modify entity values". Now I can change any taxonomy terms for multiplie products.
But, I have same problem "This SKU is already in use and must be unique. Please supply another value" when I try to add taxonomy term to multiplie products.
At the same I have no problem with change published option for multiplie products or promote products to front page for multiplie products.
Any ideas?

Answer by: Dr.Osd
Posted: Sep 26, 2013

Comments

This is actualy what harpsichord said but with more details if it can help anyone.

When i try to "modify entity" and change the category of the selected products i have the same error "This SKU is already in use and must be unique. Please supply another value"

I noticed in the database at table "commerce_product" that it creates a product with an empty SKU value. I then copy the product_id from that row and run a database search in all tables for that product_id and delete all the entries.

Then when i try to modify entity values it works only once perfectly. But after that, it creates again another empty sku entry, and the same error appears if you try to modify entity values again.

I think the problem is that because it creates a product with an empty sku, when you try to modify anything with the bulk operations tool, it somehow tries to create a product with an empty sku field ant it cant do that, because in the database there is already a product with an empty sku value so it thinks that it is a duplicate.

My english is not very good i hope i dident confuse anyone.

- pit_zavra on November 14, 2013
Vote up!
0
Vote down!

Actualy you can delete the product with the empty sku value from here

admin/commerce/products/variations

Its the same thing. This helped me a lot.

Answer by: pit_zavra
Posted: Nov 14, 2013