an ASP.NET Open Source CMS & eCommerce platform
Search:
Skip Navigation LinksHome > DotShoppingCart Blog > Customization > Add a Terms Agreement Checkbox In The Checkout ...
Add a Terms Agreement Checkbox In The Checkout Page
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;
    }
Recent Comments
Travis said ...
I just bought DSC Suite V4.5 and it is more solid then ever. I hope I am #1 buyer of this ...
komal said ...
 exellent platform for creating ecommerce websites
komal said ...
 this is a very useful software for building ecommerce website  
lukezy said ...
No, still working on it.
seldi said ...
V4.2 release is canceled?