I'm busy working though Grokking Magento by Vinai Kopp, and reached a part where he explains where he explains how to rewrite requests to (eg) the
checkout/cart controller, and he gives an example of the config.xml, like this:
<!-- global only (not frontend or adminhtml) --> <global> <routers> <!-- route name --> <checkout> <rewrite> <!-- controller name --> <cart> <!-- rewrite all controller actions --> <override_actions>false</override_actions> <to>example/special_cart</to> </cart> </rewrite> </checkout> </routers> </global>
This all seems straightforward enough, except that I have recently also watched the TutsPlus Magento Fundamentals videos, where they take you through an example of overwriting a controller, and their config.xml looks completely different eg:
<frontend> <routers> <catalog> <args> <modules> <Envato_Catalog before="Mage_Catalog">TutsPlus_Demo</Envato_Catalog> </modules> </args> </catalog> </routers> </frontend>
This is also pretty straightforward, but my problem here is that these 2 very different configs doing (seemingly) the same thing - could anyone please shed some light on this situation for me? I am trying to get the hang of Magento and this one is confusing me a LOT!