Shopify Bookings

Documentation

Liquid Rendering

Rendering information about your Event or Course in liquid is easy!

{% for product in collection.products %}
  {% assign metafields = product.first_available_variant.metafields.bookings %}
  {% case metafields.bookable_type %}
    {% when 'event' %}
      <p>Start time: {{ metafield.starts_at }}</p>
      <p>End time: {{ metafield.ends_at }}</p>
    {% when 'course' %}
      <p>Course Sessions:</p>
      {% for session in metafields.sessions %}
       <p>Start time: {{ session.starts_at }}</p>
       <p>End time: {{ session.ends_at }}</p>
      {% endfor %}
    {% when 'service' %}
      <p>{{ product.title }}</p>
      <p>Start time: {{ metafield.starts_at }}</p>
      <p>End time: {{ metafield.ends_at }}</p>
    {% else %}
      This product is not bookable
  {% endcase %}
{% endfor %}

Services don't have specific start and end times. Since their availability is dynamic, they have to be booked using our Service Booking Widget.

Last updated