As I know there are two ways to override a controller class.
Using from/to tags in config.xml
Considering the router below, "/mymodule/checkout_cart/" will be "translated" to "/MyNameSpace/MyModule/controllers/Checkout/CartController.php" (?) --> <to>/mymodule/checkout_cart/</to> </mynamespace_mymodule_checkout_cart> </rewrite> </global>
Using 'before' keyword in config.xml
<config> <admin> <routers> <adminhtml> <args> <modules> <mynamespace_mymodule before="Mage_Adminhtml">Mynamespace_Mymodule_Adminhtml</mynamespace_mymodule > </modules> </args> </adminhtml> </routers> </admin> </config>
Can anyone explain what is the best way to override a controller or the above methodologies are using for different purposes of overriding. Any suggestions will be appreciated.
Thank you.