Magento has a huge number of features and there are probably few businesses that will need to use all of them. If you want to disable some features completely for your site (such as the newsletter, or the tag cloud), you can do this easily through the administration options.

System > Configuration > Advanced > Disable module output

Find the module that you want to disable and select ‘Disable’ from the drop-down box. For example, if you want to disable the newsletter feature the config will look as follows.

Disable newsletter module

Disable newsletter module

Save the settings, clear your cache, and the feature should be disabled.

It is still possible that some parts of your site refer to the disabled feature. For example, if after disabling the Mage_Newsletter module you still see HTML that is related to the newsletter, it means that that HTML bit was not generated through the Mage_Newsletter module and so you will have to remove it manually from the template.

Disabling modules only in one store

This applies to multi-store setups. As with any other configuration option, you can use the configuration scope box at the top left of the System > Configure page to define whether you want to make your changes for all stores or only for one store.

Configuration scope

Configuration scope

Select an option from the drop-down box before you save the settings that disable the module. The ‘Default Config’ option applies the changes to all stores that do not override the setting explicitly. To disable the module only for one store select that store from the drop-down box.

How do I find out the name of the module I want to disable?

In the case of the newsletter feature the name of the module to disable is clear (Mage_Newsletter), but here’s what you can do if you can’t figure out the module name that easily. If the module outputs html for the template, you can look at the block name of the html output. The first part of this name should be the same as the module name (this has been true for all the modules I’ve checked so far) . For example, the block Mage_Tag_Block_Popular is output by the module Mage_Tag.  The rest of this post explains how to display block names in the template.

Here’s how you get Magento to display the names of the html blocks. In your development environment, select one of your stores in the Current Configuration Scope box (see above). Then go to:

System > Configuration > Developer > Debug

Enable the Template Path Hints and Add block names to hints.

template-path-hints-config

Now access a page that contains the module you want to disable. You should see the block names written in blue around the html elements that belong to that block. For example, the sidebar of my product listing page contains the newsletter sign-up elements and the tag cloud. The block names for these elements are Mage_Tag_Block_Popular and Mage_Newsletter_Block_Subscribe. The first part of these two names ‘Mage_Tag’ and ‘Mage_Newsletter’ correspond to the module name that output these blocks. If the blue names do not appear over the red box, move your mouse over the box and you should see the blue name appear.

magento-block-debug

Note: Disabling a module will not only remove the HTML output of the module, but also all functionality associated with it. So, for example if you disable the Mage_Newsletter module and you have customers who are already signed up for the newsletter, you will be unable to send them emails. If you just want to remove HTML elements you should modify the template, instead of disabling modules.

This article has 7 comments

  1. Isaac Earl

    Thanks for your tutorial, I found this helpful… I disabled Mage_Core just for some testing, and realized to late that this made it impossible to re-enable it. When I disabled it, it basically removed all the functionality of the admin panel so now I can’t go to advanced -> .. if you know how to manually re-enable modules through the file system it would really help me out.

    Thanks,
    Isaac

  2. monica

    Ouch…
    I think you can reenable the module by manually updating the table in the database that stores the configuration. That table is called core_config_data.

    select path, value from core_config_data where path like ‘%Mage_Core%’;

    For me this returns a value of 0 because the module is not disabled (I’m using the double negative on purpose). Your value will probably be 1 because the module is disabled. So set it back to 0.

    +——————————————-+——-+
    | path | value |
    +——————————————-+——-+
    | advanced/modules_disable_output/Mage_Core | 0 |
    +——————————————-+——-+

    You can use a similar approach to enable other modules too. Good luck! Tell me if it worked for you.

  3. Cobay

    Module Output function is not work!!
    why?
    configuration is managed to two area.
    one area is app/etc/modules/[mymodule].xml
    and another area is core_config_data table of magento database.

    [mymodule].xml was modified, but realtime does not update core_config_data’s configuration data.
    or
    core_config_data’s configuration data was modified, but
    realtime dows not update [mymodule].xml.
    The fundamental problem is to above two area is realtime not synchronized.
    It is fraught with potential bugs.

    Therefore, MAGENTO’s SYSTEM is Big Bug System.
    System Design of DBA Varien is Bullshit.

  4. Masud Rana

    I have successfully installed BankPayment via magento connect. Now i can’t see the module in admin or frontend, I am new in Magento, can you help me how can I active this module.

Leave a Reply

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