3

当客户在 Magento 的结帐过程中并被重定向到他的后台网站以完成付款时。如果他们取消付款并被重定向回magento商店,则无法再下订单,我收到此错误电子邮件:

SQLSTATE [23000]:完整性约束违规:1062 键“UNQ_SALES_FLAT_ORDER_INCREMENT_ID”的重复条目“MF00000007”,查询为:INSERT INTO sales_flat_order( coupon_code, protect_code, shipping_description, is_virtual, store_id, customer_id, base_discount_amount, base_grand_total, base_shipping_amount, base_shipping_tax_amount, base_subtotal, base_tax_amount, base_to_global_rate, base_to_order_rate, discount_amount, grand_total, shipping_amount, shipping_tax_amount, store_to_base_rate, store_to_order_rate, subtotal, tax_amount, , , , , , , , , , , , , , , , , , , , , , ,total_qty_orderedcustomer_is_guestcustomer_note_notifycustomer_group_idquote_idbase_shipping_discount_amountbase_subtotal_incl_taxshipping_discount_amountsubtotal_incl_taxweightcustomer_dobincrement_idapplied_rule_idsbase_currency_codecustomer_emailcustomer_firstnamecustomer_lastnamecustomer_middlenamecustomer_prefixcustomer_suffixcustomer_taxvatdiscount_descriptionglobal_currency_codeorder_currency_code, remote_ip, shipping_method, store_currency_code, store_name, x_forwarded_for, customer_note, created_at, updated_at, total_item_count, customer_gender, hidden_tax_amount, base_hidden_tax_amount, shipping_hidden_tax_amount, base_shipping_hidden_tax_amnt, shipping_incl_tax, base_shipping_incl_tax, gift_message_id) 值 (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, '2016-02-11 15:39:09', '2016-02-11 15:39:09', ?, ?, ?, ?, ?, ?, ?, ?, ?)

有人可以帮我解决这个问题吗,我们还有另一个客户也遇到了同样的问题...

最好的问候,罗伯特

4

1 回答 1

2

将文件复制app/code/core/Mage/Sales/Model/Resource/Quote.phpapp/code/local/Mage/Sales/Model/Resource/Quote.php (或创建自定义模块以覆盖此类)。

寻找:

$bind = array(':increment_id' => (int)$orderIncrementId);

并将其替换为:

$bind = array(':increment_id' => $orderIncrementId);
于 2016-02-12T07:55:07.183 回答