Magento 2 Extensions:Order Number Customizer

From XTENTO Support Wiki
Jump to: navigation, search
This is a guide for Magento 2. For Magento 1 extensions and guides, please refer to Magento 1 Guides.

Ordernum450 noborder.png
Buy-now.png

Contents

Overview

Customize your Magento order numbers and all other sales related numbers. The number format can be adjusted completely flexible - use letters, prefixes, suffixes, date/time variables, counters or random numbers to protect sales and hide how much you sell from your competitors.

Interested in this Magento Extension?

Head over to our store to purchase this extension: Order Number Customizer (Magento 2)

Got questions? Feel free to contact us! Contact Form

Setting up the extension

Installation

Please refer to our general Extension Installation and Setup Guide for installation instructions.

To enable and configure the module, go to System > XTENTO Extensions > Order Number Customizer. Make sure to enter your license key and enable the module there.

Configuration

The configuration section is located at System > XTENTO Extensions > Order Number Customizer.

There are four separate, but from the configuration almost identical sections for order number, invoice number, shipment number and credit memo number settings.

 Field  Description
Enable Custom Number If disabled, no custom number format will be used for this entity. This can be enabled/disabled on a per-website and per-store view level.
Number Format This is the format which will be used for order/invoice/... numbers. You can use letters, numbers as well as variables. For a list of variables, please see below. Always make sure your order/invoice/... numbers are unique somehow. It is recommended to at least use the %counter% variable in the order number to avoid duplicate order numbers, as this variable is unique and incrementing.
Counter: Start counting from This is the %counter% variable that can be used in the custom number format field above. This configures from which number the %counter% variable begins counting. If you use "Reset counter", the %counter% variable will start from the value entered here after being reset.
Counter: Increment by If set to 1, the %counter% variable increases by 1 for every new transaction made. If set to 7, the %counter% variable increases by 7 for every new transaction made.
Counter: Number Padding If you want the %counter% variable to be 6 digits long with zeros at the beginning of the counter, enter 6 in this field. For example if the counter is at 12, it would output 000012 then, so it's always a 6 digit number (6 is the padding).
Counter: Reset counter automatically How often should the %counter% variable be reset? Make sure to have dynamic parts (like the date) in the number format to avoid duplicate order/invoice/... numbers!
Counter: Force counter reset now If set to "Yes", the %counter% variable will be reset when the next increment ID is generated and will then deactivate this option automatically. This means the %counter% variable is just reset for the next increment ID.

Special fields for invoice/shipment/credit memo settings:

 Field  Description
Same as order number If enabled, the invoice/shipment/credit memo number will use the order number the transaction belongs to, which means the number used for this transaction is the same as the order number.
Prefix The prefix entered here will be added in front of the number/ID. If the order number is 2014-1245, and you enter INV- as the prefix, the new ID will be INV-2014-1245
Replace If you want to replace something in the order number (which will be used as the new ID/number), you can enter it here. If your order number is ORD-1234 you can enter ORD- here and ORD- would then be replaced when used as the new ID/number.

The following variables can be used in the number format:


Always make sure your order/invoice/shipment/credit memo numbers are unique. If the generated ID already exists, Magentos internal / default increment ID will be used as the increment ID.

Troubleshooting

General

No custom order/invoice/etc. numbers are used

Configuration cache invalidated

The configuration cache will always get invalidated if something in the system configuration changes - and this is where our module saves its data. But this doesn't cause any problems. The cache being invalidated simply means parts of it are not valid anymore, and Magento will automatically refresh/re-read that part of the cache. There is no need to manually refresh the cache.

Possible solutions:

Skipped order numbers

This is not an "issue". It is Magento core logic. Explanation can be found here: https://magento.stackexchange.com/a/37444

Duplicate order numbers / parallel transactions

If you have a high-traffic environment where multiple orders may be placed at roughly the same time, you will need to make sure to add an additional unique/random variable to your order numbers such as the %rand{n}% variables. The way order numbers are stored in the configuration do not allow parallel transactions, so another unique/random element must be introduced in the order number. There is no way for us to change this.

Personal tools
Namespaces
Variants
Actions
General Information
Magento 2 Guides
Magento 2 Extensions
Magento 1 Guides
Magento 1 Extensions
Magento Integration Suite
Product Feed Guides
Toolbox