Jump to content

Error adding declination


krisocam

Recommended Posts

Hello,

 

I had an error when clicking generate in the product declination.

 

Here is my error

Duplicate entry '717-0-0-0-2023-05-02 00:00:00-2023-05-08 22:59:00-1-0-0-0-0-1-2' 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', '717', '0', '0', '2', '0', '0', '0', '-1', '1', '0.15', '0', 'percentage', '2023-05-02 00:00:00', '2023-05-08 22:59:00')

 

Thank you in advance for your help.

Link to comment
Share on other sites

Hi,

You can run a SELECT query to check if there are any duplicate entries in the ps_specific_price table with the same values as the one you are trying to insert.

If the existing specific price entry is not supposed to be a duplicate and is incorrect, you can modify it to match the data you want to insert.

If the existing specific price entry is a duplicate and not needed, you can remove it from the table to allow the new entry to be inserted without conflicts.

Thanks!

Link to comment
Share on other sites

The specific price table has an unique index that includes a lot fields. Its function is to prevent you from making two specific price rules for exactly the same conditions. Problem is that this set of fields is not the same for all Prestashop versions.

So it could be that your table has a different set of fields in the index than expected for your Prestashop version.

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...