cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2 getting duplicate entry error on checkout page

Magento 2 getting duplicate entry error on checkout page

In my Magento version 2.2.5. Sometimes I am getting following error on checkout page during payment step:

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '25389-1-0-2.0000-0' for key 'UNQ_E8AB433B9ACB00343ABB312AD2FAB087', query was: INSERT INTO catalog_product_entity_tier_price (entity_id, all_groups, customer_group_id, qty, value, percentage_value, website_id) VALUES (?, ?, ?, ?, ?, ?, ?)

After refresh the page it will display the correct error message that due to out of product user can not checkout.

But first time the user is getting above MySQL error.


please help me out!

3 REPLIES 3

Re: Magento 2 getting duplicate entry error on checkout page

Re: Magento 2 getting duplicate entry error on checkout page

Hi @nimita_gajera,

 

Try to override /app/code/local/Adin/Sales/Model/Resource/Sales/Quote.php in order to remove (int) in this line: $bind = array(':increment_id' => (int)$orderIncrementId);

Please check the this link for more info, I hope it will resolve your issue.

Prema M

Re: Magento 2 getting duplicate entry error on checkout page

Hi @prema_mani

 

The issue is in Magento 2. And I am not getting error while creating order but I am getting error on checkout page. When user click on place order button then above MySQL error message will display.

if issue solved,Click Kudos & Accept as Solution