/** * Preparing layout * * @return Mage_Catalog_Block_Product_Compare_List */ protected function _prepareLayout() { $headBlock = $this->getLayout()->getBlock('head'); if ($headBlock) { $headBlock->setTitle(Mage::helper('Mage_Catalog_Helper_Data')->__('Products Comparison List') . ' - ' . $headBlock->getDefaultTitle()); } return parent::_prepareLayout(); }
/** * Retrieve block cache tags * * @return array */ public function getCacheTags() { $compareItem = Mage::getModel('catalog/product_compare_item'); foreach ($this->getItems() as $product) { $this->addModelTags($product); $this->addModelTags($compareItem->setId($product->getCatalogCompareItemId())); } return parent::getCacheTags(); }