Custom Order Number
Extension Installation
For Magento Marketplace Customers
-
Find the Composer name and version of the extension in the extension's composer.json file.
-
Login to your SSH and run:
- composer require mavenbird/customordernumberbase
- Wait for Composer to finish updating your project dependencies and make sure there aren't any errors.
-
To verify that the extension installed properly, run the command:
- php bin/magento module:status Mavenbird_CustomOrderNumber
- By default, the extension is probably disabled.
- Enable the extension and clear static view files:
- php bin/magento module:enable Mavenbird_CustomOrderNumber --clear-static-content
- php bin/magento setup:upgrade
- For Magento version 2.0.x to 2.1.x - php bin/magento setup:static-content:deploy
- For Magento version 2.2.x & above - php bin/magento setup:static-content:deploy --f
- php bin/magento cache:flush
For Mavenbird Customers
- Extract the zip folder and upload our extension to the root of your Magento 2 directory via FTP.
- Login to your SSH and run below commands step by step:
- php bin/magento setup:upgrade
- For Magento version 2.0.x to 2.1.x - php bin/magento setup:static-content:deploy
- For Magento version 2.2.x & above - php bin/magento setup:static-content:deploy --force
- php bin/magento cache:flush
Empower your Magento 2 store with the ability to customize order numbers according to your business requirements. Our Magento 2 Custom Order Number Base Extension allows you to set custom prefixes, suffixes, and increment steps for order numbers, enhancing the order management process for both merchants and customers.
- Set custom prefixes and suffixes to order numbers for easy identification and branding.
- Define the increment step for order numbers to avoid conflicts and maintain sequence.
- Preview the custom order number format before applying changes.
- Apply custom numbering to invoices, shipments, and credit memos as well.
Configuration
The Custom Order Number extension allows changing the numbers of your orders, invoices, credit memos and shipments using advanced and flexible templates. The extension can be configured in Store⟶ Configuration ⟶ MAVENBIRD EXTENSIONS ⟶ Custom Order Number.

Enable Extension:: This setting enables the order template for the new orders.
Number Format:: This field sets the order number template for the orders. You can add a custom text here and use the predefined variables:
{d} - it will display the date as one number. Example: if the date is June 5, this variable will display 5.
{dd} - it will display the date as 05 (from the previous example).
{m} - it will display the month as one number. Example: if the month is June, this variable will display 6.
{mm} - it will display the date as 06 (from the previous example).
{yy} - it will display the year. Example: if the year is 2019, this variable will display 19.
{yyyy} - it will display the date as 2019 (from the previous example).
{counter} - this variable displays the current value of the counter, which dynamically changes with each new order.
{storeID} - this variable displays the ID of the store view, where the order was placed.
{rndNumbers} - this variable generates a random number. Example: if you need to generate two digits number, you can use {rndNumbers2}, if you need to generate five digits number, you can use {rndNumbers5}.
{rndLetters} - this variable generates random letters. Example: if you need to generate two letters, you can use {rndLetters2}, if you need to generate five letters, you can use {rndLetters5}.
Start Counter From: This setting defines a starting value for the counter variable. If this setting is set to 5, the counter will start from 5.
Counter Increments Step: This setting defines a step for the counter variable. If this setting is set to 2 and the counter starts from 5, then the next counter value will be 7 (5 + 2).
Number Counter Padding: This setting defines the total number of digits of the {counter} variable. If you set this field to 6 and the counter is 20, the counter number displayed will be 000020.

Enable: This setting enables the invoice template for the new invoices.
Same as Order Template: This setting defines whether the order template should be applied to the invoices. If yes, you can specify the Invoice prefix and the Order part that should be replaced with it. If this setting is set to No, you can specify the separate template for the invoices.
Prefix: This setting defines the invoice prefix that will replace the order part, specified in the next setting.
Part of the order number to replace with the prefix: This setting defines the order part, which should be replaced with the invoice prefix. Example: If you have the order number as 'ORD', you can replace the 'ORD' part with the prefix instead of adding it in the beginning.

Enable: This setting enables the shipment template for the new shipments.
Same as Order Template: This setting defines whether the order template should be applied to the shipments. If yes, you can specify the Shipment prefix and the Order part that should be replaced with it. If this setting is set to No, you can specify the separate template for the shipments.
Prefix: This setting defines the shipment prefix that will replace the order part, specified in the next setting.
Part of the order number to replace with the prefix: This setting defines the order part, which should be replaced with the shipments prefix. Example: If you have the order number as 'ORD', you can replace the 'ORD' part with the prefix instead of adding it in the beginning.

Enable: This setting enables the credit memo template for the credit memos.
Same as Order Template: This setting defines whether the order template should be applied to the credit memos. If yes, you can specify the credit memo prefix and the Order part that should be replaced with it. If this setting is set to No, you can specify the separate template for the credit memos.
Prefix: This setting defines the credit memo prefix that will replace the order part, specified in the next setting.
Part of the order number to replace with the prefix: This setting defines the order part, which should be replaced with the credit memo prefix. Example: If you have the order number as 'ORD', you can replace the 'ORD' part with the prefix instead of adding it in the beginning.
Complete Order Page on Frontend

Sales order grid on admin

Sales order view on invoice

Sales order view on shipment

Sales order view on credit memo
