When i edit my account information in "customer/account/edit", after submits it goes to my account page. I need the form to stay in same page after submitting and saving information. In my module config.xml i made a redirect:


Then in Model -> Observer -> Customer.php i have the function:

   public function editRedirect(Varien_Event_Observer $observer){
      $url = Mage::getUrl('sales/order/history');
      return $this;

If i change




it redirects account edit page into sales history. But what i want to redirect is after form submits. I'm also trying to redirect my account inital page "customer/account" to "sales/order/history" page, but this method it's not working when i put controller_action_postdispatch_customer_account.

Any ideas?

2 Answers 2


You have to simply rewrite a app/code/core/Mage/Customer/controllers/AccountController.php, editPostAction() in your local codePool, then change this :

try {
         ->addSuccess($this->__('The account information has been saved.'));


    try {
             ->addSuccess($this->__('The account information has been saved.'));

Then after submit, he save a new data and return the same page.

  • It's not working. I tried before editing the AccountController.php in app/code/local/Mage/Customer/controllers/AccountController.php but for some reason it doesn't redirect. It's like the file is being overriden by another file/extension. I already tried searching in plugins/modules without success. Aug 29, 2017 at 10:15
  • Ah Ok, the solution works i tried it and i confirm, however if you have rewrited it, you have to find it in your app/code/local or community if you have installed an extension.
    – PЯINCƎ
    Aug 29, 2017 at 10:28

Why controller_action_postdispatch_customer_account_editPostAction not worked

In order to understand the why controller_action_postdispatch_customer_account_editPostAction is not worked then You should check Mage_Core_Controller_Varien_Action's at method dispatch($action)

In magento, there are all the events by application defined and at every page dispatch there are few events call automatically like

Mage::dispatchEvent( 'controller_action_postdispatch_'.$this->getFullActionName(), array('controller_action'=>$this) );

As per as this logic,magento is create an event controller_action_postdispatch_customer_account_edit on customer/account/edit's postdispatch().

The full Action name of this URL is customer_account_edit .$this->getFullActionName() give this fullaction Name of this url.

As we know that customer/account/edit mean routername/ActioName/Actionname

  • Route name is customer As frontend name customer

  • Controller file is AccountController.php that why Action name account

  • Action Method is editAction() that why Action name edit


So, it editaccountinfo's event name is


"customer/account" is event name is


  • This redirect worked. Only problem is keeping session messsages like success messages. BTW, thanks for the explanation. :) Aug 29, 2017 at 10:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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