Magento 1.9 – Custom Select Options HTML for Products

customcustom-optionsmagento-1.9

Is there a way to edit the default custom option template on frontend?

Currently the following template file:

/app/design/frontend/theme/theme/template/catalog/product/view/options/type/select.phtml

Load the custom options by <?php echo $this->getValuesHtml() ?>

But I want to change somethings on the loaded HTML. For example I want to display also the €0,00 price or the word "Default" when the option does not increase the price. I also want to display the minus prices, when a option decrease the price. And I want to display the price excluding VAT only.

How can I achieve this? What is the loaded file, that loads the ValuesHtml?

Best Answer

  1. If you want to update the select template, you have to add what you want on it in your theme files, so Magento get it from your theme first then the default then the base as the Magento theme fallback system.

  2. Now if you want to update the data that contains this select.phtml like $this->getValuesHtml()(what you are looking for), you have to rewrite the Select.php in your local codePool from : app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Select.php getValuesHtml()