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

来源:互联网 发布:4g网络下载慢什么原因 编辑:程序博客网 时间:2024/05/03 01:08

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

找到其他人的相关分析:
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

阅读全文
0 0