Home » Magento16 March 2010

Magento: Admin Controller Override

I had to override adminhtml controller class (Mage_Adminhtml_System_ConfigController) with my module’s controller class (MyNamespace_MyModule_ConfigController).

It was really tough to find the right solution. I googled, searched in magentocommerce forum and found a lot of solutions. But they didn’t work for me.

After searching & trying more, I got some work done with the following piece of code:-

But this gave “404 Error Page not found” when I go to System->Configuration.

Finally, I did the controller override with the following code:-

Hope this helps. Thanks.

Magento

Get New Post by Email

Find me on

FacebookTwitterGoogle+LinkedInRSS Feed
  • pranay

    Gr8 solution…
    I also suffered by this issue..
    Thanks for the better and right answer.

  • pranay

    Hello Friendz Mukesh,

    This is a nice tutorial..
    for me it working fine in Magento1.4.0.1
    but the same code i m using for Magento version 1.3.2.4
    it’s not working here..

    Please help and suggest me If i was wrong!!!!

  • Aftabnaveed

    it is not working for me :-( I am using 1.4.0.1

  • Tudz

    could you be more explicit with

    /mymodule/config/

    what’s ‘mymodule’ ? is it ‘Adminhtml_System’, ‘system’ or ‘adminhtml’ ?
    could you paste your config.xml?

    and to register the module i used:
    /etc/modules/[namespace]_all.xml

    true
    local

    is this correct?

  • By “mynamespace”, I mean to say the Namespace you are using for your module.
    By “mymodule”, I mean the name of your Module.

    like.. if you have app/code/local/Apple/Paypal

    thne, Apple is your namespace and Paypal is your module name.

    so.. mynamespace = apple
    and.. mymodule = paypal

    Thanks.

  • derhecht

    Thx. The underscore in the routers reference solved my problem.

  • Dominik

    How to override Mage_Adminhtml_Sales_Order_InvoiceController?