Last active
March 17, 2017 19:05
-
-
Save sarachisholm/998e6255b4694cb9162428e7d607b782 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
client.fetchProduct('your-product-id').then(function(product) { | |
var html = | |
"<img class='product__image' src='" + product.selectedVariantImage.src + "' >" + | |
"<h2 class='product__title'>" + product.title + "</h2>" + | |
"<a class='product__buy' href='" + | |
product.selectedVariant.checkoutUrl(1) + | |
"'>Buy Now!</a>"; | |
$('#product-1').html(html); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment