How to Change the Order Number in Magento

Topics focus on Web Developments, Programming, Database, Digital Marketing Tutorials, Code Snippets, SEO, Social Media Marketing and Inspirational articles.

How to Change the Order Number in Magento 1

How to Change the Order Number in Magento

Here, we have written article for How to Change the Order Number in Magento.

When moving to Magento, some people might want to change the default order number 000000001 to some other number – either fooling the customer into thinking this is a very popular shop, or when migrating from another webshop to Magento. Here’s how to change that order number.

MySQL table eav_entity_store

New order numbers are determined by a value called the increment_id, and this increment_id is stored in the database table eav_entity_store. You should login to the MySQL database using a program like phpMyAdmin, and then you will be able to edit the contents of this table.

If the database table is empty, this means that the system has not created any orders yet. Instead of trying to hack the database, it’s best to create a fake order. To create a fake order you will also need to create a customer and a product, so it’s probably best to perform this task just before you’re going live with your shop.

Changing which increment_id?

Once you have completed orders, the table eav_entity_store will contain various records, and every record contains a different increment_id. The logic here is that increment_ids are used by various Magento entities, like orders and customers. In a default situation the record for customers has an entity_type_id of 2, while orders have an entity_type_id of 11. So to change the order number for orders, you will need to edit the row with entity_type_id 11.

If you really want to know the IDs used for the different entities in the Magento database, take a look in the database table eav_entity_type, which lists various parts of an entity (like underlying PHP-classes and other MySQL tables).

What can you do with the Order Number?

We recommend not changing the length of the order number, nor the starting number of the increment_id (which should be the same as the increment_prefix) in the same table. But you can easily change some of the zeroes into other numbers.

Note that this will not change any data already stored in the database.

One comment

Add comment


Pin It on Pinterest

Share This