Skip to content

Custom Order Numbers

Introduction

The Custom Order Numbers extension lets you to expand the native numbering scheme of Magento 2 through order length editing, custom prefixes, increment prefixes, and starting numbers. With this under control, you’ll protect valuable business data from being publicly available, indicate the kind of documentation (order, invoice, shipment or credit memo), make order number digits more customer-friendly, and so much more.

Requirements and Installation

Gift Cards supports both Community (Open Source) and Enterprise (Commerce) edition of Magento starting from version 2.2. The current version of the Magento installed on your website can be found in the lower right corner of any backend page.

Magento 2 Version

SEO Suite Ultimate has 3 separate ways of installation:

1) Copy the code (ready-to-paste package);
2) Use MageWorx Repository.
3) Use local Composer;

Extension Configuration.

The Custom Order Number extension allows change the numbers of your orders, invoices, credit memos and shipments using advanced and flexible templates. The extension can be configured in System ⟶ Configuration ⟶ MageWorx - Custom Order Number.

Please note that the extension doesn't change the numbers of the existing orders, only new orders will be affected.

Order Template

In order to customize the number template for the orders, please go to the Custom Order Number section.

Magento 2 Version

  • Enable - 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 is 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.

Invoice Template

  • 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.

Shipment Template

  • 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.

Credit Memo Template

  • 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.

Got Questions?

Need help with the extensions? Feel free submit a ticket from https://www.mageworx.com/support/ 



Mageworx offers outstanding services developing custom-tailored solutions for Magento platform to attain your eCommerce objectives. Our professional impassioned team provides profound and custom oriented development of your project in a short timeframe.