How can I remove the leading '+' sign from prices of bundled product components? I have tried changing the $sign = ''; // Originally was $sign = '+'; and also $priceStr = ''; // Originally was $priceStr = $sign; in app/code/local/Mage/Catalog/Block/Product/View/Options/Abstract.php, without luck.

Is this achievable?

1 Answer 1


The responsible code is in Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option:


    $priceTitle .= ' &nbsp; ' . ($includeContainer ? '<span class="price-notice">' : '')
        . '+' . $this->formatPriceString($price, $includeContainer)
        . ($includeContainer ? '</span>' : '');

and getSelectionTitlePrice()

    $priceTitle .= ' &nbsp; ' . ($includeContainer ? '<span class="price-notice">' : '')
        . '+' . $this->formatPriceString($price, $includeContainer)
        . ($includeContainer ? '</span>' : '');

You can extend the class, override these methods and remove the plus sign. Then you need to rewrite all its child classes:


These rewritten classes are copies of their originals (there is not much individual code, just the templates being defined) and must extend your class from above instead of the original Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option

  • thank your for the reply. That does the job. My question is, If by changing '+' to ' ', you solve the problem, why would you extend the class? And excuse my ignorance, what is extending the class? Aug 11, 2015 at 15:47
  • Of course, I have created an override of Option.php and applied the changes mentioned above in getSelectionQtyTitlePrice() and getSelectionTitlePrice() here: app/code/local/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle/Option.php. Aug 11, 2015 at 16:12
  • I always prefer a solution without changing core code or overriding it in the local code pool. With a custom module and class rewrites you only need to change the methods that you need to change which is easier to understand and more upgrade safe. Aug 11, 2015 at 16:37
  • 1
    But I figured that if you prefer quick and easy code pool overrides, my answer would provide you with everything you need. Looks like I was right ;) Aug 11, 2015 at 16:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.