Set up in the Magento backend

You will find all configuration settings for this extension under Stores > Configuration > Fooman Order Number Customiser

Each sales document type (order, invoice, shipment and creditmemo) needs to be individually enabled and configured.

Order/Invoice/Shipment/Credit Memo Settings

Individually configure custom order, invoice, shipment and credit memo numbers using these settings. After making any changes, press “save configuration” to preview your chosen order number.

Choose to differentiate settings (for example, by using prefixes for easy document identification), or to simply keep the same settings for all document types.

Enabled (1.0.0+)

Select “Yes” to activate Fooman Order Number Customiser functionality for this document type.

Shared Sequence with Invoice (4.0.0+) - Credit Memo Setting Only

When enabled, the credit memo and invoice number are assigned a number from the same sequence. For example:

  • Invoice 0001
  • Invoice 0002
  • Credit 0003
  • Invoice 0004

Format (1.0.0+) - Configure individually for Order/Invoice/Shipment/Credit Memo types

Enter a name for the Order/Invoice/Shipment/Credit Memo, using any combination of freetext, numbers and {} commands.

The following {} commands can be used:

{ID}

Automatic sequential numbering command. This command will be auto-replaced by a sequential number determined by the following settings: Increment Pad Length, Increment Step, Start From

  • Example: FOO-{ID} becomes FOO-06501 

{ORDERID}

Same order number command (can be used for the Invoice, Shipment and Credit Memo settings only). This command will use the order number as the number for all invoices, shipments and/or credit memos associated with the same order (e.g. for order #1000, the associated invoice would be #1000, the shipment #1000, and the credit memo also #1000)

  • Example: Invoice-{ORDERID} becomes Invoice-0001 (where 0001 is the associated order number)

{ORDERNUM}

Same order number only command (can be used for the Invoice, Shipment and Credit Memo settings only). This command will use the digits only from order number as the number for all invoices, shipments and/or credit memos associated with the same order (e.g. for order #1000, the associated invoice would be #1000, the shipment #1000, and the credit memo also #1000)

  • Example: Invoice-{ORDERNUM} becomes Invoice-0001 (where Order-0001 is the associated order number)

{DATE}

This command will be auto-replaced by the order date/time, in the following default format: d-F-Y-H:i (30-October-2012-15:40)

  • Example: FOO-{DATE} becomes FOO-30-October-2012-15:40

{DATE:**}

This command will be auto-replaced by the order date/time in a custom format. Replace ** with any combination of the following:

D – day in short form (eg. Fri) d – day in digits (eg. 30)

M – month in short form (eg. Jan, Feb...) m – month in double digit numbers (eg. 01, 02...) n – month in single digit numbers (eg. 1, 2...11, 12)

F – month written in full (eg. January, February...)

Y – year in four digits (eg. 2012)

y – year in double digits (eg. 12)

H – hour in 24 hour clock (eg. 15)

i – minute in digits (eg. 10)

S – second in digits (eg. 25)

/ : - . may all be used as separators

  • Example 1: FOO-{ID}-{DATE:Y/M/d} becomes FOO-06501-2012/10/30
  • Example 2: FOO-{ID}-{DATE:F:Y} becomes FOO-06501-October:2012

{STOREID}

This command will be auto-replaced by the store’s id the order was placed in

  • Example: {STOREID}-{ID} becomes 1-06501

{STORECODE} (v2.2.0+)

This command will be auto-replaced by the store’s code (uppercase) the order was placed in

  • Example: {STORECODE}-{ID} becomes DEFAULT-06502 

{WEBSITECODE} (v2.2.0+)

This command will be auto-replaced by the website’s code (uppercased) the order was placed in

  • Example:{WEBSITECODE}-{ID} becomes NZ-06503

{WEBSITEID} (v6.0.4+)

This command will be auto-replaced by the website's id the order was placed in


{COUNTRY} (v6.0.4+)

This command will be replaced with the country code of the billing address used for the order.  This placeholder is currently not available in previews.


{DUP} (v3.0.0+)

Duplicate Identifier Commands

Magento requires each order number to be unique. In the event of duplicate order numbers (such as those based around a date, without any further sequential number), a duplicate separator and unique sequential number will be automatically added. The placeholder {DUP} will get replaced with a counter starting from 1. If no placeholder is provided a counter will be added when the first duplicate occurs.

  • Example: ORD-{DATE:Ymd}-{DUP} becomes ORD-20230510-0001, ORD-20230510-0002
  • Example: ORD-{DATE:Ymd} becomes ORD-20230510, ORD-20230510-0001

Duplicate Separator (1.0.0+)

Enter a character to use as a duplicate separator (eg. / : -)

If no character is entered and a duplicate separator is required, the default character used is -.

Padding Length (1.0.0+)

Enter the minimum number of additional zeros assigned to the duplicate identifier as “padding”. For example:

  • 1 = 1
  • 2 = 01
  • 6 = 000001

Differentiating Document Types

Individual documents may be customised through using different prefixes or any other desired identifier, for example (but not limited to): ORDER for order, INVOICE for invoice, etc

Increment Pad Length (1.0.0+)

This refers to the minimum number of additional zeros assigned to each order number as “padding”, until the order number becomes higher than the chosen increment pad length. For example:

  • 3 = 001, 012, 123, 1234, 12345, 123456
  • 4 = 0001, 0012, 0123, 1234, 12345, 123456
  • 6 = 000001, 000012, 000123, 001234, 012345, 123456

For this setting to take effect, you must use the {ID} command in the “Order/Invoice/Shipment/Credit Memo Format” setting.

Note: When the “Increment Per Store” setting (previous page) is set to “Yes”, the increment pad length should be higher than the number of anticipated digits in your order number – eg. When 10,000 orders are anticipated, an increment pad length of 7 or more is recommended.

Increment Step (1.0.0+)

Set the increment used for generating consecutive order numbers. For example:

  • 1 = 1231, 1232, 1233, 1234, 1235...
  • 2 = 1231, 1233, 1235, 1237, 1239...
  • 33 = 1231, 1264, 12397...

Some stores use this approach to make it harder to guess order volumes based on invoice numbering.

For this setting to take effect, you must use the {ID} command in the “Format” setting (above). 

IDs by Store (V3.0.0)

Setting this to Yes will keep a number sequence for each store view. Setting this to No will keep one combined number sequence for all stores. For example with IDs By Store = No:

  • 1001 (Store 1)
  • 1002 (Store 2)
  • 1003 (Store 1)

Please note this setting can only be changed for all stores on the global scope level.

Order Number Preview

Order Number Customiser provides a preview of the currently active configuration. You will need to save the configuration for your changes to update the preview.

Only document types that are enabled for use with Order Number Customiser are previewed.

Still need help? Contact Us Contact Us