override orders controller in magento

user3694236

I have a custom module Permissions_Orders. Here is my code to override orders controller from base admin -

config.xml -

<admin>   
        <routers>
            <adminhtml>
                <args>
                    <modules>
                        <orders before="Mage_Adminhtml">Orders_Adminhtml_Sales_OrderController</orders>
                    </modules>
                </args>
            </adminhtml>
        </routers> 
    </admin>

Permissions/Orders/controllers/Adminhtml/Sales/OrderController.php -

<?php
require_once 'Mage/Adminhtml/controllers/Sales/OrderController.php';

class Permissions_Orders_Adminhtml_Sales_OrderController extends Mage_Adminhtml_Sales_OrderController
{

----
}

but still it is calling from base controller. I am not sure, where I am wrong here. Any help is appreciated.

Dushyant Joshi

Your config.xml should look like below,

<config>    
    <admin>
        <routers>
            <adminhtml>
                <args>
                    <modules>
                        <orders before="Mage_Adminhtml">Permissions_Orders_Adminhtml</orders>                        
                    </modules>
                </args>
            </adminhtml>
        </routers>
    </admin>
</config>

Notice the change in </orders> node.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Magento - Override order controller

From Dev

Override Magento Contacts Controller

From Dev

Magento unable to override an action of a controller

From Dev

Magento, Override local controller with other local controller

From Dev

Cart controller override is not working in magento 1.8

From Dev

How to override cart controller coupon action in our custom module magento

From Dev

Prestashop admin orders controller

From Dev

Insert orders in Magento via SQL

From Dev

Import Orders in Magento through CSV

From Dev

Magento override core model

From Dev

Override Magento GetPrice function

From Dev

Magento Override Shipping Methods

From Dev

Magento Override Core Block

From Dev

Magento IndexController override not working

From Dev

Magento - override block

From Dev

Magento direct SQL query for coupon based orders?

From Dev

Which way do you reset magento orders?

From Dev

Adding Status Column to Customer Information -> Orders in Magento

From Dev

Cancelled Paypal orders not showing in Magento admin

From Dev

Magento does not capture orders after payment

From Dev

How to get the next order id of orders in Magento

From Dev

Apply cart rules to programmatically created orders in magento

From Dev

Where does Magento 1.1.2 store the orders in DB?

From Dev

Cannot override a magento Block in magento 1.8

From Dev

Override Topmenu.php in magento

From Dev

Cannot override block template in magento

From Dev

Magento : How to override resource file?

From Dev

magento controller not found

From Dev

Magento copy controller to local