/** * Add all attributes and apply pricing logic to products collection * to get correct values in different products lists. * E.g. crosssells, upsells, new products, recently viewed * * @param Mage_Catalog_Model_Resource_Product_Collection $collection * @return Mage_Catalog_Model_Resource_Product_Collection */ protected function _addProductAttributesAndPrices(Mage_Catalog_Model_Resource_Product_Collection $collection) { $test = Mage::getSingleton('catalog/config')->getProductAttributes(); return $collection->addMinimalPrice()->addFinalPrice()->addTaxPercents()->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())->addUrlRewrite(); }