I am new to magento. I am currently using radio button with image in product page to select values. The radio button is working correctly but the value is not storing in database. My code is in the file :
app\design\frontend\rwd\default\template\catalog\product\view\options\type\default.phtml
Default.phtml :
<?php $_option = $this->getOption() ?><?php //var_dump($_option->getId());die; //print_r($_option->getValues()); ?>
<?php
if($option_values = $_option->getValues()){?>
<dt>
<label class=""><em>*</em><?php echo $this->escapeHtml($_option->getTitle()) ?></label>
</dt>
<?php
foreach($option_values as $value)
{
$custom_options = $value->getData();
$id = "option ".$custom_options['option_type_id']." text";
?>
<input type="radio"
class="input-radio product-custom-option"
name="theme"
id="<?php echo $id;?>"
style="display:none"
value ="3456789"
onClick=check("<?php echo strtolower(str_replace(" ","_",$id));?>")>
<label
for="<?php echo $id;?>"
name="options[<?php echo $id ?>]"
id="<?php echo $id ?>"
value="ythuj"
>
<img class="img_border"
src ='<?php echo Mage::getBaseUrl('media').$custom_options["thum_image"]?>'
id ="<?php echo strtolower(str_replace(" ","_",$id));?>"
value = "asdf"
>
</label>
<?php } ?>
<?php }
?>
From pageSource:
</dt>
<input type="radio"
class="input-radio product-custom-option"
name="theme"
id="option 582 text"
style="display:none"
value ="3456789"
onClick=check("option_582_text")>
<label
for="option 582 text"
name="options[option 582 text]"
id="option 582 text"
value="ythuj"
>
<img class="img_border"
src ='http://127.0.0.1/asd/media/catalog/customoptions/1.png'
id ="option_582_text"
value = "asdf"
>
</label>
How can i resolve this? The input text box are working correctly only the radio button values are missing?
view sourceand copy paste it - Thanga