Minimum order charge Javascript:
This goes in the <HEAD> tags on the view_cart.html page:
<SCRIPT LANGUAGE="JavaScript">
<!-- hide this script
function validateSubtotal(){
var subTotal = document.forms[0].checkSubtotal.value;
var subTvalue = subTotal.substring(2,subTotal.length);
if(subTvalue < 20){
alert("There is a minimum order charge of $20.00." + "\n\n" +
"You must order at least $20.00 worth of products before you can Checkout!");
return false;
}
return true;
}
// -->
</SCRIPT>
Add "return validateSubtotal();" to the checkout FORM tag:
<FORM METHOD="POST" ACTION="%%secure_script_url%%" onSubmit="return validateSubtotal();">
Put this inside the checkout <form>:
<INPUT TYPE="hidden" NAME="checkSubtotal" VALUE="SUBTOTAL">