Jump to content
charlie123

Any Way To Avoid Duplicate Sku (Product Reference)?

Recommended Posts

Hi,

 

Is there any way to avoid duplication of product SKU (reference)? The reason is that all my products should have unique sku's

 

For example if I have a "Superb Test Product 1" with reference "stp1" and than I would like to create new product "Superb Test Product 2" which should have unique reference like "stp2". But what if I accidentally set the same SKU? In this case I would like Prestashop not to allow me to save the product, instead I would like to see the error like "warning! duplicated reference field!"

 

Is it possible to do something like that? Thanks

  • Like 1

Share this post


Link to post
Share on other sites

Its not and it would take quite a bit of modification to make it possible.

Share this post


Link to post
Share on other sites

Its not and it would take quite a bit of modification to make it possible.

 

Who could be able to make a custom modification like that and how much it will cost?

  • Like 1

Share this post


Link to post
Share on other sites

I aslo have same problem with duplicate Product reference is their any module for this issue?

Share this post


Link to post
Share on other sites

Hi

you may check duplicated products depending on reference by execute this sql statement on product table and delete duplicated item manually

 

SELECT `reference`,

COUNT(`reference`) AS duplicated

FROM aaa_product

GROUP BY `reference`

HAVING ( COUNT(`reference`) > 1 )

  • Like 2

Share this post


Link to post
Share on other sites

What about a simple workaround to add a uniqe index on reference column?

Off course in the first instance you need to make an order in references, then it should be possible to add unique index. When this index is applied db will not allow on another product with same reference.

Share this post


Link to post
Share on other sites

I have the same issue.  Has anyone had any luck finding something to eliminate duplicate sku's?

 

Jeff

www.stickertalk.com

 

You can add a UNIQUE constraint on your reference field in your DB.

 

Just remove your duplicate first

 

In my case I apply this to the combinations as well

  • Like 1

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More