Synopsis
I am trying to extend an admin controller of a module, however the frontend
router and adminhtml
router share the same frontname
. I've tried so many things and none of them are working.
Extension router example
<admin>
<routers>
<AdvancedStock>
<use>admin</use>
<args>
<module>MDN_AdvancedStock</module>
<frontName>AdvancedStock</frontName>
</args>
</AdvancedStock>
</routers>
</admin>
... snip ...
<frontend>
<routers>
<AdvancedStock>
<use>standard</use>
<args>
<module>MDN_AdvancedStock</module>
<frontName>AdvancedStock</frontName>
</args>
</AdvancedStock>
</routers>
</frontend>
Attempts
Attempt 1
<admin>
<routers>
<Vendor_AdvancedStock>
<args>
<modules>
<Vendor_AdvancedStock before="MDN_AdvancedStock">Vendor_AdvancedStock</Vendor_AdvancedStock>
</modules>
</args>
</Vendor_AdvancedStock>
</routers>
</admin>
Attempt 2
<frontend>
<routers>
<Vendor_AdvancedStock>
<args>
<modules>
<Vendor_AdvancedStock before="MDN_AdvancedStock">Vendor_AdvancedStock</Vendor_AdvancedStock>
</modules>
</args>
</Vendor_AdvancedStock>
</routers>
</frontend>
Attempt 3
This was attempt 1 and attempt 2 combined.
Attempt 4
<frontend>
<routers>
<AdvancedStock> <!-- this is the original vendors tag -->
<args>
<modules>
<Vendor_AdvancedStock before="MDN_AdvancedStock">Vendor_AdvancedStock</Vendor_AdvancedStock>
</modules>
</args>
</AdvancedStock>
</routers>
</frontend>
I have even added the depends
tag and tried the above attempts with no success.
adminhtml
was wrong in my example and so i've corrected it.