Categories

Featured templates

Magento. How to remove price in product option

Ray Taylor February 3, 2016
Rating: 5.0/5. From 2 votes.
Please wait...

Magento. How to remove price in product option

In this tutorial you will learn how to remove price in product option in Magento:

magento_remove_price_in_product_option-5

Please note that we will modify the Core Magento file.

  1. 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.

  2. Look for the following code: $select->addOption(

    magento_remove_price_in_product_option-1

  3. Remove $priceStr, so it looks as follows:

    $select->addOption(
    $_value->getOptionTypeId(),
    $_value->getTitle(),
    array('price' => $this->helper('core')->currencyByStore($_value->getPrice(true), $store, false))
    );

    magento_remove_price_in_product_option-2

  4. Look for the following code: $selectHtml.

    magento_remove_price_in_product_option-3

  5. Remove $priceStr, so it looks as follows:

    $selectHtml .= '<li>' . '<input type="' . $type . '" class="' . $class . ' ' . $require
    . ' product-custom-option"'
    . ($this->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) . '" />'
    . '<span class="label"><label for="options_' . $_option->getId() . '_' . $count . '">'
    . $_value->getTitle() . ' ' . $priceStr . '</label></span>';
                

    magento_remove_price_in_product_option-4

  6. Save your changes. Upload this file to the server and reload your site page to see the changes:

    magento_remove_price_in_product_option-6

Feel free to check the detailed video tutorial below:

Magento. How to remove price in product option

Premium Magento Themes
This entry was posted in Magento Tutorials and tagged Magento, option, price, product, remove. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket