Question

I have got a issue with Order Number in Magento2. enter image description here

Order Number not increment by 1 it should be like this 000000241 000000240 000000239 but not.kindly identify the issue.

Was it helpful?

Solution

There are many reasons why an order number (increment id) is missing in your list. One common case is that an order number is created before the order will be saved. That happens for example in some payment modules. If the customer doesn't finish the checkout process you will not see that order numbers in your list since there will never be an order with that increment id.

You can check the quote table for entries in the column reserved_order_id. If you find the missing numbers there, you have the answer.

There are also cases when an order number is requested by some modules even though there is already a reserved_order_id set in the quote. In that cases you need to debug your code.

But anyway: If you see all orders you expect and have no customer complaints, you don't need to worry about missing increment ids in the order grid.

OTHER TIPS

I found this in magento documentation (https://devdocs.magento.com/cloud/before/before-workspace-magento-prereqs.html#database):

The MySQL configuration parameter auto_increment_increment is set to 1 by default in a local MySQL installation. You need to change this value to 3. The Magento Commerce database cluster includes 3 database implementations. The increment ensures data is unique across all databases for consistent data in the High Availability structure.

It explains why the order id are incremented 3 by 3. Plus the reason of reserved_id when there some issue during the payment for example.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top