![]() |
Checkbox Validation
This mod is a adaptation of Zaja's must except terms mod http://forum.x-cart.com/showthread.php?t=20597
The differance is that if you do not check the "I agree to the terms and conditions" checkbox you will get a popup warning message. This is for xcart version 4.1.3 it has not been extensively tested so use at your own risk. 1. open skin/customer/main/checkout.tpl and add following code after {capture name=checkout_dialog}: Code:
<SCRIPT LANGUAGE="JavaScript"> Code:
{$lng.txt_terms_and_conditions_note} Code:
<input type="checkbox" value="0" name="agree"> {$lng.txt_terms_and_conditions_note} Code:
{include file="buttons/button.tpl" button_title=$lng.lbl_submit_order style="button" href=$button_href} Code:
<input type="submit" value="Submit Order" /> Code:
<form action="{$payment_data.payment_script_url}" method="post" name="checkout_form"> Code:
<form action="{$payment_data.payment_script_url}" method="post" name="checkout_form" onsubmit="return checkCheckBox(this)"> That should do it, if you find any issues please reply to this thread. |
Re: Checkbox Validation
Is this compatible with EZcheckout?
Thanks |
Re: Checkbox Validation
*lol* Warwick (but good question hehe ;))
Great mod Photo, thanks and thanks to Zaja, but I have a question, I don't know where it's best to post it, if here or in http://forum.x-cart.com/showthread.php?t=20597&highlight=easy+checkout (original mod thread). Instead of having a popup, which could be blocked by pop-up blockers could we make it so that when the user clicks on the "submit order" button without having check-marked the option a new text appears right above the button, perhaps in red colored type indicating "Please click on checkmark and submit order to continue?" (or something to this effect). Thanks |
All times are GMT -8. The time now is 05:20 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.