i’ve been trying to override the checkout controller from a community extension for 2 hours, and still not working.
My Custom module is activated .
Trying to rewrite (Community/Manv/Ajaxcoupon/controllers/Indexcontroller.php)
Here is my controller.
require_once 'Manv/Ajaxcoupon/controllers/IndexController.php';
class Name_Promocode_CartController extends Manv_Ajaxcoupon_IndexController
{
public function customcouponPostAction(){
die('custom');
}
public function couponPostAction()
{
die('We are in');
}
Here is my config.xml
<?xml version="1.0"?>
<config>
<modules>
<Name_Promocode>
<version>1.0.0</version>
</Name_Promocode>
</modules>
<frontend>
<routers>
<checkout>
<args>
<modules>
<Name_Promocode before="Manv_Ajaxcoupon">Name_Promocode</Name_Promocode>
</modules>
</args>
</checkout>
</routers>
</frontend>
</config>
Deleted cache…
Can’t find what’s wrong, when i put a die() in the community module, i see it. But seems like my module isn’t overriding anythings.
3
Answers
Finally made it works with this config.xml
Hope this will help someone :D
// Try compare with below config.xml code.
//Alternate override controller code.
//compare controller code.
More reference
Alternate override controller link
Try this out: