Could someone help me with the following issue I have with a module? I've been stuck for a couple of hours and could do with a fresh perspective.

I have two modules ModuleA and ModuleB which both extend the same Onepage_Checkout class using rewrites. I've almost solved the issue of the rewrite but I have run into two issues.

The first is that ModuleA and ModuleB both add a step to Onepage Checkout. Each additional step is visible but for some reason, ModuleB is skipped and doesn't become active.

The second is I need to add an option to disable or enable ModuleA per store/website

I've added this code to the system.xml file but it doesn't seem to work

<enable translate="label">

Do I need to alter the DB table in any way or is there something else that I have missed?

Also, if I disable ModuleB for StoreA and disable ModuleA for storeB due to dependencies will they both still be active in either store? The reason I ask is I need to have the flexibility to enable or disable each module per store and not have them both active...

Can anyone assist? I really appreciate it...

1 Answer 1


There is no connection between any config setting and your module unless you evaluate that setting in PHP.

Once upon a time there were two extensions which everyone installed on their Magento site: Fooman_Speedster and Yoast_CanonicalUrl. Both rewrote the Mage_Page_Block_Html_Head class, so both authors had instructions on how to handle this. Because Yoast's extension loaded after Fooman's (Y > F), Yoast came up with a workaround which helped most people who were installing the extensions via Connect and had no ability to work with the code.

In Yoast/CanonicalUrl/Block/Head:

if (!(string)Mage::getConfig()->getModuleConfig('Fooman_Speedster')->active == 'true')
  class Fooman_Speedster_Block_Page_Html_Head extends Mage_Page_Block_Html_Head{}
  class Yoast_CanonicalUrl_Block_Head extends Fooman_Speedster_Block_Page_Html_Head
     //Yoast's class definition...

This suggests an approach for you. You will need to read store-relative values though


and handle condition combinations where the other module is active or not.

  • Thanks for posting that, preemptive extension of a module you might have load beside yours, something I've been needing. And if you decide to remove the other module, it reverts... Which I was looking for. May 21, 2013 at 14:08
  • 1
    The good old days before you could use Mage::helper('core')->isModuleEnabled('Fooman_Speedster') to check for an active module May 21, 2013 at 14:15

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.