configuration - Custom Start Number for Order Numbers in Magento 1.5 -


how customise starting number orders, invoices etc in magento 1.5?


magento's forum:

there table in database stored increment id of order. called “eav_entity_store” table. can check entity type id belongs entity looking @  eav_entity_type table. can run following query update last increment id order.      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=3001      eav_entity_type.entity_type_code='order';

with tool phpmyadmin @ database. in table  eav_entity_type find entity types listed. 1 of interest  change order number starts order sales/order. remember  entity_type_id (in install 11). remove leading zeros  (padding) set increment_pad_length 1.

next go table eav_entity_store. entity_type_id. can change value of increment_prefix , increment_last_id. if wanted have next orderid 15000 set increment_last_id 14999 , increment_prefix 0.

additionally need make copy of file /app/code/core/mage/eav/model/entity/increment/abstract.php /app/code/local/mage/eav/model/entity/increment/abstract.php public function getpadlength() { $padlength = $this->getdata('pad_length'); if (empty($padlength)) { $padlength = 0; } return $padlength; } ... public function format($id) { $result= str_pad((string)$id, $this->getpadlength(), $this->getpadchar(), str_pad_left); return $result; }

hope helps


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -