Scenario: A new blank Magento with a category product and customer import with some fixes to do.
Category structure:
Root
L..Category_parent1 (0 products)
L..Category_child1 (22)
L..Category_child2 (34)
L..Category_parent2 (0)
L..Category_child1 (22)
L..Category_child2 (34)
L..Category_parent3 (0)
L..Category_child1 (22)
L..Category_child2 (0)
L..Category_child2_child1 (22)
L..Category_child2_child2 (34)
L..Category_child3 (10)
I want to copy all products from a child category to its relative parent using a SQL query or a php script. (I don't know if it's possible to do this through the Magento admin).
Desired Result:
Root
L..Category_parent1 (22 + 34 products)
L..Category_child1 (22)
L..Category_child2 (34)
L..Category_parent2 (22 + 34)
L..Category_child1 (22)
L..Category_child2 (34)
L..Category_parent3 (22 + 22 + 34 + 10)
L..Category_child1 (22)
L..Category_child2 (22 + 34)
L..Category_child2_child1 (22)
L..Category_child2_child2 (34)
L..Category_child3 (10)
UPDATE! Is there a way to do this only on show products? See products in this way manteining relashionship with their own categories (simply do that in view layout in list...)?