VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: cperrot on March 13, 2014, 09:56:01 AM

Title: Quantity maxlength
Post by: cperrot on March 13, 2014, 09:56:01 AM
Hello

Why is there some code with a hard coded length? e.g. components/com_virtuemart/views/cart/tmpl/default_pricelist.php

            <input type="text"
               onblur="check<?php echo $step?>(this);"
               onclick="check<?php echo $step?>(this);"
               onchange="check<?php echo $step?>(this);"
               onsubmit="check<?php echo $step?>(this);"
               title="<?php echo  JText::_('COM_VIRTUEMART_CART_UPDATE') ?>" class="quantity-input js-recalculate" size="3" maxlength="4" name="quantity" value="<?php echo $prow->quantity ?>" />

checks should be done on the quantity range in the price table and certainly not hardcoded into the script.

Regards

Cedric