0092 - 313-4567341

Controller overriding in Magento

  Zahid Mughal   Oct 12, 2014   Blog   0 Comment

I have seen a lot of Magento projects are crashed due to bad approach used while developing the project. Most of the time client has asked me that my project was running on live server but when i upgrade the version of my Magento then whole project crashed. I don’t think that it is only for Magento but all the Developers use the best approach without changing the core files of libraries instead override them with the help of simple module creation.

In Magento directory structure is app/code/core/Now, most of the developers use this technique to change the core files instead of making modules in app/code/local or community. This is because they either have no idea of overriding the controllers | models | Block or they want to save the time. But such approach can run the website but it will crash your whole website anytime.

Follow the below guideline to override the controller without changing the core controller classes.


I am going to override the contact us page controller. I will not change the core files instead will make a module locally.



Refresh the cache and test the contact us form, we have override the functionality without touching the core classes. You can also use the method to copy Mag folder in the local module place and then override but this is not the actual way of development because it will also make issue.

About Zahid Mughal

Founded by Zahid Mughal in Lahore, Pakistan, MagentoGems Providing Freelancing Services to Pakistan Software Houses and International Clients (USA, UK, Australia, India, Canada) in Web Design, Web Development, Mobile Applications, Search Engine Optimization (SEO), Graphic Design and Content Writing. Our core function is to meet the needs of our clients and provide them with services of the highest quality. To offer our clients the best websites in the market, we adhere to all the set W3C international standards. These standards ensure that our clients’ sites are compatible to various browsers and smart phone applications including the iPhones.

Post a Comment

Your email address will not be published. Required fields are marked *


Delta Road, Sharif Colony Gujranwala, 52250 +92-313-4567341