A custom field in my shop, which is a checkbox, seems not to toggle when updating cart. <!--@If(nzLeaveOrderAtHouse.Clean=="yes")--><div class="basketCol1"><input type="checkbox" name="nzLeaveOrderAtHouse" id="nzLeaveOrderAtHouse" onclick="updateCart();" checked /><!--@nzLeaveOrderAtHouse.Clean--></div><!--@EndIf--> <!--@If(nzLeaveOrderAtHouse.Clean=="no")--><div class="basketCol1"><input type="checkbox" name="nzLeaveOrderAtHouse" id="nzLeaveOrderAtHouse" onclick="updateCart();" /><!--@nzLeaveOrderAtHouse.Clean--></div><!--@EndIf-->
Developer forum
E-mail notifications
Custom order field opdateres ikke ved updateCart()
Jacob Bertelsen
Posted on 26/04/2012 14:38:39
Replies
Jacob Bertelsen
Jacob Bertelsen
Vladimir
Posted on 27/04/2012 07:36:15
Hi Jacob!
You may try something like:
Best regards,
Vladimir
You may try something like:
<input name="nzLeaveOrderAtHouse" id="nzLeaveOrderAtHouse" type="hidden" value="<!--@nzLeaveOrderAtHouse.Clean-->" /> <!--@If(nzLeaveOrderAtHouse.Clean=="yes")--> <div class="basketCol1"> <input type="checkbox" onclick="CheckLeaveOrderAtHouse();" checked /><!--@nzLeaveOrderAtHouse.Clean--> </div> <!--@EndIf--> <!--@If(nzLeaveOrderAtHouse.Clean=="no")--> <div class="basketCol1"> <input type="checkbox" onclick="CheckLeaveOrderAtHouse();" /> <!--@nzLeaveOrderAtHouse.Clean--> </div> <!--@EndIf--> function CheckLeaveOrderAtHouse(myCheckBox){ var myTxt = document.getElementById('nzLeaveOrderAtHouse'); if (myTxt){ if (myCheckBox.checked) myTxt.value = 'checked'; else myTxt.value = ''; } updateCart(); }
Vladimir
You must be logged in to post in the forum