Created
October 3, 2017 22:06
-
-
Save benaubin/14c26701f68e35a0a7bd98e2564bbeaa to your computer and use it in GitHub Desktop.
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 id='product-component-46a813aa036'></div> | |
<script type="text/javascript"> | |
/*<![CDATA[*/ | |
(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: 'bensites.myshopify.com', | |
apiKey: '91488678f1b0bf9790ef9a1f0298faf3', | |
appId: '6', | |
}); | |
ShopifyBuy.UI.onReady(client).then(function (ui) { | |
ui.createComponent('product', { | |
id: [153989840923], | |
node: document.getElementById('product-component-46a813aa036'), | |
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" | |
} | |
}, | |
"title": { | |
"font-size": "26px" | |
}, | |
"price": { | |
"font-size": "18px" | |
}, | |
"compareAt": { | |
"font-size": "15px" | |
} | |
} | |
}, | |
"cart": { | |
"contents": { | |
"button": true | |
}, | |
"styles": { | |
"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" | |
} | |
} | |
} | |
}, | |
"productSet": { | |
"styles": { | |
"products": { | |
"@media (min-width: 601px)": { | |
"margin-left": "-20px" | |
} | |
} | |
} | |
} | |
} | |
}); | |
}); | |
} | |
})(); | |
/*]]>*/ | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment