Question

In magento what is the use of overriding a controller?? In java, it can be helpful to call the super class method to the sub class. So is both the overridings are same?? If so, when and where we will override the controller? I knew that magento itself provides modules at app/code/core/Mage path. So instead of this at what situations we will over ride the controllers?

I searched for the google and it shows how to override a controller and I havent find about why to override a controller in magento?

Can anyone explain me about this??

Was it helpful?

Solution

Overriding Controller it mean we can override the Magento Core Controller(app/code/core/Mage/) into Our Custom Magento Module(app/code/local/).

you can implement your custom operations While Overriding Magento Core Controller in custom modules.

Below are the reference for Magento Controller Overriding

https://stackoverflow.com/questions/6980026/override-magento-controller

Magento override controller

OTHER TIPS

Adding to the answer given by @Man kingdom
Overriding a controller avoids messing or playing with core files which magento does not likes.
Even you're overridden controller is false you have a option left to recover from default core files.
Moreover overriding a controller helps you a lot when you want to upgrade your magento version.
Following url's I always refer:
Link 1
Link 2
Hopes this helps you.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top