Magento: Admin Controller Override

Consideration: MyNameSpace = PG and MyModule = Deletecc
Note:1:We are taking example of OrderController.php of \app\code\core\Mage\Adminhtml\controllers    \Sales.
         2:This Module is applicable for Magento-1.4.0.x

Create Your own module and files as follows:

Now Edit config.xml :
Go to Magento/app/code/local/PG/Deletecc/etc/config.xml and paste the following xml code into it

Edit /controllers/Sales/OrderController.php:
Paste the following php code into Magento/app/code/local/PG/Deletecc/controllers/Sales/OrderController.php (the only change we’re doing to the indexAction() is adding an error_log() message):

Edit Magento/app/etc/modules/PG_Deletecc.xml
Add the below code to  enable the your module.

That's It..

Magento: Admin Controller Override Magento: Admin Controller Override Reviewed by Web Technology Funda on 5:51:00 AM Rating: 5

1 comment

  1. Your page is so fantastic!The code which you presented in blog its not getting..I will try to hang for next post.i must appreciate your efforts on posting these information..Magento Themes


Free! Free!Free! Subscribe to Get Free PHP (Magento) tutorial Update in Your Inbox!!! Hurry Up!!!