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
function addToCart(e){ | |
if (typeof e !== 'undefined') e.preventDefault(); | |
// make sure BTA has loaded | |
if ($('#add-to-cart').hasClass('bta-load-enable')) { | |
alert('Please wait while we look up class availability'); | |
return false; | |
} | |
var form = $(this).parents('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
span.ui-icon {color: transparent;} /* hide background text */ | |
#ui-datepicker-div { display: none; margin-bottom:20px} | |
#booking-start {margin-bottom: 10px} |
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
; 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(); | |
Shopify.getProduct(target.handle, function(product) { | |
var multiplier = target.multiplier || 1, |
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
var selectVariant = function(form) { | |
var start = form.getStartDate(), | |
finish = form.getFinishDate(); | |
if (start && finish) { | |
var quantity = bta.dayDelta(start, finish), minutes = (quantity * 1440); | |
$('#quantity').val(quantity); | |
var index = -1, low = 0, | |
configs = bta.parseVariantConfigs(form.datepicker('start').attr('data-bta-variant-config')); |
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 style="margin:10px 0"> | |
<label for="bta-product-select">Class</label> | |
<select id="bta-product-select"> | |
<option value="">All Classes</option> | |
{% for product in products %} | |
<option value="{{ product.handle }}">{{ product.title }}</option> | |
{% endfor %} | |
</select> | |
</p> |
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.tags contains 'Booking Party' %} | |
<label for="booking-party">Number of Participants</label> | |
<div class="selector-wrapper"> | |
<select id="booking-party" name="properties[booking-party]"> | |
{% for n in (1..30) %} | |
<option>{{ n }}</option> |
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 clearfix"> | |
<div class="selector-wrapper"> | |
{% capture attribute %}booking-start{% endcapture %} | |
<label for="{{ attribute }}">From:</label> |
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
$('form[action*="/cart/add"]').submit(function(e) { | |
var btaForm = $(this).data('bta.bookingForm'); | |
if ((typeof(btaForm) != "undefined") && !btaForm.isValid()) { | |
e.stopImmediatePropagation(); // prevents BTA's default form submit handler which also checks for validity | |
return false; | |
} | |
// regular Ajax submit from here... | |
} |
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
<div class="span9"> | |
<h1>Art Class Calendar</h1> | |
<hr /> | |
<em>Sign up for adult classes by clicking the painting on the calendar you would like to come paint.</em> | |
<div id="bta-calendar"></div> | |
</div> | |
<script src="{{ shop.bookthatapp }}/fullcalendar/fullcalendar.js" type="text/javascript"></script> | |
<script src="{{ shop.bookthatapp }}/javascripts/xdate.js" type="text/javascript"></script> |
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
{% unless settings.shipping_calculator == 'Disabled' %} | |
<div id="shipping-calculator-container" class="clearfix"> | |
<div id="shipping-calculator" class="fl"> | |
<h3>{{ settings.shipping_calculator_heading }}</h3> | |
<div> | |
<p> | |
<label for="address_country">Country</label> | |
<select id="address_country" name="address[country]" data-default="{% if shop.customer_accounts_enabled and customer %}{{ customer.default_address.country }}{% elsif settings.shipping_calculator_default_country != '' %}{{ settings.shipping_calculator_default_country }}{% endif %}">{{ country_option_tags }}</select> | |
</p> | |
<p id="address_province_container" style="display:none;"> |
OlderNewer