Sunday, March 18, 2012

Magento修改订单编号


magento将各个站点的订单ID的前缀修改成不同的,而不是统一的都是从1000开头的那样。
修改Magento订单号的前缀
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 = 30000000
where eav_entity_type . entity_type_code = ‘order’ ;
这样,下一个订单号就会变成300000001。

表的关系:直接修改increment_prefix:用phpadmin进入到表eav_entity_type中,查看
entity_type_code的值为order的记录对应的entity_type_id对应的ID值,然后进入eav_entity_store表 修改entity_type_id的值为上面找到的那个ID的记录对应的increment_prefix。如果有注意可能就会发现不同的store view已经是使用了不同的前缀了。

1 comment:

  1. This particular film activity playing contains implementing a variety of changes -- it's not a new one press key cut event. This particular film activity playing has designed a new third-person/action encounter several, many individuals experience. Yes, this might seem to be uncommon, however it can be very cool!

    Buy WOW Gold  RS Gold  Buy Diablo 3 Gold

    ReplyDelete