Custom Order Number for Magento 2

Daily deals

Introduction

The extension allows to fully customize order, invoice, shipment and credit memo numbers using any combination of letters, numbers, dates and more

Installation

The extension has 2 separate ways of installation, via Composer or by copying the code.

Please follow this Installation Guide to install the extension.

Extension Configuration

Configuration Settings

To access the configuration settings, log into the Magento Admin panel and go to STORES ⟶ Configuration ⟶ ULMOD EXTENSIONS ⟶ Custom Order Number.

The module’s configuration containsthe five sections: General, Order, Invoice Shipping and Credit Meno

General

In this section the following settings are available :

Enabled - allows enabling or disabling the extension in the storefront

Order

The following settings are available in the Order section :

Pattern (Order Number Format) -  defines the order's number format to replace the numbers generated by default Magento 2 functionality. Eg "ORD-{yy}-{mm}-{dd}-{counter}". You can use variables {counter}, {store}, {yyyy}, {yy}, {m}, {mm}, {d}, {dd}, {rand}, {order_id}. If you type ORD-{yy}-{mm}-{dd}-{counter} in the field, you will have order numbers of the kind: ORD-18-12-26-00000022 ;

Counter Start From -  enter the starting number of your order. E.g. If you enter 125, the counter will start from 125.

Reset Counter -  select the time period to automatically reset the counter. Three options available: "Yes, Daily", "Yes, Monthly", "Yes, Yearly" or set to "No" to do not auto-reset the counter

Reset Counter Now -  If you really need to reset now, tick this checkbox and click the "Save" button to reset the current counter value immediately to the starting number

Increment Step - set the increment used for generating consecutive order numbers. E.g. If the last order number is 000125, and you set "Counter Increment Step" to 4, the next order number will be 000129

Increment Padding Length - enter the total number of digits in the order number. E.g. If the order id is 125 and you set the "Counter Padding" to 8, the result will be 00000125. Set to 0 (zero) not to add leading zeros.

Invoice

The following settings are available in the Invoice section :

Same as Order Number -  If "No", you can configure the invoice number.

Pattern (Invoice Number Format) -  defines the invoice's number format to replace the numbers generated by default Magento 2 functionality. Eg "INV-{yy}-{mm}-{dd}-{counter}".
You can use variables {counter}, {store}, {yyyy}, {yy}, {m}, {mm}, {d}, {dd}, {rand}, {order_id}. If you type INV-{yy}-{mm}-{dd}-{counter} in the field, you will have invoice numbers of the kind: INV-18-12-26-00000022 ;

Counter Start From -  enter the starting number of your invoice. E.g. If you enter 125, the counter will start from 125.

Reset Counter -  select the time period to automatically reset the counter. Three options available: "Yes, Daily", "Yes, Monthly", "Yes, Yearly" or set to "No" to do not auto-reset the counter

Reset Counter Now -  If you really need to reset now, tick this checkbox and click the "Save" button to reset the current counter value immediately to the starting number

Increment Step - set the increment used for generating consecutive invoice numbers. E.g. If the last invoice number is 000125, and you set "Counter Increment Step" to 4, the next invoice number will be 000129

Increment Padding Length - enter the total number of digits in the invoice number. E.g. If the invoice id is 125 and you set the "Counter Padding" to 8, the result will be 00000125. Set to 0 (zero) not to add leading zeros.

If Same as Order Number -  field is set to "Yes", the invoice number will use the order number the invoice belongs to.

In the Replace -  field, enter the part of the order number to replace. Eg. if you have order number as ORD-{yy}-{mm}-{dd}-{counter} , and that you want to replace ORD just enter ORD in this field.

In the With -  field, enter what to replace in the order number. Eg. If you enter INV in this field, the invoice number will be as follow INV-{yy}-{mm}-{dd}-{counter}

Shipping

The following settings are available in the Shipping section :

Same as Order Number -  If "No", you can configure the shipping number.

Pattern (Shipping Number Format) -  defines the shipping's number format to replace the numbers generated by default Magento 2 functionality. Eg "SHIP-{yy}-{mm}-{dd}-{counter}".
You can use variables {counter}, {store}, {yyyy}, {yy}, {m}, {mm}, {d}, {dd}, {rand}, {order_id}. If you type SHIP-{yy}-{mm}-{dd}-{counter} in the field, you will have shipping numbers of the kind: INV-18-12-26-00000022 ;

Counter Start From -  enter the starting number of your shipping. E.g. If you enter 125, the counter will start from 125.

