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