Site icon Brian Prom Blog

Magento 1.x Redirect Login Form After Login

The problem is simple:

The solutions across the internet are vast and code heavy.  But this solution really only requires a simple change to your template file.

In the login template:

persistent/customer/form/login.phtml

Update the form action to include your specific redirect path.

This is what exists currently:

What I suggest is writing your redirect into a PHP variable, and then apply that to the action parameter.  Like this:

Let me explain what is happening here a bit.

 

And that’s it – simple as that.  No modules, fancy trickery, etc.  But of course remember to copy this template to your theme folder (don’t edit in the base or default directory) before making these changes.

I hope that helps someone!

Exit mobile version