User Tools

Site Tools


Sidebar

magento_2:custom_order_number

For more details see how the Custom Order Number extension works.

Guide for Custom Order Number for Magento 2

Implement diverse store documents numbering using prefixes and custom starting numbers. Provide unique order and other related documents numbers to protect business data and motivate customer to purchase more.

  • Use custom order numbers for order related documentation
  • Add prefixes and postfixes to modify order numbering
  • Fit your numbering policy to local jurisdiction requirements
  • Hide important business data in the customer area with the help of increment intervals

General Extension Settings

To configure the extension please go to Store → Configuration → Amasty Extensions → Order Number and expand the General section.

Enabled — enable or disable the extension;

Timezone offset — modify this option to change the default Magento 2 timezone in your order related documents.

Use Separate Connection For Counter Generation - Set 'Yes' to use separate connections for the counter generation.

Order Data Configuration

To configure order numbering expand the Order section.

Number Format — specify order's number format which will replace the numbers generated by default Magento functionality;

Start Counter From — set the starting numbers for your orders. Say, you have 1349 orders in your store and open a new Magento 2 store. In this case, you can start counter from 1350;

Counter Increment Step — regulates number intervals between consecutive orders. For example, in our user guide, we set Start Counter From 1350 and Counter Step is 5, it means, that the next order will have the number — 1355;

Counter Padding — sets the number of digits in order numbers. In case you need all order numbers to have 7 symbols, set padding equal to 7. Now, your order number will have the following view — 0000265;

This option is applied to the {counter} variable only. If you don’t use this variable in the Number Format field, counter padding won’t be displayed.

Reset Counter on Date Change — set the time period to automatically reset counter;

Reset Order Counter — hit the 'Reset' button to reset the counter immediately.

Invoice Data Configuration

To configure invoice data expand the Invoice section.

Same as Order Number — choose Yes to set the same numbers for invoices and orders to meet your local record-keeping standards. Or choose No to configure the independent numbering policy for invoices. The options will be the same as for Order section;

Prefix — specify letter prefixes according to the type of document for which you modify the numbering model;

Part of the order number to replace with the prefix — fill in the static part of the order number to be replaced with the prefix.

Reset Invoice Counter — hit the 'Reset' button to reset the counter immediately.

Shipping Data Configuration

To configure shipping data expand the Shipping section.

Same as Order Number — choose Yes to set the same numbers for shipping and orders to meet your local record-keeping standards. Or choose No to configure the independent numbering policy for shipping. The options will be the same as for Order section;

Number Format — specify order's number format which will replace the numbers generated by default Magento functionality;

Start Counter From — set the starting numbers for your orders. Say, you have 1349 orders in your store and open a new Magento 2 store. In this case, you can start counter from 1350;

Counter Increment Step — regulates number intervals between consecutive orders. For example, in our user guide, we set Start Counter From 1350 and Counter Step is 5, it means, that the next order will have the number — 1355;

Counter Padding - Total number of digits in the order number. If the order id is 24 and padding is 6, the result will be 000024. Set to 0 (zero) not to add leading zeros.

Reset Counter on Date Change — set the time period to automatically reset counter;

Reset Shipping Counter — hit the 'Reset' button to reset the counter immediately.

Credit Memo Data Configuration

To configure credit memo data expand the Credit Memo section.

Same as Order Number — choose Yes to set the same numbers for credit memos and orders to meet your local record-keeping standards. Or choose No to configure the independent numbering policy for credit memos. The options will be the same as for Order section;

Prefix — specify letter prefixes according to the type of document for which you modify the numbering model;

Part of the order number to replace with the prefix — fill in the static part of the order number to be replaced with the prefix.

Reset Shipping Counter — hit the 'Reset' button to reset the counter immediately.

Individual Numbering per Website

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

Allowed Variables

To make your business documents numbers unique you can use different variables. Please check this list to find the required ones:

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

If you type ORD-{yy}-{mm}-{dd}-{counter} in the field, you will have order numbers of the kind: ORD-13-08-15-000077. When you use a {country_code} variable, a country from the shipping address will be used for generating the country code.


Find out how to install the Custom Order Number extension via Composer.

Rate the user guide
 stars  from 3 votes (Details)
magento_2/custom_order_number.txt · Last modified: 2023/02/09 14:29 by kkondrateva