Instructions:
-
Add a hidden quantity field for BTA products in the booking-form.liquid snippet:
<input type="hidden" id="quantity" name="quantity" value="1" />
-
Make sure the normal quantity input is not rendered for BTA products (e.g. in sections/product-template.liquid).
For example, this is how it should look on the Debut theme (sections/product-template.liquid:183):
{% if section.settings.show_quantity_selector %}
{% unless product.metafields.bookthatapp.config %}
<div class="product-form__item product-form__item--quantity">
<label for="Quantity">{{ 'products.product.quantity' | t }}</label>
<input type="number" id="Quantity" name="quantity" value="1" min="1" class="product-form__input" pattern="[0-9]*">
</div>
{% endunless %}
{% endif %}
- Add the input for units:
<input type="number" id="units" name="properties[Units]" value="1" min="1" pattern="[0-9]*" />
Note: this is just a regular line item property with the name 'Units'.
It should go just after <div class="booking-form">
You will probably need to copy the markup/CSS classes so that it looks nice. Here is how it should look for Debut (including the hidden quantity input field):
<input type="hidden" id="quantity" name="quantity" value="1" />
<div class="product-form__item product-form__item--quantity">
<label for="Quantity">{{ 'products.product.quantity' | t }}</label>
<input type="number" id="units" name="properties[Units]" value="1" min="1" class="product-form__input" pattern="[0-9]*" />
</div>
-
Copy the ProductRental Javascript to the booking form snippet (it goes inside the
<script>
tags). -
Update cart.liquid as per the cart template section.
-
If the theme shows a count of items in the cart header update it per the cart count section.
Please contact us at [email protected] if you need help with this or would like a quote to have us install it for you.