View Single Post
  #19  
Old 02-13-2005, 08:13 AM
 
zilker zilker is offline
 

Advanced Member
  
Join Date: Feb 2003
Posts: 89
 

Default

QVS, below is the javascript form validation for version 4.0.6. I'm going to go out on a limb and say that it should work for any version 4 cart. Highlight the entire code and paste it over the existing code in /form_validation_js.tpl.

It worked for me ~ BUT ~ back up your original before you try the change ~ just to be safe.

Code:
{* $Id: form_validation_js.tpl,v 1.2.2.3 2004/08/11 12:04:13 max Exp $ *} <SCRIPT type="text/javascript" language="JavaScript 1.2"> function FormValidation() {ldelim} {if $active_modules.Product_Options ne '' && $product_options ne ''} if(!check_exceptions()) {ldelim} alert(exception_msg); return false; {rdelim} {if $product_options_js ne ''} {$product_options_js} {/if} {/if} if(document.getElementById('product_avail')) if(document.getElementById('product_avail').value == 0) {ldelim} alert("{$lng.txt_out_of_stock|replace:"\n":" "|replace:"\r":" "|replace:'"':'\"'}"); return false; {rdelim} if(parseInt(document.orderform.amount.value) >= parseInt(document.orderform.minamount.value)) return true; else {ldelim} alert("{"The quantity you entered was invalid. Please enter the appropriate quantity to add this product to your cart."|replace:"\n":" "|replace:"\r":" "}"); return false; {rdelim} return true; {rdelim} </SCRIPT>

Let me know how it works.
__________________
~zilker

uummm...perhaps you should tell me again.

http://www.designertrends.com
Version 4.0.6
Unix
Reply With Quote