I am trying to get only parent product of a particular manufacurer using product collection Model. I tried below code-
$brand_id=23; // a manufacturer option value $manufacturerId = $brand_id; $attributeCode = 'manufacturer'; $_productCollection= Mage::getModel('catalog/product') ->getCollection() ->addAttributeToFilter($attributeCode, $manufacturerId) ->addAttributeToSelect('name');
in above image I am getting all parent + child products. I only want to get parent products. I have used tried this link but no luck, can anyone guide me how can I do that.