Jump to content

Duplicate entry for Key 'id_product_2' in table 'ps_specific_price'


Andrejkov

Recommended Posts

Hello,

I have strange problem with my PS 1.7 shop when i try to save product in Debug mode i got error:

Duplicate entry '2-0-0-0-2022-11-25 00:00:00-2022-11-29 00:00:00-1-0-0-0-0-1-1' for key 'id_product_2'

INSERT INTO `ps_specific_price` (`id_shop_group`, `id_shop`, `id_cart`, `id_product`, `id_product_attribute`, `id_currency`, `id_specific_price_rule`, `id_country`, `id_group`, `id_customer`, `price`, `from_quantity`, `reduction`, `reduction_tax`, `reduction_type`, `from`, `to`) VALUES ('0', '1', '0', '2', '0', '0', '1', '0', '0', '0', '-1', '1', '0.2', '1', 'percentage', '2022-11-25 00:00:00', '2022-11-29 00:00:00')

How i Can fix it?

PS. When i will try use TRUNCATE TABLE ps_specific_price;

And add new specific prices its should work or not?

Regards.

Link to comment
Share on other sites

16 hours ago, bera_ramazan said:

Which page are you getting this error on?

resim.png.53e957dc2e689b9df3e832bcca9e4676.png

id_product is a primary

If you are doing this manually, first check if there is data for this product number.

Hello,

I get this error when i try to save product on debug mode in backoffice. 

I fixed this problem by TRUNCATE tables in db: ps_specific_price, ps_specific_price_priority, ps_specific_price_rule, ps_specific_price_rule_condition, ps_specific_price_rule_condition_group

Regards.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...