I use :
$product->getPrice();
to get the unformatted price that I can calculate "quantity X price" with ajax.
I want to reformat the total in the current locale and currency. How can I do that?
United States (U.S.) currency is formatted with a decimal point (.) as a separator between the dollars and cents. Some countries use a comma (,) instead of a decimal to indicate that separation.
USD is the international currency code established by the ISO to represent the American dollar. It is composed of the country code ( US ), followed by the letter "D" for "dollar." Write the dollar figure first, followed by a non-breaking space and the code: 350 000 USD.
Display Currency symbol to the right using Angular Currency Pipe. A lot of european countries use the currency symbol at the right side of currency value (France, Germany, Spain, Italy countries).
I think Google could have answered your question ;-) See http://blog.chapagain.com.np/magento-format-price/.
You can do it with
$formattedPrice = Mage::helper('core')->currency($finalPrice, true, false);
$formattedPrice = Mage::helper('core')->currency($_finalPrice,true,false);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With