Magento 2 Get Current Currency Symbol


Magento 2 Get Current Currency Symbol & Currency Code– We can get currency symbol using currency code so we first need to get current currency code from currency object then get currency symbol. Here in this tutorial, we are going to explain how you can get .


Magento 2 Get Current Currency Symbol & Currency Code Example

You can get Currenct Currency Code and Symbol simply as below-

How to get currency Symbol in Magento 2?

$objectManager = \Magento\Framework\App\ObjectManager::getInstance(); 
$storeManager = $objectManager->get('Magento\Store\Model\StoreManagerInterfa‌​ce'); 
$currencyCode = $storeManager->getStore()->getCurrentCurrencyCode(); 
$currency = $objectManager->create('Magento\Directory\Model\CurrencyFact‌​ory')->create()->loa‌​d($currencyCode); 
echo $currencySymbol = $currency->getCurrencySymbol(); 

So using above example we can get currency code and currency symbol.


Advertisements

Add Comment

📖 Read More