1

I can't override another third party module:

I tried either of these but no success:

<admin>
    <routers>
        <thirdparty>
            <args>
                <modules>
                    <my_filedownloads before="ThirdParty_Adminhtml">My_FileDownloads_Adminhtml</my_filedownloads>
                </modules>
            </args>
        </thirdparty>
        <adminhtml>
            <args>
                <modules>
                    <my_filedownloads before="Mage_Adminhtml">My_FileDownloads_Adminhtml</my_filedownloads>
                </modules>
            </args>
        </adminhtml>
    </routers>
</admin>
2

You're almost there:

<admin>
    <routers>
        <adminhtml>
            <args>
                <modules>
                    <my_filedownloads before="ThirdParty_Adminhtml">My_FileDownloads_Adminhtml</my_filedownloads>
                </modules>
            </args>
        </adminhtml>
    </routers>
</admin>

Explanation: You add your router to the same front name as the other module (adminhtml) but your namespace should be used before the one of the other module (ThirdParty_Adminhtml)

So in the end, the priority is:

  1. MyFileDownloads_Adminhtml
  2. ThirdParty_Adminhtml
  3. Mage_Adminhtml

(actually with other modules in between that you don't care about because they will contain different controllers)

  • Hey your above answer is not usefull.For third part overide you will use third party module name instead <Adminhtml> – Sourav Mar 17 '15 at 19:27
  • No you don't use the module name but the name of the router. And if the third party module added a controller to the adminhtml router, which is how I understand the question, this is adminhtml. – Fabian Schmengler Mar 17 '15 at 19:31
  • Hi I have practically implemented on Dicove theme – Sourav Mar 17 '15 at 19:37
  • I see, in your case the router was banner7. The question doesn't state it explicitly but that OP tried to use before="Mage_Adminhtml" suggests that it is about an Adminhtml controller within the adminhtml router of the third party module. – Fabian Schmengler Mar 17 '15 at 19:44
  • Brother I have overide the Adminhtml controller not frontend controller.For you knowledge when we code under <admin><router> .... it means we are overideing Adminhtml controller. – Sourav Mar 17 '15 at 19:48
0
   
       <banner7>
                <args>
                    <modulesv
                        <Sourav_Jain before="Magentothem_Banner7">Sourav_Jain</Sourav_Jain>
                    </modules>
                </args>
            </banner7>



I have override the thirs party extension(Magentothem_Banner7) controller using above code. Magentothem_Banner7 this is third extenson and Sourav_Jain is my custom module

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.