Reputation: 520
Is there any way to change Order Starting Number in Magento without changing order numbers that are already there? I just want to set 170000xxxx for all new orders.
Thanks
Upvotes: 16
Views: 36997
Reputation: 5908
The simplest solution for this is to use Ashley Schroder's "Set Custom Order Number" extension. This extension, once installed, makes changing the next order number a simple operation you can do through the back end.
Regardless of the method used, make sure your new order number sequence doesn't include existing orders, otherwise bad things happen (unique constraints in the database not satisfied, Magento crashes).
Upvotes: 5
Reputation: 1218
Sankar had it almost right
UPDATE `database`.`eav_entity_store` SET `increment_last_id` = '17000000' WHERE `entity_store_id` = 1;
Upvotes: 5
Reputation: 5042
UPDATE `eav_entity_store` SET `increment_last_id` = '30000000' WHERE `entity_type_id` = STOREID;`
STOREID -> The store id which you are using.
Upvotes: 3
Reputation: 3682
Look in eav_entity_store
and find increment_last_id
. Update this number, making sure that entity_type_id
is correct for orders.
Find the entity_type_id for orders
SELECT entity_type_id FROM eav_entity_type WHERE entity_type_code = 'order';
Upvotes: 32