bolu Posted February 4, 2011 Share Posted February 4, 2011 Hi, I would like to add checkbox in the authentication.tpl so that the customer could not register unless he checks it first. If he tries to register without checking the checkbox he should get the messagebox like it is on order-carrier.tpl. I tried to copy the code from order-carrier.tpl (the terms of use checkbox) but it didn't work. Could anyone please help me with that?regards Link to comment Share on other sites More sharing options...
bolu Posted February 5, 2011 Author Share Posted February 5, 2011 I figured out how to do this In case anyone needs it here is how to do it.1. Create checkbox.js in the /js catalog with this code: function checkbox(form) { if ( form.checkbox.checked == false ) { alert ('Here you can add the message which will appear in the messagebox if the customer doesn't check the checkbox'); return false; } else { return true; } } 2. In authentication.tpl add this code in line 66 onsubmit="return checkbox(this);" 3. In authentication.tpl add this line:[removed][removed]the forum removes this line, I don't know why. It's the same code like in line 7 in order-carrier.tpl but insted of 'conditions.js' type 'checkbox.js'4. In authentication.tpl in the form add this code: <input type="checkbox" name="checkbox" value=""> {l s='the text near the checkbox'} regards Link to comment Share on other sites More sharing options...
lekvarnik Posted November 25, 2011 Share Posted November 25, 2011 How to do this? This is not working in 1.4 prestashop version 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