问题可能出现在修改完订单编号后,提交订单到支付平台取消返回后继续提交,会出现类似 magento DUPLICATE ENTRY ” FOR KEY ‘UNQ_SALES_FLAT_ORDER_INCREMENT_ID’ 解决办法 /app/code/core/Mage/Sales/Model/Resource/Quote.php
public function isOrderIncrementIdUsed($orderIncrementId)Line number 146 $bind = array (‘:increment_id’ => (int) $orderIncrementId); Replace it with below line $bind = array(‘:increment_id’ => $orderIncrementId);