Magento : how to set the same order increment id for all stores

Hello Magento people,

Magento in default sets different order increment id for each of you magento store or store views.
Here is simple fix to set the same order increment id for all your store.
Run the following code once from anywhere within your site.

Mage::getModel(‘eav/entity_type’)
->loadByCode(‘order’)
->setIncrementPerStore(false)
->save();

For eg.paste it in any catalog/product/list.phtml template file. Then open up the category listing page in the browser to run the code.
Once done, you can remove the code from list.phtml.
Now if you place new orders from any store, all of them will follow the same order increment id.
Moreover if you want to set the initial starting increment id like 200000001
open up your magento site database and goto table named “eav_entity_store”

Find the row which has value of store_id = 0,
edit the row and set increment_prefix to the initial prefix that you want your order number to have for eg.2
and on the “increment_last_id” field, enter the new increment id that you want your new orders to start from.

Thank you for reading..

Advertisements

5 thoughts on “Magento : how to set the same order increment id for all stores

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s