I want to add a quantity drop down for the products on checkout page that user can select as much products from there. This is because i am using one page checkout and i have skipped the cart page: the product price will automatically updated when number of products selected.
I have tried this code to be added in checkout template but nothing coming up:
<select class="input-text qty" name="qty" id="qty">
<?php $i = 1 ?>
<?php do { ?>
<option value="<?php echo $i?>">
<?php echo $i?>
<?php $i++ ?>
</option>
<?php } while ($i <= (int)Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getQty()) ?>
</select>