Link Search Menu Expand Document

Deposits

For quick reference please see Deposit.

Setting a deposit on a product allows customers to choose to pay a percentage or fixed amount of the total product price at the time of booking, and the remaining balance any time before the due date.

A deposit is set at a product level and applies to all variants and extras of that product. It does not apply to modifiers.

To display the deposit amount in Sites, note;

  • Deposits can be set on both Experience and Accommodation product types, but cannot currently be displayed in Sites for Accommodation types.
  • If a promotion is applied, the deposit applies to the promotional price.
  • If the price is 0, deposit.enabled may return true, but it doesn’t make sense to present a deposit price.
  • If the due date has passed (or is today), the method deposit.enabled will return false, you don’t need to check for this.
  • You cannot access deposits directly through an extra, i.e. extra.deposit returns nil. It must be accessed through the parent product.

Check for the deposit at the product level:

{% if product.deposit.enabled and product.type != 'accommodation' %}
    {% assign deposit_active = true %}
    {% assign deposit_rate = product.deposit.rate %}
{% endif %}

cheapest_price in the following examples is the price with any promotions applied, this may be the full price or the promotional price in its fractional form. See promotions for more information on calculating this.

Display the deposit at the product level (i.e. only the featured variant):

<!-- calculate cheapest_price -->
{% assign deposit_price = cheapest_price | times: deposit_rate | money %}
{% if deposit_active == true and cheapest_price != 0 %}
    {% assign deposit_price = cheapest_price | times: deposit_rate | money %}

    <p>PAY ONLY {{ deposit_price }} DEPOSIT</p>

{% endif %}

When displaying a series summary, the approach is similar (i.e. only the featured variant of the series):

{% if series.featured_variant.product.deposit.enabled %}
    {% assign deposit_active = true %}
    {% assign deposit_rate = series.featured_variant.product.deposit.rate %}
{% endif %}
 <!-- calculate cheapest_price -->
{% if deposit_active == true and cheapest_price != 0 %}
    {% assign deposit_price = cheapest_price | times: deposit_rate | money %}

    <p>PAY ONLY {{ deposit_price }} DEPOSIT</p>

{% endif %}

Note: Experiences in a series will all have 1 departure date. So series.featured_variant.product.deposit.due_date will return a date but this should not be shown in the series summary, as it will be the due date for the specific product rather than relating to the series generally.

You may wish to display the deposit amount for each variant or extra when looping through them:

{% for variant in product.variants %}
    <!-- calculate cheapest_price -->
    {% if deposit_active == true and cheapest_price != 0 %}
        {% assign deposit_price = cheapest_price | times: deposit_rate | money %}

        <p>PAY ONLY {{ deposit_price }} DEPOSIT</p>

    {% endif %}
{% endfor %}

By using the series.featured_variant, the resulting deposit_price may not be the cheapest deposit, however, it is the deposit for the cheapest variant.

Reminder: reset with {% assign deposit_active = false %} when looping through products.