There is this code which used to get price with currency. Let’s see how to get it.
We can use below helper price to get it.
<?php
use MagentoFrameworkPricingHelperData
protected $priceHelper;
public function __construct(Data $priceHelper)
{
$this->priceHelper = $priceHelper;
}
public function getFormattedPrice($price)
{
return $this->priceHelper->currency($price, true, false);
}
?>
Also, we can use directly in phtml file
$this->helper('MagentoFrameworkPricingHelperData')->currency(number_format(50,2),true,false);

