Skip to content

Instantly share code, notes, and snippets.

View NicolaBizzoca's full-sized avatar

NicolaBizzoca

View GitHub Profile
{% unless product.content contains 'zakeke-design-tag' %}
{% if product.tags contains 'zakeke-product' or product.content contains 'zakeke-product-tag' %}
<button id="zakeke-product-button-custom" class="btn button">
<span>Customize</span>
</button>
<script>
(function () {
const btn = document.querySelector("#zakeke-product-button-custom");
btn.addEventListener("click", function (event) {
event.preventDefault();
<script>
(function () {
function getCheckoutButtons() {
return Array.from(document.querySelectorAll('[name=checkout], [href*=checkout]:not([href*=\'/tools/checkout/front_end/login\']), [action*=checkout] [type=submit], [onclick*=checkout], .additional-checkout-button:not(.additional-checkout-button--apple-pay)'));
}
function getCart(callback) {
var xhr = new XMLHttpRequest();
xhr.open('GET', '/cart.json', true);
xhr.setRequestHeader('Accept', 'application/json');