How to fully disable (turn off) Magento module

How to fully disable (turn off) Magento module

Although the title might sound silly and so easy, there are lot of people having difficulties with this. At first turning Magento module can be easy as going trough System Configuration > Current Configuration Scope > Advanced > Advanced > Disable Module Output. However, be very careful, this action only disables module output as it says. If your module uses, let’s say some Observer functionality to hook into some part of the system and does some overriding then those actions won’t be disabled.

To fully disable module, you need to go to module config file, like /etc/ActiveCodeline_MyModule.xml, and set it’s active parametar to false, like:

< ?xml version="1.0"?>
<config>
<modules>
<activecodeline_mymodule>
<active>false</active>
<codepool>local</codepool>
</activecodeline_mymodule>
</modules>
</config>

You made it all the way down here so you must have enjoyed this post! You may also like:

How To Connect Google Analytics 4 To Magento 2 Bojan Mareljic
Bojan Mareljic, | 35

How To Connect Google Analytics 4 To Magento 2

3 best open-source eCommerce platforms in 2021 Zrinka Antolovic
Zrinka Antolovic, | 7

3 best open-source eCommerce platforms in 2021

eCommerce Returns Management – a simple solution from the Fashion industry Zrinka Antolovic
Zrinka Antolovic, | 12

eCommerce Returns Management – a simple solution from the Fashion industry

23 comments

  1. i have already stop this type but display on front side,
    so how i can disable module ? any other way..?

  2. I’m having trouble deactivating the newsletter module. When in Magento admin I cannot edit/view any customer. Instead there’s an error message: Fatal error: Call to a member function loadByCustomer() on a non-object in /path/to/magento/app/code/core/Mage/Newsletter/Model/Subscriber.php on line 267

  3. i need to disable my module by module enable/disable select option, that enable/disable option into my module configuration , if i disable my module it control my hole module into disable. how its possible plz hell me.. thank you

  4. In magento v1.7, to disable the core module, under the app/etc/module you will find Mage_All.xml and from there you can set false

  5. @Volly:
    This method works the same way, and is native class Helper
    This method works the same way, and is native class Helper

    Mage::helper('core/data')->isModuleOutputEnabled($module_name)
  6. Well, this deffinetelly is possible to disable your module on-fly!

    1. You should create observer for controller_action_layout_load_before event.
    2. And then in observer method you should do smth like this :

    if (Mage::helper(‘core/data’)->isModuleEnabled($moduleName)) {
    $nodePath = “modules/”.$moduleName.”/active”;
    Mage::getConfig()->setNode($nodePath, ‘false’, true);
    }

    // Disable its output as well (which was already loaded)
    $outputPath = “advanced/modules_disable_output/$moduleName”;
    if (!Mage::getStoreConfig($outputPath)) {
    Mage::app()->getStore()->setConfig($outputPath, true);
    }
    Mage::app()->getCache()->clean();
    3. Thats all!

  7. oh man, thanks for this tip. Searched on google for about an hour till i found your post.
    Why is this not told in the backedn or saomewhere else.

    thank you for sharing.

    the paid j2t discount label modul messed up a clients page and he was really depreceated. since we found your page and we could finally completely disable the module.

  8. Is it possible to disable a module for a website or store view using this method? Please note, I am well aware of the enable/disable option in System >> Config >> Advanced, but I’d like to know if it’s possible to disable the module with the method described in this post.

  9. @Timo and @ Fernando
    you can make a small code-extension in the module while magentos module deactivation dont work correkt
    put:

    if(!Mage::getStoreConfigFlag('advanced/modules_disable_output/Company_ModuleName')) {
        //my module code here
    } else {
        //dont do anything (output disabled)
    }

    works in Magento 1.4.1.1

  10. Hi – I have made a modification to the admin head.phtml (on a separate theme) which is controlled by a small module that sets the theme as active when enabled. the problem is that it keeps showing even after the module output is set to disabled. Obviously I don’t want anyone to have to set false (like you mentioned here) – as It’s a bit of an inconvenient to the end user. Could anyone share some knowledge on how to fix this?

  11. hi,
    for method containing observer tasks, I covered it with this condition:

    if(!Mage::getStoreConfigFlag(‘myCompany/modulename’)) {
    //codes here
    }

    what this condition does is, returns status of the module as its disabled in admin or not.
    If its disable then my codes won’t get executed so I archive total disabled status of my module.

  12. do you have a solution to fully disable a Module just for a specific Website, Store or View? It’s a Problem I’ve been having for a while. An just disabling the output doesn’t do the trick.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <blockquote cite=""> <code> <del datetime=""> <em> <s> <strike> <strong>. You may use following syntax for source code: <pre><code>$current = "Inchoo";</code></pre>.

Tell us about your project

Drop us a line. We'd love to know more about your project.