Reset Counter -  select the time period to automatically reset the counter. Three options available: "Yes, Daily", "Yes, Monthly", "Yes, Yearly" or set to "No" to do not auto-reset the counter

Reset Counter Now -  If you really need to reset now, tick this checkbox and click the "Save" button to reset the current counter value immediately to the starting number

Increment Step - set the increment used for generating consecutive shipping numbers. E.g. If the last shipping number is 000125, and you set "Counter Increment Step" to 4, the next shipping number will be 000129

Increment Padding Length - enter the total number of digits in the shipping number. E.g. If the shipping id is 125 and you set the "Counter Padding" to 8, the result will be 00000125. Set to 0 (zero) not to add leading zeros.

If Same as Order Number -  field is set to "Yes", the shipping number will use the order number.

In the Replace -  field, enter the part of the order number to replace. Eg. if you have order number as ORD-{yy}-{mm}-{dd}-{counter} , and that you want to replace ORD just enter ORD in this field.

In the With -  field, enter what to replace in the order number. Eg. If you enter SHI in this field, the shipping number will be as follow SHI {yy}-{mm}-{dd}-{counter}

Credit Meno

The following settings are available in the Credit Meno section :

Same as Order Number -  If "No", you can configure the credit meno number.

Pattern (Credit Meno Number Format) -  defines the credit meno's number format to replace the numbers generated by default Magento 2 functionality. Eg "MENO-{yy}-{mm}-{dd}-{counter}".
You can use variables {counter}, {store}, {yyyy}, {yy}, {m}, {mm}, {d}, {dd}, {rand}, {order_id}. If you type MENO-{yy}-{mm}-{dd}-{counter} in the field, you will have credit meno numbers of the kind: INV-18-12-26-00000022 ;

Counter Start From -  enter the starting number of your credit meno. E.g. If you enter 125, the counter will start from 125.

Reset Counter -  select the time period to automatically reset the counter. Three options available: "Yes, Daily", "Yes, Monthly", "Yes, Yearly" or set to "No" to do not auto-reset the counter

Reset Counter Now -  If you really need to reset now, tick this checkbox and click the "Save" button to reset the current counter value immediately to the starting number

Increment Step - set the increment used for generating consecutive credit memo numbers. E.g. If the last credit memo number is 000125, and you set "Counter Increment Step" to 4, the next credit memo number will be 000129

Increment Padding Length - enter the total number of digits in the credit meno number. E.g. If the credit memo id is 125 and you set the "Counter Padding" to 8, the result will be 00000125. Set to 0 (zero) not to add leading zeros.

If Same as Order Number -  field is set to "Yes", the credit meno number will use the order number

In the Replace -  field, enter the part of the order number to replace. Eg. if you have order number as ORD-{yy}-{mm}-{dd}-{counter} , and that you want to replace ORD just enter ORD in this field.

In the With -  field, enter what to replace in the order number. Eg. If you enter CRE in this field, the credit meno number will be as follow CRE {yy}-{mm}-{dd}-{counter}

Separate Counter per Website and Store view

You can set a separate counter per each website and store view. To do this please switch between websites and store view to set the right counter for each site.

Please, switch between websites, the Separate Counter per Website -  field appears just before "Reset Counter Now". Set "Yes" to use an individual counter or numbering per website, or "No" to disable this functionality

You can also switch between store view, theSeparate Counter per Store View -  field appears just before "Reset Counter Now". You can set "Yes" to use an individual counter or numbering per store view

Pattern Variables

The following variables are supported for the pattern field of Order Number, Invoice Number, Shipment Number or Credit Memo Number:

  • {d} for short day display;
  • {dd} for full day display;
  • {m} for short month display;
  • {mm} for full month display;
  • {yyyy} for full year display;
  • {yy} for shortened year display;
  • {store} for store name;
  • {country_code} for a country code display.

Admin View

Custom order number at the admin grid

Custom order number at the admin order view page

Custom invoice number at the order view page

Custom shipping number at the order view page

Custom credit meno number at the order view page

Frontend View

Customer order number displaying at the customer account

Extension Support

Need Help?

Ulmod Support team is always ready to assist you, no matter which part of the world you are in. If something does happen and you think you might be experiencing an issue or bug, please contact us via [email protected] or submit a ticket from our Helpdesk Ticket and we will help you out.

Got Questions?

Should you have any questions or feature suggestions, please Contact Us. Your feedback is welcome!

Extension Product Page