Shopify/buy-button-js

Product customAttributes no longer working

wigz opened this issue · 0 comments

wigz commented

Hello-

I used to be able to add customAttributes to a product like:

const product = {
id: this.shopifyId,
node: this.$refs.shopifyTarget,
customAttributes: [
{ key: zip_attr_name, value: null },
{ key: promo_attr_name, value: promo_url === undefined ? '' : promo_url },
],
moneyFormat: '${{amount_no_decimals}}',
options: product_options,
}

return this.$shopifyBuyUI.createComponent('product', product)

Then reference them in a template like:

{{#data.customAttributes.0}}
{{value}}
{{/data.customAttributes.0}}

This appears to no longer be working. Was this feature removed? Is there a new alternative? Thank you!