Hi,
I've done a lot of testing purchases on my commerce site now question is: how to reset order id's to start from 1 again? Tried to clear the database, searched for strings but still it keeps rolling from last id + 1.
Any ideas?
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | Screen Shot 2016-06-16 at 12.54.50 PM.png | 21.39 KB | el_reverend |
Comments
Comment #1
rszrama commentedIn phpMyAdmin under the Operations tab you need to reset the auto increment value to 1 for the commerce_order table.
Comment #2
amfis commentedThanks for the tip.
Just to add to others: before doing this it is needed to empty commerce_order table.
Comment #4
ron williams commentedSQL code option:
ALTER TABLE commerce_order AUTO_INCREMENT=1Comment #5
garethhallnz commentedJust contributed a module to help with this.
Commerce Reset
Comment #6
giorgosk#4 works great thanks
Comment #7
el_reverend commentedI've ran
ALTER TABLE `commerce_order` AUTO_INCREMENT = 1000;(as seen here: https://drupalcommerce.org/questions/3172/how-can-i-change-starting-orde...)and that worked great for all new customers. In a recent test I created a new order as the superuser and it turns out that it used the original ordering numbers!
Well thats odd. I was not aware that commerce uses numbers based on the user - and that seems weird. Does anyone have an idea to why or how to make it uniform accross all users?