How can I change the javascript to check the $aList[fSummary] variable? I've stared at the javascript code for hours now, can't figure all the functions out..
I want it to check that the amount is not under a certain number.
broberg - hmm... this will not be easy. You should know HTML good. Edit in QC 2.0, templates/orders_delivery.tpl add (in COURIER block) input type hidden with value $aList[fSummary]. something like that: <input type=''hidden'' name='fSummary' value='$aList[fSummary]' /> after find
Change this: onsubmit=''return checkForm( this, aCheckFormDelivery );'' to something like this: onsubmit=''return checkOrder( this, aCheckFormDelivery );''
after add JavaScript code and function for example:
<script type='text/javascript'> <!-- function checkOrder( oForm, aCheckFormDelivery ){ if( oForm['fSummary'] < 1000 ){ // change this value to Your minimum order amount alert( 'Order more!!!' ); return false; } else{ return checkForm( oForm, aCheckFormDelivery ); } } // end function //--> </script>
I dont test it. Maybe it will helps. Check and give info