2022-09-14 10:48:33 - 米境通跨境電商
magento的初始訂單號碼類似:1000001大家怕這個訂單號顯得自己的網(wǎng)站是個新網(wǎng)站,所以很多人想改下magento的訂單號碼。
一般cpanel中都有phpmyadmin,使用phpmyadmin進(jìn)入我們的數(shù)據(jù)庫,修改表eav_entity_store中的increment_last_id字段的值。這個字段存的是magento的最后一個訂單的值,新訂單會在此數(shù)值上累加。如上圖。
如果需要修改訂單號碼前綴,例如訂單改為:a10000667則需要同時將increment_prefix修改為a
注意:你網(wǎng)站首先要有訂單,才能用這個方法改訂單號碼,沒有訂單,自己去下個訂單再來改。
如果你有多店鋪,請修改相應(yīng)店鋪的訂單號碼。
以上文字翻譯自:
SometimeStoreAdminwantstohavedifferentdifferentprefixesforOrder#,Invoice#,CreditMemo#andShipment#.SayyouwantOrder#tostartwith1,Invoice#with2,CreditMemo#with3andShipment#with4,forthispleasefollowfollowingsteps(I’massumingyou’remakingthischangeinafreshstore)
PlaceatestOrder,ifyou’venotplacedanysofar,theninvoice,shipandcreateacreditmemoforthisorder.
Afterperformingaboveactivitiesyou’llseefourentriesin‘eav_entity_store’table,oneforeach
Toknowwhichentity_type_idrepresentswhatpleaserunquery“SELECT*FROM'eav_entity_type'WHERE'entity_type_id'IN(4,18,24,28)”.ItestedthisinMagento1.6.2.0andfound4,18,24,28valuesin'eav_entity_type'.'entity_type_id'column.Inyourcasethesevaluesmaybedifferentifyou’reusingdifferentversion.Well,inmycase4representsORDER,18representsINVOICE,24representsSHIPMENTand28representsCREDITMEMO
Nowafterknowingwhich‘entity_type_id’representingwhatin‘eav_entity_store’tableyouneedtoedit‘increment_prefix’columnsvalueasperyourchoice.Bydefaultvaluesinthiscolumnwillbe1forallfourrecords
Afterchangingvaluesfor‘increment_prefix’column,pleasemakesureyouchangeprefixin‘increment_last_id’columnaswell.Forexampleifyousee‘increment_last_id’as100000099forentityInvoiceandyouhavechangedInvoice#prefixwith2thenchange100000099with200000099