How to add a prefix to the order number in Magento 2?

The default Magento has limited functionality in terms of the order prefixes. To solve the issue with adding prefixes to the order number, you can use our Custom Order Number extension.

To do this, follow these steps:

Step 1. First of all, complete the General Configuration of the module by going to Store > Configuration > Amasty Extensions > Order Number and expanding the General section.

Step 2. Then configure the following fields:

  • Choose Yes in the Enabled section to enable the extension.
  • Set the Timezone offset to modify the default Magento 2 timezone in the order related documents.
  • Choose Yes in the Use Separate Connection For Counter Generation section to enable using distinct connections for the counter generation.

Step 3. After completing the General Configuration, you need to go to the Invoice Data Configuration section to add a prefix to the order number.
Step 4. There are 4 fields in this section that you need to configure:

  • Set Yes option in the Same as Order Number section to set the same invoice and order numbers to match your local accounting standards.
  • A prefix is specified according to the type of chosen document in the eponymous section.
  • You need to fill in the Part of the order number to replace with the prefix section to specify the replaced by prefix part of the order.
  • Click the Reset button in the Reset Invoice section to reset the counter.

Done. You’ve added the prefix. But it's not the only function of this extension. It has the functionality to customize the order number by  adding prefixes and postfixes  to it. With its help, you can improve the privateness of your business by hiding real order numbers from competitors, and keeping them  for internal use only.

How can we help you?

Didn’t you find the answer to your question? We are always happy to help you out.

© 2009-2024 Amasty. All Rights Reserved.