5

in magento front end its showing ₹7,765,000.00

But we need ₹77,65,000.00

$objectManager = \Magento\Framework\App\ObjectManager::getInstance(); // Instance of Object Manager
    $priceHelper = $objectManager->create('Magento\Framework\Pricing\Helper\Data'); // Instance of Pricing Helper
    $price =  43200000; //Your Price
   echo $formattedPrice = $priceHelper->currency($price, true, false);

it should display ₹4,32,00000 but it it displaying ₹43,200,000.00

  • do you have multi currency ? – Pawan Apr 16 at 3:46
  • no,i dont have. – sivakumar Apr 16 at 6:48
2

Option I

At the moment you setup Rupee as currency, but it is taking format as per Locale you set in admin.

If you want format as per Indian currency, you need to change your Locale to Hindi (India).

Option II

If you don't want to change Locale, You need to change currencyFormat.

You can find file at:

vendor/magento/zendframework1/library/Zend/Locale/Data

  1. Select file as per your Locale

  2. Search for <currencyFormat

  3. Change format.

Note If you are going with Option II, you need a proper override. Never edit core file

  • i choose option 1. its working in listing page. but not in product page – sivakumar Apr 16 at 6:47
  • Yes, I checked on PDP initial it is showing correct format price, then it is changing! let me check solution. – Pawan Apr 20 at 2:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.