Order Number

€79.00
v1.0.0 Updated Oct 15, 2026

Order Number

Gives orders, invoices, shipments and credit memos their own number format and counters, restarting each year, month or day, with a one-command import from….
Hyvä Compatible Magento 2.4.4 Magento 2.4.5 Magento 2.4.6 Magento 2.4.7 Mage-OS 2.0 Mage-OS 2.1
€79.00
Try the live demo
  • Updates and support included for 12 months
  • License key delivered immediately by email
  • 30-day money-back guarantee
  • Full documentation included
  • Compatible with Hyvä themes
  • Composer-ready installation

Order Number

Magento numbers orders 000000123 and invoices the same way, one sequence per store view. Accounting wants INV-2026-00042, the warehouse wants the delivery note to carry the order number, and the yearly restart has to happen on 1 January in the shop's timezone, not the server's. Wimakeit_OrderNumber gives each sales document its own format and counter, and never issues a number twice.

It also replaces Amasty Custom Order Number: one command imports its settings, its built-in defaults and its counters, so the numbering carries on where it stopped.

Who it's for

  • Merchants whose accountant or ERP imposes an invoice numbering scheme (prefix, year, continuous counter)
  • Multi-website shops that need one counter per website or per store view, or one counter shared by all
  • Stores that want delivery notes and credit memos to reuse the order number (CDE26000042 → LIV26000042)
  • Projects leaving Amasty Custom Order Number during a Magento or Mage-OS upgrade

Key benefits

  • One format per document — orders, invoices, shipments and credit memos each get a format built from {counter}, {yyyy}, {mm}, {dd}, {store}, {rand}, and for documents {order_id} and {country_code}. An empty format keeps Magento's numbering for that document.
  • Counters that restart on time — never, or each year, month or day, in the store view's timezone with daylight saving. Shared by the whole installation, or separate per website or store view.
  • Gapless invoices — the invoice, shipment and credit memo counters move inside the document's own save: a failed save gives the number back. Two invoices saved at the same second neither deadlock nor share a number.
  • No duplicate, ever — a number already present in the sales tables is skipped. A typo in a format ({conter}) or a character that breaks URLs and payment references is refused on save.
  • Checkout never blocked — any numbering error falls back on Magento's own number and is logged.
  • Amasty migration in one command — wimakeit:order-number:import-amasty --dry-run shows what will be copied: settings at their original scope, Amasty's defaults that were never saved, and every counter with its last value. Invalid values are listed, not silently dropped.

Compatibility

  • Magento 2.4.6+ / Mage-OS 3.x
  • PHP 8.1 to 8.5
  • Requires wimakeit/module-core ^3.0
  • No frontend code: works the same with Luma, Hyvä or a headless storefront, no setup:static-content:deploy needed
  • Admin and messages translated into French (fr_FR)

Install this module via Composer. Make sure your auth.json is configured with your Wimakeit credentials.

Terminal
$ composer require wimakeit/module-order-number:^1.0.0
$ bin/magento setup:upgrade
$ bin/magento setup:di:compile

Installation notes

The standard composer require + setup:upgrade + setup:di:compile flow applies. The points below cover what's specific to this module.

Required dependency

This module requires wimakeit/module-core ^3.0. Composer will pull it automatically from the Wimakeit registry as long as the registry is declared in your project's composer.json.

What the installation changes

  • One table is created: wimakeit_order_number_counter (one row per document type, counter scope and period).
  • Sales tables are not altered. Numbers already issued never change.
  • No JavaScript and no static file: setup:static-content:deploy is not needed for this module.

Nothing changes until you type a format

The module is off by default, and every Number Format is empty. An empty format keeps Magento's own numbering for that document, so you can enable the module and give a custom number to invoices only.

bin/magento config:set wimakeit_order_number/general/enabled 1
bin/magento config:set wimakeit_order_number/invoice/format 'INV-{yyyy}-{counter}'
bin/magento cache:clean config

Restart queue consumers after changing a format: settings are read once per process.

ACL permissions

