I have grouped product with the name Group1. And also I have category with the same name(Group1). I have several simple product under the Group1 category. How to add these products under this category only as Associated product to grouped product programmatically?
I got a product collection under the category named as Group1 by
$productCollection = Mage::getResourceModel('catalog/product_collection')
->addCategoryFilter($category);
Now i want to add these products to the Grouped product as Associated product
If anybody know, please help me guys
Best Answer
If simple products are under Group1 category try following code to associate them to grouped product of this category: