Magento -> Modifying Qty entry in cart to radio button for group products

We only want customers to be able to select one of the two grouped products we offer and the qty will always be 1.

Modifying the qty text entry to only be a radio button and make them mutually exclusive in catalog/product/view/type/grouped.phtml like this:
<input type="radio" name="super_group[qty]" value="<?php echo $_item->getId() ?>" />

Open in new window


Will it work correctly?
How/where would I determine to set the qty for the selected one to 1.
LVL 26
Eddie ShipmanAll-around developerAsked:
Who is Participating?
 
miked2004Commented:
Do you still need help?
0
 
Eddie ShipmanAll-around developerAuthor Commented:
Decided to go with a checkbox instead and allow them to change qty of printed items.
  <?php if ($_item->isVirtual()) : ?>
    <input type="checkbox" name="super_group[<?php echo $_item->getId() ?>]" value="1" />
  <?php else: ?>
    <input type="text" name="super_group[<?php echo $_item->getId() ?>]" maxlength="12" value="<?php echo $_item->getQty()*1 ?>" title="<?php echo $this->__('Qty') ?>" class="input-text qty" />
  <?php endif; ?>

Open in new window

0
 
Eddie ShipmanAll-around developerAuthor Commented:
Nah, I got everything figured out. Was going to delete this but leave it for others. I'll go ahead and award points to you so it stays as PAQ.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.