How to change order increment prefix?

  • I run a shop (Magento CE 1.6.2) with 4 different store-views, which have (for historical reasons) ID's 1, 3, 4 and 7. Order numbers have been looking like this 10000001, 30000001, 40000001, 70000001.

    I have set-up a brand new install with Magento CE 1.9.1, but now the store-ID's are 1, 2, 3, 4...

    How do I change this in the old situation?

    I came across this post --> explaining how to set/cahnge the eav_entity_store.increment_prefix

    But this does not seem to work in 1.9...

  • 7ochem

    7ochem Correct answer

    6 years ago

    Just edit the ID of the stores in the store_id column in the core_store database table. Because of the foreign keys, this will get updated in almost all of the other tables.

    Additionally you should update:

    • default_store_id column in core_store_group table

    As commented, changing your actual database ID's would be a bit radical. Also you would still have to update the eav_entity_store table.

    So ,you could also simply set a per store configuration for your increment ID's. You can do this in the eav_entity_store table:

    • For store ID 1, set increment_prefix to 1
    • For store ID 2, set increment_prefix to 3
    • For store ID 3, set increment_prefix to 4
    • For store ID 4, set increment_prefix to 7

    if OP just want's to change the order increment ID wouldn't this be a bit radical for that? Better change the prefix of the increment IDs

    Thanks, very simple after all... I was afraid to mess stuff up, but you can actually set prefix and order ID just altering this one table.

    Here i have 2 stores, store 1 by default order increment prefix start with 10000, how can i change to store 2 like order increment prefix 30000.

License under CC-BY-SA with attribution

Content dated before 7/24/2021 11:53 AM