Exemplo n.º 1
0
 /**
  * Get HTML if there's anything to show
  */
 protected function _toHtml()
 {
     if ($this->_getProductCollection()->count()) {
         return parent::_toHtml();
     }
     return '';
 }
Exemplo n.º 2
0
	function _toHtml() 
	{			
		if(!$this->_config['show']) return;	
		$this->__renderSlideShowImages();
		$this->assign('configs', $this->_config);			
		$this->setTemplate($this->_config['template']);	
        return parent::_toHtml();	
	}
Exemplo n.º 3
0
 public function _toHtml()
 {
     $grid_col_ls = $this->getGeneralConfig("grid_col_ls");
     $grid_col_ls = $grid_col_ls ? (int) $grid_col_ls : 3;
     $grid_col_ms = $this->getGeneralConfig("grid_col_ms");
     $grid_col_ms = $grid_col_ms ? (int) $grid_col_ms : 3;
     $grid_col_ss = $this->getGeneralConfig("grid_col_ss");
     $grid_col_ss = $grid_col_ss ? (int) $grid_col_ss : 2;
     $grid_col_mss = $this->getGeneralConfig("grid_col_mss");
     $grid_col_mss = $grid_col_mss ? (int) $grid_col_mss : 1;
     $this->assign("grid_col_ls", $grid_col_ls);
     $this->assign("grid_col_ms", $grid_col_ms);
     $this->assign("grid_col_ss", $grid_col_ss);
     $this->assign("grid_col_mss", $grid_col_mss);
     return parent::_toHtml();
 }
Exemplo n.º 4
0
 protected function _toHtml()
 {
     extract(array_replace(array('categories' => '', 'filtertype' => '', 'attribute' => '', 'orderby' => 'price', 'order' => 'asc', 'limit' => 12, 'use_ajax' => 0, 'template' => 'cdz_filterproducts/grid.phtml', 'custom_template' => 'cdz_filterproducts/custom.phtml', 'column_count' => 5), $this->getData()));
     //$categories = explode(',',trim($categories));
     switch ($filtertype) {
         case 1:
             //new
             $collection = $this->getNewProducts($categories);
             $collection->setOrder($orderby, $order);
             break;
         case 2:
             //best seller
             $collection = $this->getBestSellerProducts();
             break;
         case 3:
             //most viewed
             $collection = $this->getMostViewProducts();
             break;
         case 4:
             //attribute
             $collection = $this->getProductsByAttribute($attribute);
             $collection->setOrder($orderby, $order);
             break;
     }
     $this->addCategoriestoFilter($collection, $categories);
     $collection->setPageSize($limit);
     //->setCurPage(1);
     $this->setProductCollection($collection);
     $this->setColumnCount($column_count);
     if ($use_ajax == 0) {
         if ($template != 'custom') {
             $this->setTemplate($template);
         } else {
             $this->setTemplate($custom_template);
         }
     } else {
         $this->setTemplate('cdz_filterproducts/ajax.phtml');
     }
     $html = parent::_toHtml();
     return $html;
 }
 public function getListProductAjax()
 {
     $collection = $this->_getProductCollection()->load();
     $this->setTemplate('vt/productsconfig/item.phtml');
     return parent::_toHtml();
 }
 protected function _toHtml()
 {
     if ($this->getData('template') == 'custom_template') {
         $this->setTemplate($this->getData('custom_theme'));
     }
     return parent::_toHtml();
 }