When I'm updating products in my Magento-store externally from my accounting software I'm receiving following error in the logs:
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '727-0-4-0'
for key 'CC12C83765B562314470A24F2BDD0F36', query was: INSERT INTO
`catalog_product_entity_group_price` (`entity_id`, `all_groups`,
`customer_group_id`, `value`, `website_id`) VALUES (?, ?, ?, ?, ?)
How do I fix this?
Whenever there is an issue related to "SQL Integrity constraint", I have tried doing the below and this has worked for me very well:
Each time, you plan to update products using Magento Admin Panel or Another source in Magento.
Magento Enterprise Edition
Magento Community Edition
These settings are to avoid any SQL Integrity Constraint errors during Bulk/Single Product Updates.
After products are updated, revert the changes back as below:
Magento Enterprise Edition
Magento Community Edition
Note :: Make sure the /var/locks is removed before setting these and before doing a bulk product update.
Let me know if this helps.
Happy Coding...