after upgrading from magento 1.8 to 1.9 I have faced the Integrity constraint error in checkout process with the following statement -
Integrity constraint violation: 1062 Duplicate entry 'order_id' for key 'UNQ_SALES_FLAT_ORDER_INCREMENT_ID'' in magento/lib/Zend/Db/Statement/Pdo.php:228
After following some steps I have got the solution of this which I am sharing here.
1) Copy app/code/core/Mage/Sales/Model/Resource/Quote.php to app/code/local/Mage/Sales/Model/Resource/Quote.php<br/>
2) Just replace the $bind = array(':increment_id' => (int)$orderIncrementId) with the $bind = array( ':increment_id' => $orderIncrementId ) under isOrderIncrementIdUsed() function.<br/>
3) Save the file and now execute checkout process.<br/>
Hope this will be helpful for some.
0 Comment(s)