Remove “None” radio-button from custom option of product
-
12-12-2019 - |
Question
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 -
Thanks.
Solution
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>';
}
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange