Change the Length of Order Number in Magento

July 19th, 2012 by jitendra | 1 comment

Normally magento generates 9 digits order number by default. If you need to reduce it, use following method.   Go to your magento database and make changes in  ’eav_entity_type’ and ‘eav_entity_store’  tables.

As an example if you want to use 3 digits number and starting number is 110, then you have to put 2 as  ’increment_pad_length’.

Please run following two queries:

view plaincopy to clipboardprint?

  1. UPDATE `eav_entity_type` SET `increment_pad_length` = 2 WHERE `entity_type_code` = ‘order’ LIMIT 1;
  2. UPDATE `eav_entity_store` SET `increment_last_id` = ’109′ WHERE `entity_store_id` = 1 LIMIT 1;

The Author

Jitendra Kumar is a Sr. Software developer, an author and recreational software developer specializing in web standards. He has extensive knowledge of Core PHP, PHP Framworks, e-commerce tools, social media sites, gaming, networking and front-end development (JavaScript, Jquery, Ajax, HTML & CSS). If you’d like to connect with him, follow him on : @Twitter.

 

You can subscribe to PHPZAG.COM posts by Email

 

Related Topics:

 

 

  1. Saha
    July 20th, 2012 at 13:33 | #1

    You saved my life. Really a nice article…

  1. No trackbacks yet.