how to change the currency's precision?

want to change the precision from 2 decimal places to 3 in plp and pdp .

changed or extend function format() in module-directory\Model\PriceCurrency.php

it effect for list and cart page but in product detail page still it shows 2 decimal place

how to fix this issue

1 Answer 1


Not recommended, but fix it this issue. See vendor\magento\module-catalog\view\base\web\js\price-utils.js

See line 38

Change var precision = isNaN(format.requiredPrecision = Math.abs(format.requiredPrecision)) ? 2 : format.requiredPrecision, to

var precision = you_presigion,

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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