سؤال

I tried rewrite catalog_product_review controller in admin but failed. I'm not aware of problem. Does anyone know problem maybe help me?

Thanks

config.xml:

<config>
    <modules>
        <Hn_Mymodule>
            <version>0.1.0</version>
        </Hn_Mymodule>
    </modules>
     <admin>
        <routers>
            <adminhtml>
                <args>
                    <modules>
                        <mymodule before='Mage_Adminhtml'>Hn_Mymodule</mymodule>
                    </modules>
                </args>
            </adminhtml>
        </routers>
    </admin>
</config>

Hn/Mymodule/controllers/Adminhtml/Catalog/Product/ReviewController.php

require_once 'Mage/Adminhtml/controllers/Catalog/Product/ReviewController.php';

class Hn_Mymodule_Adminhtml_Catalog_Product_ReviewController extends Mage_Adminhtml_Catalog_Product_ReviewController{

    public function indexAction()
    {
        echo "test index";
    }

    public function saveAction()
    {
        echo "test save";
    }

}
هل كانت مفيدة؟

المحلول

The problem is with this line

<mymodule before='Mage_Adminhtml'>Hn_Mymodule</mymodule>

It should be

<mymodule before='Mage_Adminhtml'>Hn_Mymodule_Adminhtml</mymodule>
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى magento.stackexchange
scroll top