Back to Top

Magento2 Get Formatted Price Without Currency Symbol

Updated 2 years ago

Get formatted price without currency symbol in Magento2.

Here we will see how to get formatted price without currency symbol in Magento2.

<?php 
$objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $currency = $objectManager->get('Magento\Directory\Model\Currency');
$price = 100; echo $currency->format($price, ['display'=>\Zend_Currency::NO_SYMBOL], false); 
?>

Output: 100.00
You will get price without Currency Symbol using above code.

If you need formatted price with currency symbol please read this Blog.

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

Back to Top

Message Sent!

If you have more details or questions, you can reply to the received confirmation email.

Back to Home