public function addMinimalPrices(Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection $collection) { $minimalPrices = $this->_getResource()->getMinimalPrices($collection->getLoadedIds()); foreach ($minimalPrices as $row) { $item = $collection->getItemById($row['entity_id']); if ($item) { $item->setData('minimal_price', $row['value']); $item->setData('minimal_tax_class_id', $row['tax_class_id']); } } }