locean67 Posted June 25, 2012 Share Posted June 25, 2012 (edited) Hello, First of all I'd like to apologize if this post should be somewhere else. Do you know how to lower the id of a product? Exemple : I create a product and it got id number 4. I delete that product right after creating it and create another one. It's id number will be 5 and not four. Is there a way to not have a missing number? I'm sorry if I didn't explain it well thank you for your answers Edited June 25, 2012 by locean67 (see edit history) Link to comment Share on other sites More sharing options...
mim Posted June 25, 2012 Share Posted June 25, 2012 I believe it's possible by tweaking your database tables but I will not recommend to! Why you want to change it anyway? It isn’t important at all and will happen anyway again in future so is better just to leave it as it should be, but if you want you should go to phpmyadmin (for example) and then changing PS_PRODUCT table rows(ID_PROD I think or something like that, it's the first column anyway), but I can’t guaranty that you’ll not have some unexpected bizarre things happen to your shop then! You know databas tables aren’t that independent and you should know exactly what are you doing when tweaking them manually if there'd be any dependencies or what! Good luck all the way! Link to comment Share on other sites More sharing options...
tdr170 Posted June 25, 2012 Share Posted June 25, 2012 Yes in the database click on ps_products or pr_products and then click on operations at top of screen you will see an area named Table options look for auto_increment and change the number in the box. So if you have products 1,2,3 and deleted 4 & 5 your next product will be 6 but you can change the number back to 4 in the text area above. So now the next product you enter will be 4, if you feel the need to have them listed numerically, but as mim stated it is really not that important and only used by Prestashop to link the various parts of a product together. At some point you will delete product # 253 of 500 and have a gap there anyway. 1 Link to comment Share on other sites More sharing options...
locean67 Posted June 26, 2012 Author Share Posted June 26, 2012 thank you for your answers, guess I'll leave it as it is. Thank you for answering Link to comment Share on other sites More sharing options...
Nathalie W Posted January 7, 2013 Share Posted January 7, 2013 Yes in the database click on ps_products or pr_products and then click on operations at top of screen you will see an area named Table options look for auto_increment and change the number in the box. So if you have products 1,2,3 and deleted 4 & 5 your next product will be 6 but you can change the number back to 4 in the text area above. So now the next product you enter will be 4, if you feel the need to have them listed numerically, but as mim stated it is really not that important and only used by Prestashop to link the various parts of a product together. At some point you will delete product # 253 of 500 and have a gap there anyway. Thank you. This helped me a lot 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