lucoral Posted September 8, 2012 Share Posted September 8, 2012 Aloha! Is there a way to reset the category, sub category, and product ID numbers which are automatically generated? Thanks! Martin Link to comment Share on other sites More sharing options...
ukmacnut Posted October 20, 2012 Share Posted October 20, 2012 Hi - Did you ever find an answer to this? I wonder what it does to old orders. I really want to reset my ID numbers on my 1.3.7 Prestashop. Thanks David Link to comment Share on other sites More sharing options...
lucoral Posted October 24, 2012 Author Share Posted October 24, 2012 Aloha, David! No, I haven't got an answer to this yet. best, Martin Link to comment Share on other sites More sharing options...
DBMAN Posted October 24, 2012 Share Posted October 24, 2012 (edited) Well I've already been reminded about the various experience levels here but one way to do this (only way?) is to do it in your SQL table(s). BACK UP YOUR SQL IN TOTAL!!!! (with "drop tables" so you can import right back to where you started) before you do anything like this but you can reset auto incrementing tables with this SQL command: Go to the table and select the auto incrementing field. Select "operations" and you will see "AUTO_INCREMENT" and the next number. Set that to what ever you want to start with and click "go". DO NOT DO THIS IF YOU ARE UNCOMFORTABLE IN ANYWAY but really there is no mystery to it and personally I think all site owners at some time should be comfortable with working within their database as it is very powerful and the heart of your Prestashop. Of course the guts, veins, brain, etc. is Prestashop itself.....Merci' Beucoup! :D Of course even if you forget to back up you can simply do the same procedure and put the old increment number in there to get back to where you were since all you have done is to edit that single table field. Edited October 24, 2012 by DBMAN (see edit history) Link to comment Share on other sites More sharing options...
DBMAN Posted October 24, 2012 Share Posted October 24, 2012 Oh, if you have existing number you would want to reset to after the last number so they existing ones aren't overwritten. Link to comment Share on other sites More sharing options...
vekia Posted October 24, 2012 Share Posted October 24, 2012 ALTER TABLE prefix_category AUTO_INCREMENT=0; or TRUNCATE the table (this mean that you delete all rows from table!) TRUNCATE TABLE prefix_category you must paste and run this code in some SQL managers like PhpMyAdmin etc. 1 Link to comment Share on other sites More sharing options...
MaXi32 Posted October 13, 2019 Share Posted October 13, 2019 Sorry for coming to the old post. I don't want to open the new post since this is related and not so important. Is there any side effects on the existing module functioning that can be found so far when resetting the category table to AUTO_INCREMENT=0 ? I can see that some posts recommend to put it as AUTO_INCREMENT=3 (maybe due to prestashop default demo data is set to 3): Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now