Magento – Disable extension in one of the store views that uses same theme as others

configurationextensionslayoutmagento-1.9multistore

Is there any way to disable a third party extension for one of the store views. Since, all the store views are using same theme, I can not do it through xml file in layout folder.

Best Answer

No this option is not available in Magento.

This is because, enabling/disabling an extension can only be performed GLOBALLY. It has no dependency on stores/websites that uses in the application.

If you want to have such features, then you need to add such functionality in the extension itself. But you need a through understanding of this extension in order to do this.

For an example, add this code in the helper class of the extension.

File : Data.php of the extension.

protected $_disabledStores = array('your_store_code');

public function isModuleEnable()
{
    if (in_array(Mage::app()->getStore()->getCode(), $this->_disabledStores)) {
        return false;
    }
    return true;
}

Update your store code in which you need to disable the extension at $_disabledStores and then check

 if (!Mage::helper('extensionHelperGroupName')->isModuleEnable()) {

      return $this;
 }

in every section of the extension where you need to disable certain functionality. Hope that helps

EDIT

If you go to System > Configuration > Advanced, you can see the whole list of modules there. If you select the correct store configuration and then disble the module in store view scope, that extension will not be used in layouts. But this disbling is not a GLOBAL disabling.

But it may work in your case. Try it. Dont forget to clear cache.

Related Topic