关于Mogento 填写运单号后,出现无法保存运送方式“Cannot save shipment.”

由于项目的需要,更换新服务器后出现后台订单填写运单号后无法保存的问题:

找到其他人的相关分析:
After googling the exception log messages and error codes, I found an issue on StackOverflow which was pretty similar. I write it down here since it’s not 100 % the same in my case.

Admin > Sales > Orders: Look up the highest order number (for each store view) and write it down. e.g. 100000054, which means that there are 54 placed orders in the system.
Admin > System > Manage Stores: Hover your mouse over your Store View Names to see their ID:s. Write them down. e.g. ID for Store View English is usually 1.
Open your database in phpMyAdmin or your preferred db admin tool.
Open the table eav_entity_type which tells you what is the id number for different entities. Now we are interested in rows with entity_type_code is order and shipment (and maybe also invoice and creditmemo, if your problem is related to those. My problem was about shipping). Write down the entity_type_id values of those rows. In my case they were 5for order and 8for shipment.
Open the table eav_entity_store. Look for rows that match the entity_type_ids of order and shipment AND also match your Store View ID:s. Now you can change the value of increment_last_id to your last actual order number. Since my store isn’t open yet, I played it safe and gave a value much bigger for both order and shipment related rows. e.g. if the increment_last_ids were 100000053 for orders and 100000040 for shipments, I gave them both the same new value 100000100 to start over from a clean table. N.B. In my case there was no a row with my local store view and correct shipment entity_type_id. So I copied the row of store view id 1, gave it new values (store id -> 4 and also increment_prefix to match store_id -> 4, and of course increment_last_id -> 400000100) and saved it as a new row in the table.
And that’s it. I’ve now placed a few test orders and everything seems to work. I was also able to ship some older test orders that were lagging behind in Processing mode. That resulted in the fact that order ID:s and shipment ID:s aren’t running side-by-side, but they wouldn’t do that for long anyway so it’s not a problem.

进入数据库,打开eav_entity_store表-更改对应的entity_type_id后面的increment_last_id 给大点的新值,让它能够重新开始;

参考:https://magento.stackexchange.com/questions/31262/cannot-save-shipment-error-with-non-sample-orders-1062-duplicate-entry-for

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值