Hi everyone
I have added radio buttons when selecting options instead of the ordinary dropdown selector. But I have a problem. I can only get last selected value. I guess there is javascript somewhere getting selected value since a click on add button is a "onclick"-feature.
There must be a selected.item[].value somewhere instead of a .value but I cant find it... any one know where to guide me?
Here is my modified code in catalog/view/product/product.tpl
<input name="option[<?php echo $option['option_id']; ?>]" type="radio" value="<?php echo $option_value['option_value_id']; ?>" /><?php echo format_bytes(filesize(DIR_DOWNLOAD.$option_value['filename'])); ?> <?php echo $option_value['name']; ?>
Here is the standard button code just a few lines below
<a onclick="$('#product').submit();" id="add_to_cart" class="button"><span><?php echo $button_add_to_cart; ?></span></a>
Output in browser
<input name="option[374]" value="731" type="radio">107 KB H001-Web<br>
<input name="option[374]" value="732" type="radio">396 KB H001-Print+250.00Kr<br>
Who is online
Users browsing this forum: No registered users and 96 guests