cancel
Showing results for 
Search instead for 
Did you mean: 

How to correctly format amount

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

How to correctly format amount

Hello,

 

Currently, prices are displayed with 2 decimals and the currency symbol after the number. I need the price to be displayed without decimals and the symbol before the number.

 

I know that $block->getDisplayValue() in amount/default.phtml returns the number and I can format it as I would do it in PHP, however, I want to know the "Magento2 Way"., for example, using $block->formatCurrency method call.

 

Thanks

Jaime

2 REPLIES 2

Re: How to correctly format amount

I have a ready «Price Format» extension for Magento 2: https://mage2.pro/t/355

Re: How to correctly format amount

But I have to pay for it. I am looking for a help to do it by myself since I have very limited budget.

 

Regards

Jaimr