Skip to content

Instantly share code, notes, and snippets.

var productNodes = document.querySelectorAll('[data-shopify-product]');
Array.prototype.slice.call(productNodes).forEach(function (node) {
var productId = node.dataset.shopifyProduct;
ui.createComponent('product', {
id: productId,
node: node,
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment