money
This filter will return a formatted price in the customer’s currency. It expects an integer of the price as a fractional in the sub-unit of the currency. e.g. 7500
for the price of £75
input
<h1>{{ 150 | money }}</h1>
output
Assuming the customer’s currency is GBP
<h1>£1.50</h1>
apply_promotion
This filter will return the discounted version of a given price when a promotion is applied. It will return a Price object.
input
{% assign reduced_price = price | apply_promotion: promotion %}
<h1>{{ reduced_price.fractional }}</h1>
output
Assuming an initial price of 120.00
and a percentage discount of 25%
<h1>9000</h1>
extract_money_decimal
This filter can be used to extract the numerical value from a price string.
input
<h1>{{ '$1,020.89/pp'' | extract_money_decimal }}</h1>
output
<h1>1020.89</h1>