コード例 #1
0
 public function _toHtml()
 {
     $this->setTemplate("ves/brand/block/brandnav.phtml");
     $collection = Mage::getModel("ves_brand/brand")->getCollection();
     $this->assign("brands", $collection);
     return parent::_toHtml();
 }
コード例 #2
0
ファイル: Groupmenu.php プロジェクト: TusharKDonda/maruti
 public function _toHtml()
 {
     // if(!$this->getConfig("enable_groupmodule")) {
     //   return ;
     // }
     $menus = $this->getCategoryBrand();
     // Assign html
     $this->setCategoryBrands($menus);
     return parent::_toHtml();
 }
コード例 #3
0
ファイル: Brandnav.php プロジェクト: booklein/bookle
 public function _toHtml()
 {
     $this->_show = $this->getGeneralConfig("show");
     $enable_scroll = $this->getModuleConfig("enable_brandnavmodule");
     if (!$this->_show || !$enable_scroll) {
         return;
     }
     $this->setTemplate("ves/brand/block/brandnav.phtml");
     $collection = Mage::getModel("ves_brand/brand")->getCollection();
     $limit = $this->getModuleConfig("brandnav_limit");
     if ($limit != "" || (int) $limit > 0) {
         $collection->setPageSize($limit)->setCurPage(1);
     }
     $this->assign("brands", $collection);
     return parent::_toHtml();
 }
コード例 #4
0
ファイル: Scroll.php プロジェクト: quanghuynt93/VesSmartshop
 public function _toHtml()
 {
     $this->_show = $this->getGeneralConfig("show");
     $enable_scroll = $this->getModuleConfig("enable_scrollmodule");
     if (!$this->_show || !$enable_scroll) {
         return;
     }
     $collection = Mage::getModel('ves_brand/brand')->getCollection();
     $collection->addFieldToFilter('is_active', 1);
     $collection->setOrder('position', 'ASC');
     $collection->setPageSize($this->getConfig('itemvisiable'));
     $resroute = Mage::getStoreConfig('ves_brand/general_setting/route');
     $extension = ".html";
     foreach ($collection as $model) {
         if (!$model->getLink()) {
             Mage::getModel('core/url_rewrite')->loadByIdPath('venusbrand/brand/' . $model->getId())->setIdPath('venusbrand/brand/' . $model->getId())->setRequestPath($resroute . '/' . $model->getIdentifier() . $extension)->setTargetPath('venusbrand/brand/view/id/' . $model->getId())->save();
         }
     }
     $this->assign('brands', $collection);
     $this->setTemplate("ves/brand/block/scroll.phtml");
     return parent::_toHtml();
 }
コード例 #5
0
ファイル: Cmenu.php プロジェクト: booklein/bookle
 /**
  * Contructor
  */
 public function __construct($attributes = array())
 {
     $helper = Mage::helper('ves_brand/data');
     $this->_config = $helper->get($attributes);
     // echo $this->setTemplate("ves/brand/cmemu.phtml");
     if (!$this->getGeneralConfig('show')) {
         return;
     }
     if (!$this->getConfig('enable_categorybrand')) {
         return;
     }
     //die("sssssss");
     $my_template = $this->getTemplate();
     if (empty($my_template)) {
         $my_template = 'ves/brand/cmenu.phtml';
     }
     $brand_id = Mage::registry('brand_id');
     $this->assign('config', $this->_config);
     //echo $my_template;
     $this->setTemplate($my_template);
     //die;
     /* End init meida files */
     parent::__construct();
 }
コード例 #6
0
ファイル: Scroll.php プロジェクト: adrienManikon/iPong
 protected function _toHtml()
 {
     $this->_show = $this->getGeneralConfig("show");
     $enable_scroll = $this->getConfig("enable_scrollmodule");
     $limit = (int) $this->getConfig('itemvisiable');
     $filter_group = $this->getConfig('filter_group');
     if (!$this->_show || !$enable_scroll) {
         return;
     }
     $collection = Mage::getModel('ves_brand/brand')->getCollection();
     $grouparr = explode(",", $filter_group);
     //Check if filter by brand group, if not will get all brand items
     if ($filter_group) {
         $collection->addFieldToFilter("group_brand_id", array("in" => $grouparr));
         $this->_brand_group = Mage::getModel('ves_brand/group')->load((int) $filter_group);
     }
     $collection->addFieldToFilter('is_active', 1)->setOrder('position', 'ASC');
     if ($limit) {
         $collection->setPageSize($limit);
     }
     $resroute = Mage::getStoreConfig('ves_brand/general_setting/route');
     $extension = ".html";
     foreach ($collection as $model) {
         if (!$model->getLink()) {
             Mage::getModel('core/url_rewrite')->loadByIdPath('venusbrand/brand/' . $model->getId())->setIdPath('venusbrand/brand/' . $model->getId())->setRequestPath($resroute . '/' . $model->getIdentifier() . $extension)->setTargetPath('venusbrand/brand/view/id/' . $model->getId())->save();
         }
     }
     $this->assign('brands', $collection);
     $this->assign('resroute', $resroute);
     return parent::_toHtml();
 }