After installation, the following ACL resource is available under System → Permissions → User Roles:

ResourceDefault
Wimakeit_OrderNumber::config (edit module configuration, under Wimakeit)granted to Administrator role only

Configuration

Stores → Configuration → Wimakeit → Order Number. Formats and counters can be set at default, website or store view scope.

General

SettingDefault
Enable Custom NumbersNo

Order

SettingDefault
Number Formatempty (Magento's numbering)
Counter Start1
Counter Step1
Counter Padding6
Restart the CounterNever
Separate Counter for this Website (website scope)No
Separate Counter for this Store View (store view scope)No

Invoice, Shipment, Credit Memo

Each has the same settings as the order, plus:

SettingDefault
Based on the Order NumberNo
Prefix (when based on the order number)empty
Part of the Order Number Replaced by the Prefixempty (the prefix goes in front)

Format rules

RuleValue
Placeholders{counter} {yyyy} {yy} {mm} {m} {dd} {d} {hh} {store} {rand}; documents also {order_id} {country_code}
Mandatory{counter} or {rand}
Allowed charactersletters, digits, . _ - / #
Maximum length36 characters; padding up to 12

A format breaking a rule is refused on save, with the reason.

Command line

bin/magento wimakeit:order-number:counter:list
bin/magento wimakeit:order-number:counter:set invoice 341 [--website=6 | --store=7]

counter:set sets the last value issued: the next number takes it plus the step. Changing Counter Start in the admin does not move an existing counter, this command does. Use it to continue the numbering of a previous system.

Migrating from Amasty Custom Order Number

bin/magento wimakeit:order-number:import-amasty --dry-run   # 1. shows what will be copied, writes nothing
bin/magento module:disable Amasty_Number                    # 2. Amasty rewrites the sequence itself
bin/magento wimakeit:order-number:import-amasty             # 3. import
bin/magento wimakeit:order-number:counter:list              # 4. check
  • Settings are copied at the scope they were saved at, and Amasty's built-in defaults are written at default scope for the settings never saved.
  • Counters keep their last value. A counter whose date cannot be read is placed in the current period: no number can be issued twice, a yearly restart may be missed once.
  • A value this module refuses is listed and the command exits with an error: fix it in the admin.
  • Not imported: Timezone offset (dates follow the store view's timezone) and Use Separate Connection (not needed). Settings stored in app/etc/config.php or env.php are not read; the command warns when they exist.
  • Re-runnable. Amasty's tables are only read; drop them once Amasty is removed.

Worth knowing

  • Gapless documents, serialised. An invoice, shipment or credit memo counter stays locked until the document is saved. Mass invoicing runs one save at a time per counter scope.
  • Orders behave like Magento's sequence. The order number is reserved on the quote: an abandoned payment leaves a gap.
  • Restart and date. With a yearly restart, put {yy} or {yyyy} in the format. Without it the counter runs into numbers already issued: they are skipped, never issued twice, and after 5 skips in a row Magento's own number is used and a critical entry is logged.
  • Precedence. When both the website and the store view have a separate counter, the store view's counter is used.
  • {rand} is 4 digits. It keeps numbers apart; it is not a secret.
  • A numbering failure never blocks the checkout or an invoice: Magento's number is used and the error is logged.

Cron jobs

None.

Version
v1.0.0
Support
12 months
Last updated
Oct 15, 2026
Magento
Magento 2.4.4 Magento 2.4.5 Magento 2.4.6 Magento 2.4.7 Mage-OS 2.0 Mage-OS 2.1
PHP
PHP 8.1 PHP 8.2 PHP 8.3
Hyvä
Compatible
Package
wimakeit/module-order-number

Compatibility checker

Pick your stack to see if this module fits.

Found a bug? Tell us about it.

A short form opens in a new tab — the module name and your language are already filled in. Share what you tried, what went wrong, and we will get back to you within one business day.

Report a bug for Order Number
Module SKU: wimakeit-module-order-number · Language: en_US

Need help?

Our team is available to assist with integration.

Contact us
Schedule a call