B-219 Sec-55 Noida, India
+918010221733

How to remove please select from custom option drop down in Magento

Open: 

appcodecoreMageCatalogBlockProductViewOptionsTypeSelect.php 

Alter the following lines:

if ($_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_DROP_DOWN) {
$select->setName(‘options[‘.$_option->getid().’]‘)
->addOption(”, $this->__(‘– Please Select –’));
}

To:

if ($_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_DROP_DOWN) {
$select->setName(‘options[‘.$_option->getid().’]‘);
// ->addOption(”, $this->__(‘– Please Select –’))
}

Summary of changes: 
I commented out the ->addOption line with two
forward slashes AND – and this is important – I moved the semi-colon
from the end of that line to the end of the previous line. Reversing
this change allows you to undo the changes you made.
(Visited 70 times, 1 visits today)

Leave a reply

You must be logged in to post a comment.