1

I am adding a tab in product page in admin. I want to check module is enable or not before adding tab from xml.

System -> Configuration -> Advanced

Only in case of module enable then we want to add some xml to include. but in case of writing ifconfig we are getting true if module enable.

is there any else condition for that ?

3 Answers 3

1

System -> Configuration -> Advanced is just for showing the module output or not. Even "disable" module on thispage, the module still run on background.

To truly disable a module, you should go to app/etc/modules/Module_Name.xml and set active to false. So that:

<active>false</active>

If you want to add dependency inside a module, you can add the following code:

<depends>
      <Module_Name />
</depends>
0

Right way to disable any module from xml file. You need to change in app/etc/modules/module_name.xml change "true" to "false" in active tag.

1
  • <active>true</active> to <active>false</active> Nov 12, 2016 at 9:44
0

Using your tab interface Mage_Adminhtml_Block_Widget_Tab_Interface allows you to control the display via the method canShowTab.

public function canShowTab()
{
    return Mage::helper('Core')->isModuleEnabled('Vendor_Module');
}
1
  • How we call this method in xml to check module enable or not so that I can include the file on that basis ? Nov 18, 2016 at 11:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.