Price tiers and occupancy
Display occupancy-based pricing for Experience and Accommodation products.
Occupancy can affect pricing in different ways depending on the product type.
- Experience products can use price tiers, where the price of a unit changes based on the number of guests.
- Accommodation products can use occupancy discounts, where the nightly rate is reduced for rooms that are not fully occupied.
Experience price tiers
Per unit Experience variants can define multiple pricing tiers.
Each tier represents the total price for a specific occupancy.
Use variant.prices to access the available tiers.
<h4>{{ variant.name }}</h4>
{% for tiered_price in variant.prices %}
<p>
{{ tiered_price.occupancy }} adult(s):
{{ tiered_price.fractional | money }}
</p>
{% endfor %}This renders output similar to:
<h4>Hot Air Balloon Ride</h4>
<p>1 adult: $230.00</p>
<p>2 adults: $250.00</p>
<p>3 adults: $300.00</p>Accommodation occupancy discounts
Accommodation variants can apply a discount based on the number of guests staying.
The Creator defines:
- A standard nightly price.
- A maximum occupancy.
- A discount applied for each unoccupied guest.
For example, a room with a maximum occupancy of 5 guests and a nightly rate of $300 might be configured with a $20 discount per unoccupied guest.
| Guests | Nightly price |
|---|---|
| 5 | $300 |
| 4 | $280 |
| 3 | $260 |
| 2 | $240 |
| 1 | $220 |
Displaying occupancy pricing
To retrieve accommodation prices that include occupancy discounts and date-specific price overrides, use the Accommodation Availability tag.
{% accommodation_availability variant %}
{% for day in result.days %}
<p>On {{ day.date | date: "%b %d, %y" }}</p>
{% for price in day.prices %}
<p>
{{ price.occupancy }} adult(s):
{{ price.fractional | money }}
</p>
{% endfor %}
{% endfor %}
{% endaccommodation_availability %}If the standard nightly price is $300 and a $20 occupancy discount is applied, the output might look like:
<p>On Nov 07, 23</p>
<p>1 adult: $220.00</p>
<p>2 adults: $240.00</p>
<p>3 adults: $260.00</p>
<p>4 adults: $280.00</p>
<p>5 adults: $300.00</p>Developer considerations
- Use
variant.priceswhen displaying tiered pricing for Experience variants. - Use the Accommodation Availability tag when displaying Accommodation pricing.
- Accommodation prices returned by the availability tag already include any applicable price overrides and occupancy discounts.
- Always format prices using the
moneyfilter.