I have searched and implemented many answers from stackoverflow but I am not able to override the controller. The question is quite self-explanatory but I will provide the codes to show what I am doing. Maybe someone can guide me in the right direction:
This is my directory structure
This is my config.xml
inside etc
folder.
<?xml version="1.0"?>
<config>
<modules>
<Zepcom_Checkout>
<version>0.0.1</version>
</Zepcom_Checkout>
</modules>
<frontend>
<routers>
<checkout>
<args>
<modules>
<Zepcom_Checkout before="Mage_Checkout">Zepcom_Checkout</Zepcom_Checkout>
</modules>
</args>
</checkout>
</routers>
</frontend>
And this is my controller
require_once 'Mage/Checkout/controllers/OnepageController.php';
class Zepcom_Checkout_OnepageController extends Mage_Checkout_OnepageController {
public function indexAction() {
var_dump("custom"); die;
}
.
. // some overriding code here
.
}
I am really stuck and any help would be appreciated. I am doing a dump to verify the calling of the controller but it keeps calling the Core
controller.
2
Answers
You will need to declare a router “routeurfrontend” which is actually the route used by Magento to access your controller.
You are missing the
</config>
closing tag in your config.xml