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:
<frontend>
<events>
<controller_action_postdispatch_customer_account_editPostAction>
<observers>
<customerredirect>
<class>customerredirect/observer_customer</class>
<method>editRedirect</method>
</customerredirect>
</observers>
</controller_action_postdispatch_customer_account_editPostAction>
</events>
</frontend>
Then in Model -> Observer -> Customer.php i have the function:
public function editRedirect(Varien_Event_Observer $observer){
$url = Mage::getUrl('sales/order/history');
Mage::app()->getResponse()->setRedirect($url);
return $this;
}
If i change
controller_action_postdispatch_customer_account_editPostAction
into
controller_action_postdispatch_customer_account_edit
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?