Question

i need to override community controller with my extension controller in local. Here is path for community controller class.

app\code\community\Unirgy\DropshipPo\controllers\Adminhtml\Order\PoController.php

here is config.xml for community module.

<admin>
    <routers>
        <udpoadmin>
            <use>admin</use>
            <args>
                <module>Unirgy_DropshipPo_Adminhtml</module>
                <frontName>udpoadmin</frontName>
            </args>
        </udpoadmin>
    </routers>
</admin>

Code in my config.xml is as

           <admin>             
                 <routers>
        <udpoadmin>
            <args>
                <modules>
                    <Guru_Parallelpaypalcheckout before="Unirgy_DropshipPo_Adminhtml">Guru_Parallelpaypalcheckout</Guru_Parallelpaypalcheckout>
                </modules>
            </args>
        </udpoadmin>
                 </routers>
           </admin>

My code is not working and controller is not overidden.

Thanks in advance.

Was it helpful?

Solution

    <admin>
        <routers>
            <udpoadmin>
                <args>
                    <modules><!-- write next node in one line -->
                        <guru_parallelpaypalcheckout before="Unirgy_DropshipPo_Adminhtml">Guru_Parallelpaypalcheckout_Adminhtml</guru_parallelpaypalcheckout>
                    </modules>
                </args>
            </udpoadmin>
        </routers>
    </admin>

And your controllers should be same path with original in module:

local\Guru\Parallelpaypalcheckout\controllers\Adminhtml\Order\PoController.php

Clear the cache, disable compilation mode.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top