nickosn Posted November 28, 2015 Share Posted November 28, 2015 Hi, I need the terms and contitions checked by default in the onepage checkout proccess. So I wen to order-carrier-tpl and changed the checkbox to <input type="checkbox" name="cgv" id="cgv" value="1" checked="checked"/> Now the checkbox is checked by default but the payment methots are still hidded. What am I missing ? Kind Regards Link to comment Share on other sites More sharing options...
bellini13 Posted November 29, 2015 Share Posted November 29, 2015 First word of caution, checking the box by default can get you in trouble legally as a customer can always say they never agreed to the terms, as they never checked the box. With that said, payment methods will only appear when the box is clicked. there is javascript code that is "listening" for the click event, and when that event occurs, the payment methods are retrieved from the server and displayed. When the box becomes unchecked, the payment methods are removed. So instead of doing what you did, I would remove checked="checked", and instead use the below javascript to click the box when the page is loaded, which should trigger the click event <script type="text/javascript"> {literal} $('document').ready( function(){ $('#cgv').click(); }); {/literal} </script> 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