I am trying to figure out a way of adding some error checking to the quantity box I have on the product info page.
Maybe its easier done than I am thinking but being full of a head cold today is making things blurry urgh
So far I have this
<script type="text/javascript">
function cartqty(form) {
if (form.cartqty.value == "" ) {
alert("<?php echo BOX_QUANTITY_ERROR; ?>")
form.cartqty.focus();
return false;
}
else {
// form.submit()
return true;
}
}
</script>
<?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product'), 'onsubmit="return cartqty(this);"'); ?>
Maybe I am going about this wrong way but any advice would be appreciated.
Thanks
Mark









