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:-
<global> <routers> <adminhtml> <rewrite> <system_config> <to>MyNamespace_MyModule/config</to> <override_actions>true</override_actions> <actions> <save> <to>MyNamespace_MyModule/config/save</to> </save> <index> <to>MyNamespace_MyModule/config/index</to> </index> </actions> </system_config> </rewrite> </adminhtml> </routers> </global>
But this gave “404 Error Page not found” when I go to System->Configuration.
Finally, I did the controller override with the following code:-
<global> <rewrite> <mynamespace_mymodule_config> <from><![CDATA[#^/admin/system_config/#]]></from> <to>/mymodule/config/</to> </mynamespace_mymodule_config> </rewrite> </global>
Hope this helps and thanks for reading.
Related posts:
- Magento: Block Controller Model Helper Override
- Magento: How to change Currency symbol by Model Override ?
- Magento: How to get controller, module, action and router name?
- Magento: Access denied in admin of custom module
- Magento: Authorize.net not displayed in Payment Information section while Checkout
- Magento: How to remove or rename ‘Add New’ button from Admin Grid?
- Magento Admin login problem
- jQuery: Grey out background and preview image as popup
- Magento: How to change Admin URL Path?
- Magento: Solution to “Error: 404 Not Found” in Admin Login Page
