In this tutorial we learn how to override controller.

To override controller we need to create a basic module structure (to know more about module creation click here). In our below code we have Hello module that will override Product view controller.

Create di.xml file in Folder ArpitK/Hello/etc
   our complete path is app/code/ArpitK/Hello/etc/di.xml

Now we need to create view.php controller file in ArpitKHelloControllerRewriteProduct




Leave a Reply

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