예제 #1
0
파일: Config.php 프로젝트: onepica/avatax
 /**
  * Init modules configuration
  *
  * @return $this
  * @throws Mage_Core_Exception
  */
 protected function _initSectionsAndTabs()
 {
     if ($this->_getConfigHelper()->isAvaTaxDisabled()) {
         $this->_getDataHelper()->isAvatax16() ? $this->_addCustomConfig(array('system-disabled.xml', 'system-avatax16-disabled.xml')) : $this->_addCustomConfig(array('system-disabled.xml'));
     } else {
         $this->_getDataHelper()->isAvatax16() ? $this->_addCustomConfig(array('system-avatax16.xml')) : parent::_initSectionsAndTabs();
     }
     $this->_initPluginVersion();
     return $this;
 }
예제 #2
0
 protected function _initSectionsAndTabs()
 {
     if (Mage::helper('advanced')->isAnyStoreDisabled()) {
         $mergeConfig = Mage::getModel('core/config_base');
         $config = Mage::getConfig()->loadModulesConfiguration('system.xml');
         //these 4 lines are the only added content
         $configFile = Mage::helper('advanced')->getEtcPath() . DS . 'system-disabled.xml';
         $mergeModel = new Mage_Core_Model_Config_Base();
         $mergeModel->loadFile($configFile);
         $config = $config->extend($mergeModel, true);
         $this->_sections = $config->getNode('sections');
         $this->_tabs = $config->getNode('tabs');
     } else {
         return parent::_initSectionsAndTabs();
     }
     return parent::_initSectionsAndTabs();
 }
예제 #3
0
파일: Config.php 프로젝트: shabirm/avatax
 /**
  * Init modules configuration
  *
  * @return $this
  * @throws Mage_Core_Exception
  */
 protected function _initSectionsAndTabs()
 {
     if ($this->_getDataHelper()->isAvaTaxDisabled()) {
         $config = Mage::getConfig()->loadModulesConfiguration('system.xml')->applyExtends();
         Mage::dispatchEvent('adminhtml_init_system_config', array('config' => $config));
         //these 4 lines are the only added content
         $configFile = $this->_getDataHelper()->getEtcPath() . DS . 'system-disabled.xml';
         /** @var Mage_Core_Model_Config_Base $mergeModel */
         $mergeModel = Mage::getModel('core/config_base');
         $mergeModel->loadFile($configFile);
         $config = $config->extend($mergeModel, true);
         $this->_sections = $config->getNode('sections');
         $this->_tabs = $config->getNode('tabs');
     } else {
         parent::_initSectionsAndTabs();
     }
     return $this;
 }