VietGuide Posted November 19, 2009 Share Posted November 19, 2009 I have a deleted product with Id product=31.Now i have the other new product with Id product=48.How could i change the ID 48 to 31?Anyone could help?Thanks! Link to comment Share on other sites More sharing options...
rocky Posted November 19, 2009 Share Posted November 19, 2009 You cannot do this using the Back Office. You must modify the ps_product tables and change product ID from 48 to 31. Link to comment Share on other sites More sharing options...
VietGuide Posted November 20, 2009 Author Share Posted November 20, 2009 Thanks Rocky,I try to edit in product table but after that this product disappear in all BO & FO.I don't know why. What can I do now? Link to comment Share on other sites More sharing options...
rocky Posted November 20, 2009 Share Posted November 20, 2009 You should restore a backup of the tables that you changed. I think you should just let Prestashop handle the IDs if you are not comfortable modifying the database and troubleshooting database errors. There is no harm in having unused IDs. Link to comment Share on other sites More sharing options...
reinoplantae Posted April 21, 2012 Share Posted April 21, 2012 Well... i know that's an old topic ... but there isn't any new topic about changing the product's ID numbers... and i want to change some IDs. I have some links at the google's first page, but now those links are broken because I accidentaly deleted the products and now they have a different ID and, consequently, diferent links. I've tried to change the DB tables ps_product and ps_category_product... but without success. Does anyone have a solution for this?? Thanks! Link to comment Share on other sites More sharing options...
zaglebie Posted July 13, 2013 Share Posted July 13, 2013 bump Link to comment Share on other sites More sharing options...
vekia Posted July 13, 2013 Share Posted July 13, 2013 you can try to change it in the database, but in this case you have to edit also other associations in the tables like categories, attributes etc. im not sure at all that this will work (i never tested it) so before you will try it, make sure that you've got backup / mirror 3 Link to comment Share on other sites More sharing options...
payamtooba Posted August 7, 2013 Share Posted August 7, 2013 hi,i am starter in this fantastic cms and i wanna post my first speaking.. I think changing the product id is very important and i dont know why there isnt any good way for that,I resolve this by importing products from excel and i force my product ids you can see that in my persian site : store.carpetmaster.ir this site has plenty of product with ids greater than 2000 imported by myself Link to comment Share on other sites More sharing options...
vekia Posted August 7, 2013 Share Posted August 7, 2013 but it isn't good especially from techical point of view. This is because relational databases are based on "keys" Key is usually unique number, in this case if you change the ID it will break down the structure of the entire database you have to know that product id are stored also in other tables, it mean, that you will have to change a lot of tables in your DB moreoiver UNIQUE autoincrement field type will not work well anymore (and it is definitely BAD) 1 Link to comment Share on other sites More sharing options...
Peter Zarian Posted November 30, 2013 Share Posted November 30, 2013 hi,i am starter in this fantastic cms and i wanna post my first speaking.. I think changing the product id is very important and i dont know why there isnt any good way for that,I resolve this by importing products from excel and i force my product ids you can see that in my persian site : store.carpetmaster.ir this site has plenty of product with ids greater than 2000 imported by myself Do you think it's easy to navigate in your shop for people from Europe for example? Link to comment Share on other sites More sharing options...
vekia Posted November 30, 2013 Share Posted November 30, 2013 for me it's not a problem, especially with chrome where you can easily translate website 1 Link to comment Share on other sites More sharing options...
icydrago Posted December 16, 2014 Share Posted December 16, 2014 I have to change product_ids. I am going to change every occurrence of id_product field in every DB table. Is "id_product" the only way it is called in db? Is there other names like "product_id" or etc? Link to comment Share on other sites More sharing options...
HavanA Posted December 19, 2015 Share Posted December 19, 2015 <bump> What happens with the order history if you migrate your products to clean, newer version of Prestashop (in my case from 1.5.6.2 to 1.6.1.3) and some products have now different id's? What happens when a customer looks into his order history/invoice? Do they notice anything, or will the system only pull id's and then possibly show another product (in stead of the product the customer actually bought)? Link to comment Share on other sites More sharing options...
visualcontrast Posted February 17, 2016 Share Posted February 17, 2016 I accidentally imported all my products with the right ID's but allowed the CSV import to auto-increment new product ID's. Now, when trying to apply license keys to product ID's they don't align since the product ID from PrestaShop is different than the product ID in my spreadsheet csv import. So, is there still no way to simply change the product ID and make everything align? Link to comment Share on other sites More sharing options...
Fidlimidly Posted July 12, 2016 Share Posted July 12, 2016 Easy way for rewrite just edit these tables : ps_product_langps_productps_product_shop Link to comment Share on other sites More sharing options...
payamtooba Posted January 11, 2018 Share Posted January 11, 2018 hi everyone i resolved the problem by importing products by CSV and in this way product ids can be same. it ll be good for seo and my customers. 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