1. Get your products in 3 different collections using addAttributeToFilter
where attribute name
is type_id
. For the condition you can use
Mage_Catalog_Model_Product_Type::TYPE_SIMPLE
, Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE
and Mage_Catalog_Model_Product_Type::TYPE_GROUPED
.
Example:
$simple_products = $model->getCollection()
->addAttributeToSelect('*')
->addAttributeToFilter('type_id', Mage_Catalog_Model_Product_Type::TYPE_SIMPLE);