Magento – Set Default Value to custom options for products

custom-optionsdefault valuesmagento-1.9

I am having custom options created for the products. I need to set some option as default for the custom option so that when user checks on the front end default option will be seen instead of "Please Select".

enter image description here

I found one Extension default state of custom option for simple products

But I am looking for if I can show at the place where I am creating the options.

Best Answer

Go to Mage/Catalog/Block/Product/View/Options/Type/Select.php::getValuesHtml()

Comment (in line no 59) the addOption part of

$select->setName('options['.$_option->getid().']');
                ->addOption('', $this->__('-- Please Select --'));

i.e.

/* ->addOption('', $this->__('-- Please Select --')); */

Hope this solves your issue.

Related Topic