News:

Support the VirtueMart project and become a member

Main Menu

Quantity maxlength

Started by cperrot, March 13, 2014, 09:56:01 AM

Previous topic - Next topic

cperrot

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