Copy Magento Categories to Parents

lucasbraga92

New Member
Scenario:A new blank Magento with a category product and customer import with some fixes to do.Category structure:\[code\]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)\[/code\]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:\[code\]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)\[/code\]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...)?
 
Back
Top