[SOLVED] UNQ_SALES_FLAT_ORDER_INCREMENT_ID in Magento
The error “UNQ_SALES_FLAT_ORDER_INCREMENT_ID” is usually seen when magento uses alphanumeric order numbers. When the old customer buys a product again, magento instead of increasing the ordre increment from the latest order, increases the increment from the last order of the same old customer. This creates a duplicate entry and magento refuses to take an order.
You can also receive an email containing “SQLSTATE: Integrity constraint violation: 1062 Duplicate entry ‘AB100082765’ for key ‘UNQ_SALES_FLAT_ORDER_INCREMENT_ID‘” error or “There was an error processing your request” during placing an order.
There is an easy fix to this problem. It requires a core modification of a code which can be done if you have access to ftp credentials. It cannot be performed from backend.
Open the ftp channel and Go to
There at its bottom you will find a line and you will have to replace it with another code (just remove a part of code)
$bind = array(':increment_id' => (int)$orderIncrementId);
$bind = array(':increment_id' => $orderIncrementId);
Now the alphanumeric order will start working again.