magento修改订单起始编号

做站群往往会遇到多个网站用同一个收款帐号,而magento订单号码是系统定义,如果不同网站有两个订单号相同而且都使用paypal付款,将无法支付,并提示:”订单已付款”
解决方法:

update eav_entity_store
inner join eav_entity_type
on eav_entity_type.entity_type_id = eav_entity_store.entity_type_id
set eav_entity_store.increment_last_id=(1), eav_entity_store.increment_prefix = (2)
where eav_entity_type.entity_type_code='order';

注:
(1).为起始编号,这里是8位数,如00000001.如果不满8位,系统会自动补充为8位.
(2).为订单号前缀,用以区分站点,表字段长度定义为varchar(20),这里长度自定.

原文地址:https://www.cnblogs.com/liuxgnu/p/3535474.html