Jump to content

Controller redirect to login screen not working


Recommended Posts

Hey there y'all.  This is my first post here. I come from a CodeIgniter, Node and Wordpress background.   I am currently trying to sort out a Controller and redirect issue with an addon that I have purchased and since modified. The issue is this. If you attempt to visit this page when not logged in (http://ejuice.dreamhosters.com/en/quickorder) I would like the visitor to be redirected to the login page here http://ejuice.dreamhosters.com/en/login?back=my-account.  Currently there is no redirect happening and the 404 page is listed.

From what I understand in the Prestashop docs for 1.7.5, simply adding 

public $auth = true

To the ModuleFrontController should do the trick... But it's not working.  From what I can tell, the controller is not even firing while logged out (it works when I'm logged in).  Now another factor that might be causing the issue is that I have locked the store so that only Customers can access the Cart (No Guest or Visitors), but I've hit a bit of a wall in terms of understanding the flow of the controllers.  Anyone know where I should start looking next or what the issue might be?

Link to comment
Share on other sites

  • 3 weeks later...

The lack of participation and convenient useful knowledge in this forum is going to be the death of Prestashop. 

I had to override the main Controller and add my own route inside of it to get this working. 

 

  • Thanks 1
Link to comment
Share on other sites

  • 4 months later...
On 5/22/2019 at 8:47 PM, squivo said:

The lack of participation and convenient useful knowledge in this forum is going to be the death of Prestashop. 

I had to override the main Controller and add my own route inside of it to get this working. 

 

can you explain what you did? i have the same problem

Link to comment
Share on other sites

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...