Jump to content
squivo

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?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More