Example #1
0
 /**
  * Prepare to html
  * check has viewed products
  *
  * @return string
  */
 protected function _toHtml()
 {
     if (!$this->getCount()) {
         return '';
     }
     $this->setRecentlyViewedProducts($this->getItemsCollection());
     return parent::_toHtml();
 }
Example #2
0
 protected function _toHtml()
 {
     if ($this->getData('choose_template') == 'custom_template') {
         if ($this->getData('custom_theme')) {
             $this->setTemplate($this->getData('custom_theme'));
         } else {
             $this->setTemplate('em_recentview/custom.phtml');
         }
     } else {
         $this->setTemplate($this->getData('choose_template'));
     }
     return parent::_toHtml();
 }
Example #3
0
 protected function _toHtml()
 {
     if ($this->_hasComparedProductsBefore() === false) {
         return '';
     }
     $collection = $this->_getRecentProductsCollection();
     $hasProducts = (bool) count($collection);
     if (is_null($this->_hasComparedProductsBefore())) {
         Mage::getSingleton('reports/session')->setData('compared_products', $hasProducts);
     }
     if ($hasProducts) {
         $this->setRecentlyComparedProducts($collection);
     }
     return parent::_toHtml();
 }
 /**
  * Retrieve block cache tags
  *
  * @return array
  */
 public function getCacheTags()
 {
     return array_merge(parent::getCacheTags(), $this->getItemsTags($this->getItemsCollection()));
 }