1

Im trying to override a admin controller in Magento CE 1.7.0.2 I have been reading forum after forum, post by post and tried almost everything I've encountered. This is how my setup looks right now

config.xml

    <admin>
        <routers>
            <adminhtml>
                <args>
                    <modules>
                        <My_Module before="Mage_Adminhtml">My_Module_Adminhtml</My_Module>
                    </modules>
                </args>
            </adminhtml>
        </routers>
</admin>

My Controller (controller path "My/Module/controllers/Adminhtml/Sales/Order/ShipmentController.php)

<?php

require_once 'Mage/Adminhtml/controllers/Sales/Order/ShipmentController.php';

class My_Module_Adminhtml_Sales_Order_ShipmentController extends Mage_Adminhtml_Sales_Order_ShipmentController {

public function indexAction() {
    Mage::log("Index");
}

public function newAction() {
    Mage::log("New");
}

public function saveAction() {
    Mage::log("Save");
}

}

?>

Am I doing something wrong or has the way of overriding controllers changed?

4

0 回答 0