0

I am Trying to override magento controller but no luck

Here is my config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Ktpl_Custom>
            <version>0.1.0</version>
        </Ktpl_Custom>
    </modules>
    <frontend>
        <routers>
            <invitation>
                <args>
                    <modules>
                        <Ktpl_Custom before="Enterprise_Invitation">Ktpl_Custom</Ktpl_Custom>
                    </modules>
                </args>
            </invitation>
        </routers>
    </frontend>
    <global>
        <helpers>
            <custom>
                <class>Ktpl_Custom_Helper</class>
            </custom>
        </helpers>
    </global>
</config>

app/etc/module.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Ktpl_Custom>
            <active>true</active>
            <codePool>local</codePool>
            <depends>
                <Enterprise_Invitation/>
            </depends>
        </Ktpl_Custom>
    </modules>
</config> 

app/code/local/Ktpl/Custom/controllers/Customer/AccountController.php

require_once(Mage::getModuleDir('controllers','Enterprise_Invitation').DS.'Customer/AccountController.php');

class Ktpl_Custom_Customer_AccountController extends Enterprise_Invitation_Customer_AccountController
{
    protected function _loginPostRedirect()
    {
        echo "string";
        die;

    }
}

If anyone have idea what wrong with this code

  • Have u check compiler is enable? – Amit Bera Mar 28 '17 at 9:37
  • Compiler Status Disabled – Vaibhav Ahalpara Mar 28 '17 at 9:38
  • also i check Enterprise_Invitation_Customer_AccountController class also not working cause by some other module override AccountController so i can't able to override Enterprise_Invitation_Customer_AccountController – Vaibhav Ahalpara Mar 28 '17 at 10:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.