有没有办法在不更改已存在的订单号的情况下更改Magento中的订单起始编号?我只想为所有新订单设置170000xxxx。
由于
答案 0 :(得分:31)
查看eav_entity_store
并找到increment_last_id
。更新此号码,确保订单entity_type_id
正确无误。
查找订单的entity_type_id
SELECT entity_type_id FROM eav_entity_type WHERE entity_type_code = 'order';
答案 1 :(得分:5)
最简单的解决方案是使用Ashley Schroder's "Set Custom Order Number"扩展名。此扩展一旦安装,就可以通过后端将下一个订单号更改为一个简单的操作。
无论使用何种方法,请确保您的新订单号序列不包含现有订单,否则会发生不良事件(数据库中的唯一约束不满足,Magento崩溃)。
答案 2 :(得分:3)
Sankar几乎是正确的
UPDATE `database`.`eav_entity_store` SET `increment_last_id` = '17000000' WHERE `entity_store_id` = 1;
答案 3 :(得分:1)
UPDATE `eav_entity_store` SET `increment_last_id` = '30000000' WHERE `entity_type_id` = STOREID;`
STOREID - >您正在使用的商店ID。