Here is an example of the product - and the code is above in my first comment:
https://www.thevelvetcell.com/products/american-motel-signs
eanna
Posts
-
Add HTML | Shopify Buy Button -
Add HTML | Shopify Buy ButtonHi Marius - thank you for getting back to me so quickly.
I am happy to use a workaround - but Armin got the workaround from the code provided in the first post...but now it seems shopify uses different code...so how can I do my workaround?
Is this something a developer could fix for me? I just need to be able to show a button/link on project pages so that buyers can purchase.
This theme is so amazing - I hope we can make it work.
Best
Eanna -
Add HTML | Shopify Buy ButtonHi there - I'm having the exact same problem. Can you show me how you achieved your html edit?
This is the code gives me when I create a buy button:
"<div id='product-component-b6909048211'></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: 'the-velvet-cell.myshopify.com',
apiKey: '195dc061d6ef9847159e73e335970fd6',
appId: '6',
});ShopifyBuy.UI.onReady(client).then(function (ui) { ui.createComponent('product', { id: [6095685505], node: document.getElementById('product-component-b6909048211'), moneyFormat: '%C2%A3%7B%7Bamount%7D%7D', options: {
"product": {
"variantId": "all",
"width": "240px",
"viewData": {
},
"templates": {
"description": "<div class="{{data.classes.product.description}}" data-element="product.description">{{{data.sanitizeDescription}}}</div>"
},
"contents": {
"img": false,
"imgWithCarousel": false,
"title": false,
"variantTitle": false,
"price": false,
"description": false,
"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": "#3582ac",
"font-size": "13px",
"padding-top": "14.5px",
"padding-bottom": "14.5px",
"padding-left": "10px",
"padding-right": "10px",
":hover": {
"background-color": "#30759b"
},
"border-radius": "5px",
":focus": {
"background-color": "#30759b"
}
},
"quantityInput": {
"font-size": "13px",
"padding-top": "14.5px",
"padding-bottom": "14.5px"
},
"compareAt": {
"font-size": "12px"
}
}
},
"cart": {
"contents": {
"button": true
},
"text": {
"title": "Your Cart",
"total": "Total",
"button": "GO TO CHECKOUT"
},
"styles": {
"button": {
"background-color": "#3582ac",
"font-size": "13px",
"padding-top": "14.5px",
"padding-bottom": "14.5px",
":hover": {
"background-color": "#30759b"
},
"border-radius": "5px",
":focus": {
"background-color": "#30759b"
}
},
"footer": {
"background-color": "#ffffff"
}
}
},
"modalProduct": {
"contents": {
"img": false,
"imgWithCarousel": true,
"variantTitle": false,
"buttonWithQuantity": false,
"quantity": false
},
"styles": {
"product": {
"@media (min-width: 601px)": {
"max-width": "100%",
"margin-left": "20px",
"margin-bottom": "50px"
}
},
"button": {
"background-color": "#3582ac",
"font-size": "13px",
"padding-top": "14.5px",
"padding-bottom": "14.5px",
"padding-left": "10px",
"padding-right": "10px",
":hover": {
"background-color": "#30759b"
},
"border-radius": "5px",
":focus": {
"background-color": "#30759b"
}
},
"price": {
"font-size": "14px"
},
"quantityInput": {
"font-size": "13px",
"padding-top": "14.5px",
"padding-bottom": "14.5px"
}
}
},
"toggle": {
"styles": {
"toggle": {
"background-color": "#3582ac",
":hover": {
"background-color": "#30759b"
},
":focus": {
"background-color": "#30759b"
}
},
"count": {
"font-size": "13px"
}
}
},
"productSet": {
"styles": {
"products": {
"@media (min-width: 601px)": {
"margin-left": "-20px"
}
}
}
}
}
});
});
}
})();
/]]>/
</script>"I cant find any "<a href="https://embed..."
Thanks so much - I love your theme but its useless if I cant embed this!