- Web templates
- E-commerce Templates
- CMS & Blog Templates
- Facebook Templates
- Website Builders
Magento. How to remove price in product option
February 3, 2016
Magento. How to remove price in product option
In this tutorial you will learn how to remove price in product option in Magento:
Please note that we will modify the Core Magento file.
-
Open app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Select.php file. Note that it is a core file, therefore you may want to copy it into local folder before making changes.
-
Look for the following code: $select->addOption(
-
Remove $priceStr, so it looks as follows:
$select->addOption( $_value->getOptionTypeId(), $_value->getTitle(), array('price' => $this->helper('core')->currencyByStore($_value->getPrice(true), $store, false)) );
-
Look for the following code: $selectHtml.
-
Remove $priceStr, so it looks as follows:
$selectHtml .= '
- ' . 'getSkipJsReloadPrice() ? '' : ' onclick="opConfig.reloadPrice()"') . ' name="options[' . $_option->getId() . ']' . $arraySign . '" id="options_' . $_option->getId() . '_' . $count . '" value="' . $htmlValue . '" ' . $checked . ' price="' . $this->helper('core')->currencyByStore($_value->getPrice(true), $store, false) . '" />' . '';
-
Save your changes. Upload this file to the server and reload your site page to see the changes:
Feel free to check the detailed video tutorial below: