This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>Ticket</h1> | |
<p> | |
Name: {{ booking.name }}</br> | |
Date: {{ booking.start | date: "%m/%d/%Y" }} | |
</p> | |
<h3>Booking Details:</h3> | |
<ul> | |
{% for item in booking.items %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p>Hi {{ booking.name }},</p> | |
<p>This is a reminder from {{ shop.name }} about your upcoming booking on {{ booking.start | date: "%m/%d/%Y" }}.</p> | |
<h3>Your booking:</h3> | |
<ul> | |
{% for item in booking.items %} | |
<li> | |
{{ item.quantity }} x {{ item.product.title }} on {{ booking.start | date: "%m/%d/%Y %-I:%M %p" }} | |
</li> | |
{% endfor %} | |
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
bundles = []; | |
{% for variant in product.variants %}{% if variant.metafields.sva.bundled %} | |
bundles['{{ variant.id }}'] = jQuery.parseJSON('{{ variant.metafields.sva.bundled }}'); | |
{% endif %}{% endfor %} | |
var process = function (target, results) { | |
var deferred = $.Deferred(); | |
$.ajax({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% comment %} | |
Checks if the product is already in the cart and if | |
so hides the booking form and displays a message. | |
Install Instructions: | |
1. Create a new snippet called 'booking-guard' and paste this code. | |
2. Include this new snippet in the existing booking-form snippet, and set the initial style of the booking form |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* BookThatApp Customization */ | |
.ui-datepicker table {font-size: .9em; margin-bottom: inherit;} | |
.ui-datepicker table tr th {font-weight:bold; background: initial; text-align:center; padding: .7em .3em !important; border: 0;} | |
.ui-datepicker table tr td {font-weight:bold; background: initial; text-align:center; border: 0;} | |
@media only screen and (max-width: 767px) { | |
.ui-datepicker tr { | |
display: table-row; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% comment %} | |
BookThatApp auto installed snippet. Changes made to this file will be lost if installed again. | |
{% endcomment %} | |
{% if product.metafields.bookthatapp.config %} | |
{% unless bta_configured %} | |
<div class="booking-form"> | |
<p id="bta-loading" class="loading">Loading availability...</p> | |
<div id="variant-in-cart" style="display:none"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*============================================================================ | |
Ajax the add to cart experience by revealing it in a side drawer | |
Plugin Documentation - http://shopify.github.io/Timber/#ajax-cart | |
(c) Copyright 2015 Shopify Inc. Author: Carson Shold (@cshold). All Rights Reserved. | |
This file includes: | |
- Basic Shopify Ajax API calls | |
- Ajax cart plugin | |
This requires: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- /snippets/ajax-cart-template.liquid --> | |
{% comment %} | |
This snippet provides the default handlebars.js templates for | |
the ajax cart plugin. Use the raw liquid tags to keep the | |
handlebar.js template tags as available hooks. | |
{% endcomment %} | |
<script id="CartTemplate" type="text/template"> | |
{% raw %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ShopifyAPI | |
class Product | |
def prices | |
variants.collect(&:price).collect(&:to_f) | |
end | |
def price_min | |
prices.min | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% capture bta_url %}{{ shop.permanent_domain | split: '.' | first }}.bookthatapp.com{% endcapture %} | |
{% assign product_ids = "" %}{% for product in collections.events.products %}{% capture product_ids %}{{ product_ids }}{% unless forloop.first %},{% endunless %}{{ product.id }}{% endcapture %}{% endfor %} | |
<script src="//{{ bta_url }}/fullcalendar2/lib/moment.min.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
jQuery(document).ready(function($) { | |
var today = moment(), | |
btacal = { | |
load: function() { | |
if ($('#events').length == 0) return; | |