trakinage Posted April 17, 2018 Share Posted April 17, 2018 (edited) How can I have on the same login page (in PS 1.7), the login and registration form side by side as in the next image ? Edited April 17, 2018 by trakinage (see edit history) Link to comment Share on other sites More sharing options...
silvervian Posted February 10, 2020 Share Posted February 10, 2020 u need configure the AuthController.php, remove the if statment in initContent(). Should look like this public function initContent() { $should_redirect = false; $login_form = $this->makeLoginForm()->fillWith( Tools::getAllValues() ); $register_form = $this ->makeCustomerForm() ->setGuestAllowed(false) ->fillWith(Tools::getAllValues()); if (Tools::isSubmit('submitLogin')) { if ($login_form->submit()) { $should_redirect = true; } } if (Tools::isSubmit('submitCreate')) { $hookResult = array_reduce( Hook::exec('actionSubmitAccountBefore', array(), null, true), function ($carry, $item) { return $carry && $item; }, true ); if ($hookResult && $register_form->submit()) { $should_redirect = true; } } $this->context->smarty->assign([ 'login_form' => $login_form->getProxy(), 'register_form' => $register_form->getProxy(), 'hook_create_account_top' => Hook::exec('displayCustomerAccountFormTop'), ]); $this->setTemplate('customer/authentication'); and then add to authenthication.tpl this line and you can style this like u want {render file='customer/_partials/customer-form.tpl' ui=$register_form} 1 1 Link to comment Share on other sites More sharing options...
Mian Waqas Posted May 14, 2021 Share Posted May 14, 2021 On 2/10/2020 at 5:51 PM, silvervian said: u need configure the AuthController.php, remove the if statment in initContent(). Should look like this public function initContent() { $should_redirect = false; $login_form = $this->makeLoginForm()->fillWith( Tools::getAllValues() ); $register_form = $this ->makeCustomerForm() ->setGuestAllowed(false) ->fillWith(Tools::getAllValues()); if (Tools::isSubmit('submitLogin')) { if ($login_form->submit()) { $should_redirect = true; } } if (Tools::isSubmit('submitCreate')) { $hookResult = array_reduce( Hook::exec('actionSubmitAccountBefore', array(), null, true), function ($carry, $item) { return $carry && $item; }, true ); if ($hookResult && $register_form->submit()) { $should_redirect = true; } } $this->context->smarty->assign([ 'login_form' => $login_form->getProxy(), 'register_form' => $register_form->getProxy(), 'hook_create_account_top' => Hook::exec('displayCustomerAccountFormTop'), ]); $this->setTemplate('customer/authentication'); and then add to authenthication.tpl this line and you can style this like u want {render file='customer/_partials/customer-form.tpl' ui=$register_form} Hi, this adds the customer registration form along on login page, please can you tell me how "Create an account button" can be added on the left as same as in the screenshot above? Link to comment Share on other sites More sharing options...
sija Posted September 1, 2021 Share Posted September 1, 2021 Hello. I show this thread and I need help too with this. Can anyone explain how change this forms in only one page? Thank you 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