0

I have an installation of magento 1.7.0.2.

I am looking for a way to add the product qty as radio buttons for customers.

For example I will remove the input text field qty and instead have maybe 5 radio buttons where customer can choose qty, see below

5 Items 10 Items 20 Items 30 Items

I have been looking for a way to do this via the admin panel but cannot see any option for this and searched online for any changes that need to be made to the code.

Any suggestions on how this can be done.

4

1 回答 1

0
<?php $n=Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getQty();

for($i=1;$i<=$n;$i++){ ?>
<input type="radio" name="qty" id="qty" maxlength="12" value="<?php echo $i; ?>" title="<?php echo $this->__('Qty') ?>" class="input-text qty" />
<?php } ?>
于 2013-07-03T09:13:16.377 回答