Reputation: 681
How can I override a controller which has been overridden in the community codepool? In my case its the Mage_Contacts_IndexController
. The controller that overrides this does some stuff in the postAction
function and then calls the parent, which is Mage_Contacts_IndexController
. My override of Mage_Contacts_IndexController
does not work because of that.
Do I have to override the overriding controller in this case?
Thanks!
Upvotes: 2
Views: 385
Reputation: 941
Usually when you override an already overridden controller, your controller will get executed first only if your module is alphabetically ahead of the module that has already overridden it. For instance if your module name starts with letter "A" and previous module starts with letter "B", in this case yours will be executed first. This is because when magento finds 2 or more modules overriding same class it will go with the one which was fetched first in alphabetical order. You can try that way.
Also check this: overriding a magento block in multiple modules (and how to ignore the other ones)
Hope this helps!!
Upvotes: 2
Reputation: 7611
Codepool canonot create issue in rewrite
,there may be any issues in your module.You need to check this.
Please check this link here you have find you to rewrite controllers class
Upvotes: 1