By _DSCRoot_ on 9/24/2009 |
Customization
|
In Store\OnePageCheckout.ascx add the following code after the line "<div><h3><asp:Literal runat="server" text="<%$ Resources:Common,ReviewInformationAndSubmitOrder %>" /></h3></div>"
<div>
<asp:CheckBox id="chkTerms" runat="server" text="I have read and agree the your terms." />
<asp:CustomValidator id="cvdAgree" runat="server" clientvalidationfunction="IsChecked"
onservervalidate="cvdAgree_ServerValidate" validationgroup="checkout" errormessage="The term agreement must be checked.">*</asp:CustomValidator>
<script type="text/javascript">
function IsChecked(obj, args) {
var checkbox = $("#<%= chkTerms.ClientID %>");
args.IsValid = checkbox.attr('checked');
}
</script>
</div>
In Store\OnePageCheckout.ascx.cs add the following code
protected void cvdAgree_ServerValidate(object source, ServerValidateEventArgs args) {
args.IsValid = chkTerms.Checked;
}