2022-08-30 10:10:53 - 米境通跨境電商
magento的初始訂單號(hào)碼類似:1000001大家怕這個(gè)訂單號(hào)顯得自己的網(wǎng)站是個(gè)新網(wǎng)站,所以很多人想改下magento的訂單號(hào)碼。
一般cpanel中都有phpmyadmin,使用phpmyadmin進(jìn)入我們的數(shù)據(jù)庫(kù),修改表eav_entity_store中的increment_last_id字段的值。這個(gè)字段存的是magento的最后一個(gè)訂單的值,新訂單會(huì)在此數(shù)值上累加。如上圖。
如果需要修改訂單號(hào)碼前綴,例如訂單改為:a10000667則需要同時(shí)將increment_prefix修改為a
注意:你網(wǎng)站首先要有訂單,才能用這個(gè)方法改訂單號(hào)碼,沒有訂單,自己去下個(gè)訂單再來改。
如果你有多店鋪,請(qǐng)修改相應(yīng)店鋪的訂單號(hào)碼。
以上文字翻譯自:
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