How can I show product quantity drop down to customer for offering quantity as follows on product view page; 1 / 10 / 20 / 30 / 40 / 50 / 60 / 70 / 80 / 90 / 100
Any suggestion would be appreciated.
How can I show product quantity drop down to customer for offering quantity as follows on product view page; 1 / 10 / 20 / 30 / 40 / 50 / 60 / 70 / 80 / 90 / 100
Any suggestion would be appreciated.
As per your comment you can modify your drop down with this code:
<?php
if($this->getStockMaximumQty()>0)
{
$maximum = $this->getStockMaximumQty()/10;
$html = '<option value="1">1</option>';
for($i=1;$i<=intval($maximum);$i++){
$val = $i*10;
$html .= '<option value="'.$val.'">'.$val.'</option>';
}
?>
<select name="quantity" id="qty">
<?php echo $html; ?>
</select>
<?php } else { ?>
<?php echo $this->__('This product is currently out of stock.'); ?>
<?php } ?>