Price formatting

Format prices consistently across your theme.

See also: Price object and Money filters

Price objects can be rendered directly for simple use cases.

For example:

{{ variant.price }}

might render as:

€200.00 /pp

The output automatically includes:

  • The correct currency symbol.
  • A pricing suffix such as /pp or /night, depending on the pricing model.

Formatting derived prices

If you call a method or apply a filter to a Price object, the result is another object rather than a formatted string.

For example:

{{ variant.price | apply_promotion: variant.promotion }}

returns a VariantPriceDrop, not a formatted price.

To display the result, access one of its price properties and format it with the money filter.

For consistent formatting throughout your theme, we recommend always:

  • Accessing the price through fractional or per_person_fractional.
  • Formatting the value with the money filter.
  • Adding any pricing suffix (/pp, /night, /unit) in your own markup where appropriate.

For example:

{{ variant.price.fractional | money: no_cents_if_whole: true }}

renders:

€200

Or, for a per-person price:

{{ variant.price.per_person_fractional | money: no_cents_if_whole: true }} /pp

renders:

€100 /pp

This approach ensures prices are formatted consistently, regardless of whether they are original prices, promotional prices, deposits, or payment plan amounts.

On this page