How to format price and output currency?
2min
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)
HTML
|
Here my_price_variable is the variable containing a price you'd like to format. This will then output the formatted price.
Updated 03 Mar 2023
Did this page help you?
Yes
No