Perfect Swatches

Regular price $ 0.00
var client = ShopifyBuy.buildClient({ domain: 'xxx.myshopify.com', apiKey: 'xxxxxxxxxxxxxxxx', appId: 'x', }); ShopifyBuy.UI.onReady(client).then(function (ui) { jQuery(".wps-buy-button").each(function () { elementId = ''; productId = jQuery(this).attr("data-id"); varId = jQuery(this).attr("data-var"); if (varId) { elementId = productId + "-" + varId; } else { elementId = productId; } ui.createComponent('product', { id: [parseInt(productId)], variantId: parseInt(varId), node: document.getElementById(elementId), moneyFormat: '%24%7B%7Bamount%7D%7D', options: { "product": { "variantId": varId, "contents": { "img": false, "imgWithCarousel": false, "title": false, "variantTitle": false, "options": (varId == 'all'), "price": false, "description": false, "buttonWithQuantity": false, "quantity": false, }, "styles": { "product": { "@media (min-width: 601px)": { "max-width": "calc(25% - 20px)", "margin-left": "20px", "margin-bottom": "50px" } } } }, "cart": { "contents": { "button": true }, "styles": { "footer": { "background-color": "#ffffff" } } }, "modalProduct": { "contents": { "img": false, "imgWithCarousel": false, "variantTitle": false, "buttonWithQuantity": false, "button": false, "quantity": false }, "styles": { "product": { "@media (min-width: 601px)": { "max-width": "100%", "margin-left": "0px", "margin-bottom": "0px" } } } }, "productSet": { "styles": { "products": { "@media (min-width: 601px)": { "margin-left": "-20px" } } } } } }); }); }); } jQuery(document).ready(function () { ShopifyBuyInit(); });
var client = ShopifyBuy.buildClient({ domain: 'xxx.myshopify.com', apiKey: 'xxxxxxxxxxxxxxxx', appId: 'x', }); ShopifyBuy.UI.onReady(client).then(function (ui) { jQuery(".wps-buy-button").each(function () { elementId = ''; productId = jQuery(this).attr("data-id"); varId = jQuery(this).attr("data-var"); if (varId) { elementId = productId + "-" + varId; } else { elementId = productId; } ui.createComponent('product', { id: [parseInt(productId)], variantId: parseInt(varId), node: document.getElementById(elementId), moneyFormat: '%24%7B%7Bamount%7D%7D', options: { "product": { "variantId": varId, "contents": { "img": false, "imgWithCarousel": false, "title": false, "variantTitle": false, "options": (varId == 'all'), "price": false, "description": false, "buttonWithQuantity": false, "quantity": false, }, "styles": { "product": { "@media (min-width: 601px)": { "max-width": "calc(25% - 20px)", "margin-left": "20px", "margin-bottom": "50px" } } } }, "cart": { "contents": { "button": true }, "styles": { "footer": { "background-color": "#ffffff" } } }, "modalProduct": { "contents": { "img": false, "imgWithCarousel": false, "variantTitle": false, "buttonWithQuantity": false, "button": false, "quantity": false }, "styles": { "product": { "@media (min-width: 601px)": { "max-width": "100%", "margin-left": "0px", "margin-bottom": "0px" } } } }, "productSet": { "styles": { "products": { "@media (min-width: 601px)": { "margin-left": "-20px" } } } } } }); }); }); } jQuery(document).ready(function () { ShopifyBuyInit(); });