以当前语言环境和货币格式设置价格 [英] Format price in the current locale and currency
本文介绍了以当前语言环境和货币格式设置价格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用:
$product->getPrice();
获得可以用ajax计算数量X价格"的未格式化价格.
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?
推荐答案
I think Google could have answered your question ;-) See http://blog.chapagain.com.np/magento-format-price/.
您可以使用
$formattedPrice = Mage::helper('core')->currency($finalPrice, true, false);
这篇关于以当前语言环境和货币格式设置价格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文