2013年05月04日 灵犀一指 评论 1 条 阅读 947 人 次

magento的初始订单号码类似:1000001 大家怕这个订单号显得自己的网站是个新网站,所以很多人想改下magento的订单号码。

一般cpanel中都有phpmyadmin,使用phpmyadmin进入我们的数据库,修改表 eav_entity_store中的 increment_last_id 字段的值。这个字段存的是magento的最后一个订单的值,新订单会在此数值上累加。如上图。

如果需要修改订单号码前缀,例如订单改为: a10000667 则需要同时将 increment_prefix 修改为 a



Some time Store Admin wants to have different different prefixes for Order#, Invoice#, Credit Memo# and Shipment#. Say you want Order# to start with 1, Invoice# with 2, Credit Memo# with 3 and Shipment# with 4, for this please follow following steps (I’m assuming you’re making this change in a fresh store)

  • Place a test Order, if you’ve not placed any so far, then invoice, ship and create a credit memo for this order.
  • After performing above activities you’ll see four entries in ‘eav_entity_store’ table, one for each
  • To know which entity_type_id represents what please run query “SELECT * FROM `eav_entity_type` WHERE `entity_type_id` IN (4, 18, 24, 28)”. I tested this in Magento and found 4, 18, 24, 28 values in `eav_entity_type`.`entity_type_id` column. In your case these values may be different if you’re using different version. Well, in my case 4 represents ORDER, 18 represents INVOICE, 24 represents SHIPMENT and 28 represents CREDIT MEMO
  • Now after knowing which ‘entity_type_id’ representing what in ‘eav_entity_store’ table you need to edit ‘increment_prefix’ columns value as per your choice. By default values in this column will be 1 for all four records
  • After changing values for ‘increment_prefix’ column, please make sure you change prefix in ‘increment_last_id’ column as well. For example if you see ‘increment_last_id’ as 100000099 for entity Invoice and you have changed Invoice# prefix with 2 then change 100000099 with 200000099


1 条留言  访客:0 条  博主:0 条   引用: 1 条

来自外部的引用: 1 条

  • 修改Magento订单号码 | dclx wordpress