phpmagentoformattingcurrency-formatting

Magento: Price, formatted but without currency symbol


I want to get a formatted price but without the currency symbol and I want use only standard functionality of magento!

$product->getFinalPrice(); => 19.9900

Mage::helper('core')->formatPrice($product->getFinalPrice(), false); => 19,99 €

Mage::helper('mymodul')->foobar($product->getFinalPrice()); => 19,99

How is that possible? (I don't want use str_replace()...)


Solution

  • Mage::getModel('directory/currency')->format(
        $product->getFinalPrice(), 
        array('display'=>Zend_Currency::NO_SYMBOL), 
        false
    );