-2

Based on my requirement I should redirect customer login page $this->_redirect('customer/account/login/');. Is it possible to redirect login page instead of index.php in magento?

thanks.

2
  • can you please update the details from where you have to do redirect.
    – Keyul Shah
    Feb 11, 2014 at 6:39
  • @KeyulShah, see updated my post. Feb 11, 2014 at 6:43

2 Answers 2

1

what i have understood is you want to redirect customer to login page if he is not logged in if that is the case than use this extension developed by bijal bhawsar, hope it will help you.

https://github.com/bijalbhavsar/Restrictpage

1
  • yes... exactly this is what I expected. thank you :). Feb 11, 2014 at 9:58
0

Just you have to add only one thing

 $this->_redirect('*/*/index');

When you put this line it will redirect to the Index page of your site.

5
  • if I want to redirect $this->_redirect('customer/account/login/'); where should I write this. Feb 11, 2014 at 6:49
  • same you ask the question it will redirect tot the account controller and call the login method
    – Keyul Shah
    Feb 11, 2014 at 6:51
  • I know redirect method description. I mean which file I should write this line of code? Feb 11, 2014 at 6:58
  • I know redirect method description. I mean which file I should write this line of code? Feb 11, 2014 at 7:14
  • you have to override the account controller and write the code in login method
    – Keyul Shah
    Feb 11, 2014 at 7:22

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.