Magento – Having multiple store views share the same order increment_id number range

configurationmagento-1multistore

Can Magento be configured in a way, that multiple store views of the same website can share the same order increment_id number range? And if so, how?

For example, with a multistore setup like this in core_store:

store_id        code    website_id    group_id
       0       admin             0           0
       1       alpha             1           1
       2       bravo             2           2
       3     charlie             2           2

Now a new store view delta is added:

store_id        code    website_id    group_id
       4       delta             1           1

Assuming alpha's last order increment id currently is 1000123, how to achieve:

next sell    order number
    alpha         1000124
    delta         1000125
    delta         1000126
    alpha         1000127

Same question goes for multiple store views sharing the same invoice increment_id number range, and/or sharing the same creditmemo increment_id number range.

Does Magento support this out-of-the-box?

Best Answer

I'd imagine that this would be quite difficult. Increment id's are stored in the eav_entity_store table and unsurprisingly each store has it's own entry which is updated when an order (and quote, invoice etc) is created. To get all stores to use the same incrementer you would need to somehow rewrite this logic so it used the same row in the DB. Quite what impact this may have on other areas of the site is something else that would need to be considered.

Related Topic