Jump to content

[Solved] Redirect to contact page after login ps 1.6


PS newbi

Recommended Posts

Hello

 

I am trying to redirect my customers to the contact page, if they already have orders with status payment accepted.

I have tried the below override in authcontroller.php, but it is not working. What am i doing wrong? 

I am new to prestashop.

 

class AuthController extends AuthControllerCore
 
 
protected function processSubmitLogin()
{
 
if ($order_history.id_order_state == 2)
    Tools::redirect('index.php?controller=contact');
 
}
Edited by PS newbi (see edit history)
Link to comment
Share on other sites

hi

pls change following i got result and what page want redirect to change hilighted, i used (ps v1.6.14)

file path(controller/front/AuthController.php -- line 317)

 

 

if (!$this->ajax && $back = Tools::getValue('back'))

{

if ($back == Tools::secureReferrer(Tools::getValue('back')))

Tools::redirect(html_entity_decode($back));

 

$back = $back ? $back : 'my-account';

Tools::redirect('index.php?controller=contact'/*.(($this->authRedirection !== false) ? urlencode($this->authRedirection) : $back)*/);

}

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