File: snippets/product__form.liquid
Code:
<!-- Sesami -->
{% if product.tags contains 'sesami-service' %}
<div id="sesami__buttonWrapper" data-sesami-product-id="{{product.id}}" data-sesami-variant-id="{{product.variants[0].id}}"></div>
<script>
window.addEventListener('sesamiLoaded',function(){
var sesami_time_button = $("#sesami__buttonWrapper .sesami__button");
sesami_time_button.addClass("product-submit action-button");
var sesami_date = document.getElementById('sesami-date-0');
sesami_date.addEventListener("change", function(){
var addToCartButton = document.getElementById('add_to_cart_container');
addToCartButton.classList.remove("disabledbutton");
});
})
</script>
{% endif %}
{% if product.tags contains 'sesami-service' %}<div id="add_to_cart_container" class="disabledbutton">{% endif %}
<!-- Sesami -->
<!-- Sesami -->
{% if product.tags contains 'sesami-service' %}</div>{% endif %}
<!-- Sesami -->
---
File: Style.scss.liquid
Code:
/* Sesami */
.disabledbutton {
pointer-events: none;
opacity: 0.4;
}
.sesami__button {
}
/* Sesami */