Test
(function () {
var scriptURL = 'https://sdks.shopifycdn.com/buy-button/latest/buy-button-storefront.min.js';
if (window.ShopifyBuy) {
if (window.ShopifyBuy.UI) {
ShopifyBuyInit();
} else {
loadScript();
}
} else {
loadScript();
}
function loadScript() {
var script = document.createElement('script');
script.async = true;
script.src = scriptURL;
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(script);
script.onload = ShopifyBuyInit;
}
function ShopifyBuyInit() {
var client = ShopifyBuy.buildClient({
domain: 'empire-merch.myshopify.com',
storefrontAccessToken: '359829205fafe1f9a8ec7c9860c622cd',
});
ShopifyBuy.UI.onReady(client).then(function (ui) {
ui.createComponent('product', {
id: [6527177223],
node: document.getElementById('product-component-4257beda568'),
moneyFormat: '%24%7B%7Bamount%7D%7D',
options: {
"product": {
"layout": "horizontal",
"variantId": "all",
"width": "100%",
"contents": {
"img": false,
"imgWithCarousel": true,
"variantTitle": false,
"description": true,
"buttonWithQuantity": false,
"quantity": false
},
"styles": {
"product": {
"text-align": "left",
"@media (min-width: 601px)": {
"max-width": "100%",
"margin-left": "0",
"margin-bottom": "50px"
}
},
"button": {
"background-color": "#d44046",
":hover": {
"background-color": "#bf3a3f"
},
":focus": {
"background-color": "#bf3a3f"
}
},
"title": {
"font-size": "26px",
"color": "#ffffff"
},
"description": {
"color": "#ffffff"
},
"price": {
"font-size": "18px",
"color": "#ffffff"
},
"compareAt": {
"font-size": "15px",
"color": "#ffffff"
}
}
},
"cart": {
"contents": {
"button": true
},
"styles": {
"button": {
"background-color": "#d44046",
":hover": {
"background-color": "#bf3a3f"
},
":focus": {
"background-color": "#bf3a3f"
}
},
"footer": {
"background-color": "#ffffff"
}
}
},
"modalProduct": {
"contents": {
"img": false,
"imgWithCarousel": true,
"variantTitle": false,
"buttonWithQuantity": true,
"button": false,
"quantity": false
},
"styles": {
"product": {
"@media (min-width: 601px)": {
"max-width": "100%",
"margin-left": "0px",
"margin-bottom": "0px"
}
},
"button": {
"background-color": "#d44046",
":hover": {
"background-color": "#bf3a3f"
},
":focus": {
"background-color": "#bf3a3f"
}
},
"description": {
"color": "#ffffff"
}
}
},
"toggle": {
"styles": {
"toggle": {
"background-color": "#d44046",
":hover": {
"background-color": "#bf3a3f"
},
":focus": {
"background-color": "#bf3a3f"
}
}
}
},
"productSet": {
"styles": {
"products": {
"@media (min-width: 601px)": {
"margin-left": "-20px"
}
}
}
}
}
});
});
}
})();
/*]]>*/