spk Posted September 2, 2015 Share Posted September 2, 2015 (edited) Hej folks, I'm trying to create a feature to redirect a new user that is a retailer to a specific CMS-page. I have created a function in AuthController.php to set the customer to inactive (also sets group id to 4) by default. The retailer uses the create account function using a specific link containing ?retail=1. By doing this i use a script on the login#create_account that check a hidden input field (name="retail") and set it to value 1. All going fine this far, a retail account is created and it is set to inactive by default. But when the retailer clicks on "Create account" he will only get sent to the login page again. I would like to add something like login?retail=1&success=1 and if success = 1 in the URL i'll show a message containing some information useful for the retailer. I have been trying to modify both FrontController.php and AuthController.php, and when I try using the hidden post variable if ($_POST['retail'] == '1') nothing happens. But if I don't use the if statement it works. I've tried this on line 702 in the AuthController.php. Right under the commented string: // if register process is in two steps, we display a message to confirm account creation if ($_POST['retail'] == '1') { $linkToRedirect = $this->context->link->getCMSLink(19); Tools::redirect($linkToRedirect); } Anyone got an idea how to solve this? Regards, spk Edited September 2, 2015 by spk (see edit history) Link to comment Share on other sites More sharing options...
spk Posted September 4, 2015 Author Share Posted September 4, 2015 Anyone got an idea how to do it? Link to comment Share on other sites More sharing options...
spk Posted September 8, 2015 Author Share Posted September 8, 2015 Nobody? Link to comment Share on other sites More sharing options...
Nervus70 Posted June 8, 2016 Share Posted June 8, 2016 Hi Sorry I have no answer for you. But I'm facing the same problem. Have you found a solution? If yes can you tell me witch one please? I just want to redirect and/or show a message after registration (I disable the account also after registration) . But prestashop force to be on the login or registration page... Really annoying Thank you Link to comment Share on other sites More sharing options...
OvErRiDe007 Posted June 11, 2016 Share Posted June 11, 2016 Did any of you find the solution for this? I'm having the same problem. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now