Magento 1.7 – How to Get Price Without Currency Symbol

checkoutcurrencygrand-totalmagento-1.7price

How can i echo grand total without the $ symbol attached to it?

Am using the following code to display grand total

echo Mage::helper('checkout')->formatPrice(Mage::helper('checkout')->getQuote()->getGrandTotal())

right now it is displaying $50.00 but i want to get only 50.00, how can i do the same?

Thank you in advance.

Best Answer

Try this:

Mage::helper('checkout')->getQuote()->getGrandTotal()

It will get you the grand total in this format 50.0000. If you want only 2 decimals use this:

number_format(Mage::helper('checkout')->getQuote()->getGrandTotal(), 2);
Related Topic