示例#1
0
 protected function _toHtml()
 {
     if (!$this->getCount()) {
         return $this->renderView();
     }
     $this->setRecentlyComparedProducts($this->getItemsCollection());
     return parent::_toHtml();
 }
示例#2
0
 /**
  * Internal constructor
  *
  */
 protected function _construct()
 {
     parent::_construct();
     $this->addColumnCountLayoutDepend('one_column', 5)->addColumnCountLayoutDepend('two_columns_left', 4)->addColumnCountLayoutDepend('two_columns_right', 4)->addColumnCountLayoutDepend('three_columns', 3);
     $this->addPriceBlockType('bundle', 'bundle/catalog_product_price', 'bundle/catalog/product/price.phtml');
 }
 /**
  * Emulate 'compared products' block with persistent data
  *
  * @param Mage_Reports_Block_Product_Compared $block
  * @return null
  */
 public function emulateComparedProductsBlock(Mage_Reports_Block_Product_Compared $block)
 {
     if (!$this->_isComparedProductsPersist()) {
         return;
     }
     $customerId = $this->_getCustomerId();
     $block->setCustomerId($customerId);
     $block->getModel()->setCustomerId($customerId)->calculate();
 }