Magento 1.8/1.9 – Remove ‘None’ Radio-Button from Custom Option of Product

custom-optionsmagento-1.8magento-1.9product-view

I have added custom option in product as radion button. Its showing fine on frontend but above my custom option label its showing by default 'None' radio button. Is there a way to remove this.

Please check the screenshot for this –

enter image description here

Thanks.

Best Answer

Make the option to be required.

or

rewrite method getValuesHtml in class Mage_Catalog_Block_Product_View_Options_Type_Select, you need to comment these lines (from line 101):

    if (!$_option->getIsRequire()) {
             $selectHtml .= '<li><input type="radio" id="options_' . $_option->getId() . '" class="'
            . $class . ' product-custom-option" name="options[' . $_option->getId() . ']"'
            . ($this->getSkipJsReloadPrice() ? '' : ' onclick="opConfig.reloadPrice()"')
            . ' value="" checked="checked" /><span class="label"><label for="options_'
            . $_option->getId() . '">' . $this->__('None') . '</label></span></li>';
    }
Related Topic