Jump to content

How to redirect a user to the login page inside ajax function


Recommended Posts

Hi, i created a FrontController and im handling my ajax requests inside of it. in some case i need to redirect the user to the login page base on the ajax requests data. im using 

Quote

Tools::redirect('index.php?controller=authentication?back=my-account'); 

to redirect but it return the page content to the js success function . here my code and thank you.

 

frontController.PNG

notloginRedirect.PNG

return.PNG

Link to comment
Share on other sites

  • 7 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...