How do i check the terms of service checkbox by default?
Dont see this anywhere in config.
Hello,
I think the proper is the user checked by himself according that have already read the terms. But in case you want to do it you should add an attribute inside your custom template input method for terms check box. I think there is no option from the backend to change the the attributes of the checkbox inside shopper fields.
The original should be like this:
<input class="terms-of-service" id="tosAccepted" type="checkbox" value="1" name="tosAccepted">
Change it to this by adding checked="checked" attribute.
<input class="terms-of-service" id="tosAccepted" type="checkbox" value="1" name="tosAccepted" checked="checked">
The above is an html example just add the attribute and please don't replace the whole line.
You have to add this attribute to your default cart template and in other layout template you want to change (billing address, registration, etc).
Hope it helps you out.
Regards,
Bytelord
In the file virtuemart-template/cart/default.php
I have a line like this that matches most acurately to the one You've mentioned:
'<input class="terms-of-service" type="checkbox" name="tosAccepted" value="1" ' . $this->cart->tosAccepted . '/>
I tried to change it to:
'<input class="terms-of-service" type="checkbox" checkbox="checkbox" name="tosAccepted" value="1" ' . $this->cart->tosAccepted . '/>
and it didn't work for me.
Warmest Regards
Dan
Hello,
it should be
'<input class="terms-of-service" checked="checked" type="checkbox" name="tosAccepted" value="1" ' . $this->cart->tosAccepted . '/>
the above is until version 2.0.8e
Hi:
In file com_virtuemart/helpers/cart.php
var $tosAccepted = true; intead of var $tosAccepted = null;
Regards
Yes also,
Thanks