How to get the formatted price with currency using an object manager ?

How to get the formatted price with currency using an object manager ?

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();

$priceHelper = $objectManager->create('Magento\Framework\Pricing\Helper\Data');

$price = 1000; //Your Price

$formattedPrice = $priceHelper->currency($price, true, false);

?>



Copyright © 2024 Tridhya Tech Limited, Inc. All rights reserved.