biebel Posted June 25, 2021 Share Posted June 25, 2021 (edited) I have added new categories the the webshop. I would like to migrate the products from the old category to the new category. I use these queries: SET @oldCategory = ; SET @newCategory = ; INSERT INTO `ps_category_product` SELECT @newCategory, id_product, position FROM `ps_category_product` WHERE id_category = @oldCategory AND id_product NOT IN (SELECT id_product FROM `ps_category_product` WHERE id_category = @newCategory); UPDATE `ps_product_shop` SET id_category_default = @newCategory WHERE id_category_default = @oldCategory AND id_shop = 1; UPDATE `ps_product` SET id_category_default=@newCategory WHERE id_category_default=@oldCategory; DELETE FROM `ps_category_product` WHERE id_category=@oldCategory; When opening a product in backoffice all the categories are correct but the product doen't show up in the frontoffice when opening the category. When I open the product in backoffice, push save without any modification, the product is shown in front office. What am I missing? Kind regards Bart Edited June 26, 2021 by biebel (see edit history) Link to comment Share on other sites More sharing options...
ComGrafPL Posted June 25, 2021 Share Posted June 25, 2021 Here you have other way to do it. Free module by @musicmaster 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