2

I have added the log in form to a custom page that I want customers to be able to log in from. It currently looks like this in the layout file

   <block type="customer/form_login" name="customer_form_login" template="customer/form/login.phtml"/>

and is called from the phtml like this

   <?php echo $this->getChildHtml('customer_form_login') ?>

After a user submits this I'd prefer if it didn't redirect anywhere. I know I could stop this happening from it's controller but I don't want to change how it behaves all over the website. Is there a way I can stop it redirecting from the layout file where I reference it in my custom block. This would allow me to achieve my goal of no redirect in the custom page but standard behaviour throughout the rest of the site.

0

Thomas,you use this layout code of specific layout,then goto this controllers and this controller particular action

add below code controller action

 Mage::getSingleton('customer/session')->setBeforeUrl($this->_getRefererUrl());

example:

public function myindexAction() is action

then add below start of this function

 Mage::getSingleton('customer/session')->setBeforeUrl($this->_getRefererUrl());
|improve this answer|||||

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.