0

So this is my modules/Namespace_Module.xml content:

<?xml version="1.0"?>
<config>
    <modules>
        <Namespace_Module>
            <active>true</active>
            <codepool>local</codepool>
        </Namespace_Module>
    </modules>
</config>

This is the namespace/module/etc/config.xml content:

<?xml version="1.0"?>
<config>
    <modules>
        <Namespace_Module>
            <version>0.2.0</version>
        </Namespace_Module>
    </modules>
    <frontend>
        <routers>
            <customer>
                <args>
                    <modules>
                        <namespace_module before="Mage_Customer_AccountController">Namespace_Module_Frontend_Customer</namespace_module >
                    </modules>
                </args>
            </customer>
        </routers>
    </frontend>
</config>

and this is the namespace/module/controllers/Frontend/Customer/AccountController.php content:

<?php 
require_once Mage::getModuleDir('controllers', 'Mage_Customer').DS.'AccountController.php';
class Namespace_Module_Frontend_Customer_AccountController extends Mage_Customer_AccountController
{
    public function indexAction()
    {
        parent::indexAction();
    }
    public function editPostAction()
    {
        echo 1; exit();
    }
}

What I want to achieve when I update the my account inputs, when i click on the update button to show me the echo 1; exit(); At the moment nothing happens. What am I missing ? thx

  • You need to change codepool to codePool and before="Mage_Customer_AccountController" to before="Mage_Customer" – Renon Stewart Nov 24 '15 at 15:06
1

In your modules/Namespace_Module.xml file, try changing <codepool> to <codePool>.

  • good catch @user3661841 – Minesh Patel Nov 24 '15 at 15:10
3

Instead, you can try as:

change

<codepool>local</codepool>

to

 <codePool>local</codePool>

and

<?xml version="1.0"?>
<config>
    <modules>
        <Namespace_Module>
            <version>0.2.0</version>
        </Namespace_Module>
    </modules>
    <frontend>
        <routers>
            <customer>
                <args>
                    <modules>
                        <namespace_module before="Mage_Customer">Namespace_Module</namespace_module>
                    </modules>
                </args>
            </customer>
        </routers>
    </frontend>
</config>

And create a controller class: app/code/[codePool]/namespace/module/controllers/AccountController.php with the following code

<?php 
require_once Mage::getModuleDir('controllers', 'Mage_Customer').DS.'AccountController.php';
class Namespace_Module_AccountController extends Mage_Customer_AccountController
{
    public function indexAction()
    {
        parent::indexAction();
    }
    public function editPostAction()
    {
        echo 1; exit();
    }
}

check more info here

  • Thx for helping me , but I already tried this version and nothing changed :( – Attila Naghi Nov 24 '15 at 14:28
  • check xml file is correct and is loaded.make sure it should not include space in line <args> <modules> <namespace_module before="Mage_Customer">Namespace_Module</namespace_module> </modules> </args> – Minesh Patel Nov 24 '15 at 14:33
  • this is my xml <?xml version="1.0"?> <config> <modules> <Namespace_Module> <version>0.2.0</version> </Namespace_Module> </modules> <frontend> <routers> <customer> <args> <modules> <namespace_module before="Mage_Customer">Namespace_Module</namespace_module> </modules> </args> </customer> </routers> </frontend> </config> – Attila Naghi Nov 24 '15 at 14:35
  • I did not find any mistakes – Attila Naghi Nov 24 '15 at 14:35
  • check your log file at var/log/ is there any issue – Minesh Patel Nov 24 '15 at 14:38

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.