The procedure is as follows:
- Take a copy of the existing booking-form snippet.
- Â On the BTA admin page, proceed to the developer guide section, select the product page drop-down and navigate into it.
- In Shopify Admin open the new booking-form snippet and in the part where the date/time inputs are defined you can add a liquid 'if' statement to determine which booking fields to show. In line 29 of the following screenshot you can see we usedÂ
{% if product.type == 'Appointment' %}...{% endif %}: - In the
{% else %}part (line 53 in the screenshot), add the date/time input fields that were in the original booking form (from step 1).Â
If you were to use the product.type as seen in our example, you would have to update your products' Product organization "Type" field in Shopify:
This could become a tedious process if you have hundreds of products added to the app. In that event, a simpler condition checker is using the product.metafields.bookthatapp.json_config.value.profile instead. This property shows the following results for each Booking Type in the app:
- Product - "product"
- Appointment - "appt"
- Tour/Activity - "activity"
- Course - "course"
- Room - "room"
- Class - "class"
On the other hand, when setting up multiple forms for all other booking types, you could use the following condition:
{% if product.metafields.bookthatapp.json_config.value.profile == 'appt' or product.metafields.bookthatapp.config.value.profile == 'appt' %}
Where you would swap 'appt' for the appropriate value with respect to the booking types that you are creating the multiple classic forms for.
Â
Please note: We do not provide support for this customization under our no charge support. If you would like us to provide this customization for you please contact us for a quote and let us know which forms you would like implemented, and how to differentiate when a form should be shown.
Â
Â
Comments
0 comments
Article is closed for comments.