yacorro Posted August 9, 2013 Share Posted August 9, 2013 Hi, As I would like to register customers manually i turned off login after registration - so bassicly after user Submit registration form Presta doesn't log him in automatticly. Now i'd like to add a info for a user after submiting registration form. Something like: Thx for registration, we will send You and emeil...blah...blah. So i've tried to add some onSubmit action to my input in authentication.tpl, but unfortunatly without any succes. Thx for any help or suggestions. Link to comment Share on other sites More sharing options...
vekia Posted August 9, 2013 Share Posted August 9, 2013 what prestashop version you use? and default template? Link to comment Share on other sites More sharing options...
yacorro Posted August 9, 2013 Author Share Posted August 9, 2013 Hi, SOLVED I've added onSubmit action to the <form> markup not to the <input> and it works fine. Thx for answer anyway. Link to comment Share on other sites More sharing options...
vekia Posted August 9, 2013 Share Posted August 9, 2013 ohh great news! thanks for information how you solved it this will be really helpful for other merchants here im going to mark this topic as [solved] best regards Link to comment Share on other sites More sharing options...
reno123 Posted October 22, 2013 Share Posted October 22, 2013 Hi, SOLVED I've added onSubmit action to the <form> markup not to the <input> and it works fine. Thx for answer anyway. Could you describe what you add and where exactly ? Is it at back-office or you change the code/files ? Link to comment Share on other sites More sharing options...
simsydney Posted November 26, 2013 Share Posted November 26, 2013 Could you describe what you add and where exactly ? Link to comment Share on other sites More sharing options...
yacorro Posted November 26, 2013 Author Share Posted November 26, 2013 Hi, In authentication.tpl file, line 158 (can be different because of some javascripts at the top of the file): <form action="{$link->getPageLink('authentication', true)}" method="post" onsubmit="greeting()" id="account-creation_form" class="std"> so as You can see i've added onsubmit="greeting()" where greeting is my js function. Link to comment Share on other sites More sharing options...
simsydney Posted November 26, 2013 Share Posted November 26, 2013 hi i have insert: <form action="{$link->getPageLink('authentication', true)}" method="post"onsubmit="greeting( New registration requires the approval of the site owner.We will review and activate your account shortly and email when you can start using our shop)" id="create-account_form" class="std"> but nothing happen Link to comment Share on other sites More sharing options...
yacorro Posted November 27, 2013 Author Share Posted November 27, 2013 Hi, It wont work like that. "greeting" is java script function, You need to write this function at the top of the page, where the java script code is located. The simplest example: <script> function greeting() { alert("New registration requires the approval of the site owner.We will review and activate your account shortly and email when you can start using our shop") } </script> of course this function doesnt have to show an alert. For ex. it could show some hidden div - if You are looking for good looking solution as alerts are always displayed in system windows. Link to comment Share on other sites More sharing options...
simsydney Posted November 27, 2013 Share Posted November 27, 2013 thank you , so much may more elegant solution would be redirect to a page with the message i need, do you know how to do that? thanks Link to comment Share on other sites More sharing options...
yacorro Posted November 28, 2013 Author Share Posted November 28, 2013 Try to replace greeting funciotn code to: window.location="http://www.newlocation.com"; where You can specify page url that You want redirect to. Another more elegant solution is prepare a message box - a div that You can style with css. Ex. showroom.konkretpr.pl - try to download a photo witohout loging in - You will see a message window with proper info - styled with css. Link to comment Share on other sites More sharing options...
simsydney Posted November 28, 2013 Share Posted November 28, 2013 Hi, thank you for your email. I did as you said, or as i understood, </fieldset> </form> <form action="{$link->getPageLink('authentication', true)}" method="post" onsubmit="window.location="http://www.amtlaser.com.au/index.php?id_cms=29&controller=cms"" id="account-creation_form" class="std"> <fieldset> but is not working 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