Ejemplo n.º 1
0
 protected function _getCategoryFilter()
 {
     if (Mage::helper('gomage_navigation')->isGomageNavigation() && Mage::getStoreConfigFlag('gomage_navigation/category/active')) {
         if (!Mage::getStoreConfig('gomage_navigation/category/show_shopby')) {
             return false;
         } else {
             return parent::_getCategoryFilter();
         }
     } else {
         return parent::_getCategoryFilter();
     }
 }
Ejemplo n.º 2
0
 protected function _getCategoryFilter()
 {
     if (Mage::helper('amshopby')->isVersionLessThan(1, 4, 2)) {
         $pos = Mage::getStoreConfig('amshopby/block/categories_pos');
         if ($this->_notInBlock($pos)) {
             $this->_categoryBlockName = 'amshopby/catalog_layer_filter_empty';
             $categryBlock = $this->getLayout()->createBlock($this->_categoryBlockName)->setLayer($this->getLayer())->init();
             return $categryBlock;
         }
     }
     return parent::_getCategoryFilter();
 }
Ejemplo n.º 3
0
 protected function _getCategoryFilter()
 {
     if (Mage::helper('gomage_navigation')->isGomageNavigation()) {
         $currentCategory = Mage::registry('current_category');
         if ($currentCategory && $currentCategory->getData('navigation_pw_gn_shopby') == GoMage_Navigation_Model_Adminhtml_System_Config_Source_Shopby::USE_GLOBAL || !$currentCategory) {
             $position = Mage::getStoreConfig('gomage_navigation/general/show_shopby');
         } else {
             if ($currentCategory) {
                 $position = $currentCategory->getData('navigation_pw_gn_shopby');
             }
         }
         switch ($position) {
             case GoMage_Navigation_Model_Adminhtml_System_Config_Source_Shopby::LEFT_COLUMN:
                 if (Mage::getStoreConfigFlag('gomage_navigation/category/active') && !Mage::getStoreConfig('gomage_navigation/category/show_shopby')) {
                     return false;
                 }
                 break;
             case GoMage_Navigation_Model_Adminhtml_System_Config_Source_Shopby::RIGHT_COLUMN:
                 if (Mage::getStoreConfigFlag('gomage_navigation/rightcolumnsettings/active') && !Mage::getStoreConfig('gomage_navigation/rightcolumnsettings/show_shopby')) {
                     return false;
                 }
                 break;
             case GoMage_Navigation_Model_Adminhtml_System_Config_Source_Shopby::CONTENT:
                 if (Mage::getStoreConfigFlag('gomage_navigation/category/active') && !Mage::getStoreConfig('gomage_navigation/category/show_shopby') || Mage::getStoreConfigFlag('gomage_navigation/rightcolumnsettings/active') && !Mage::getStoreConfig('gomage_navigation/rightcolumnsettings/show_shopby')) {
                     return false;
                 }
                 break;
             case GoMage_Navigation_Model_Adminhtml_System_Config_Source_Shopby::RIGHT_COLUMN_CONTENT:
                 if (!Mage::getStoreConfigFlag('gomage_navigation/rightcolumnsettings/active')) {
                     return false;
                 }
                 if (Mage::getStoreConfigFlag('gomage_navigation/rightcolumnsettings/active') && !Mage::getStoreConfig('gomage_navigation/rightcolumnsettings/show_shopby')) {
                     return false;
                 }
                 break;
             case GoMage_Navigation_Model_Adminhtml_System_Config_Source_Shopby::LEFT_COLUMN_CONTENT:
                 if (!Mage::getStoreConfigFlag('gomage_navigation/category/active')) {
                     return false;
                 }
                 if (Mage::getStoreConfigFlag('gomage_navigation/category/active') && !Mage::getStoreConfig('gomage_navigation/category/show_shopby')) {
                     return false;
                 }
                 break;
         }
         return parent::_getCategoryFilter();
     } else {
         return parent::_getCategoryFilter();
     }
 }