When setting up a new shop in Magento the default order number, invoice number, packing number and credit note number is always 100000001. Most people want to change this to some other number so it doesn’t look like they just started out with their website.

Table-eav_entity_storeUnfortunately it is not possible to change this from the Magento backend so we have to change it directly in the database using phpMyAdmin or a similar tool.

 

Database-linksThe order numbers are stored in the table “eav_entity_store”.

  • “entity_store_id” is the unique ID for every row.
  • “entity_type_id” is the type of document, linked to table “eav_entity_type”.
  • “store_id” is the shop for which you will change the numbers, linked to table “core_store” which is linked to table “core_website”.
  • “increment_prefix” is the is the first digit of the number, this should change for every store so you will not have duplicate document numbers.
  • increment_last_id” is the number we will be changing, this is the number customers will see in email, invoices and so on.

Once you have found the correct “increment_last_id” change it and save the table. Now you have custom order numbers in your store:

Table-eav_entity_store-final