How to format price and output currency?

Formatting Price

In the eCommerce Module, a formatted price is generated so partners can quickly output the correct price. However, you may sometimes need to convert a "raw" price integer to a currency format. Instead, we can include price_formatter, which will convert the price from cents to dollars (or your currency's equivalent)


Here my_price_variable is the variable containing a price you'd like to format. This will then output the formatted price.

Updated 12 Mar 2021
Did this page help?