How to convert a number format into a currency format in Magento 2
Since there is no ‘core’ module in Magento 2, you can do this by following way inside view file (.phtml):
1 |
$this->helper('Magento\Framework\Pricing\Helper\Data')->currency(number_format(50,2),true,false); |
More tips from Magento 2 Developer’s Cookbook
Source (