I'm looking at a community extension called Ambassador_Affiliate, and it's doing something that I have not seen before. I'm not sure what it's doing, so I'd like to check with the community.
In config.xml
, there is...
<frontend>
<routers>
<customer>
<args>
<modules>
<Ambassador_Affiliate before="Mage_Customer">Ambassador_Affiliate</Ambassador_Affiliate>
</modules>
</args>
</customer>
</routers>
</frontend>
In Ambassador/Affiliate/controllers/AffiliateController.php
, there is…
<?php
class Ambassador_Affiliate_AffiliateController extends Mage_Core_Controller_Front_Action
{
…
}
It looks to me the Ambassador extension is adding a new controller, instead of rewriting, its own controller to the Mage_Customer
module.
If it is so, why would you do this as opposed to just defining a entirely new controller under Ambassador_Affiliate
(beside wanting to use the customer
frontname of Mage_Customer
)?
If it's not, what is it doing?