How to format a money value (e.g. price) in JavaScript?

javascript
price
price-format
(Dmitry Fedyuk) #1

Use the priceFormat() method of the Magento_Catalog/js/price-utils class:

A usage example:

0 Likes

The global «groupLength» property has an incorrect «,» value instead of a natural number in Magento_Catalog/js/price-utils
How is a price rendered on a frontend product view page?
The Magento_Catalog/js/price-utils::formatPrice() pollutes the global formatting settings with local ones because of a wrong lodash extend / assignIn usage
(Dmitry Fedyuk) #2

See also:

0 Likes