I'm having trouble changing the currency symbol on my Shopify cart using the BuyButton JS library on an external website.
I saw on this post that someone managed to solve it by using the moneyFormat option. But when I do that nothing changes :/
Here is my code:
ui.createComponent('cart', {
toggles: [{
node: document.getElementById('cart_icon'),
}],
options: {
toggle: {
sticky: false,
iframe: false,
},
cart: {
popup: true,
iframe: true,
contents: {
note: false
},
text: {
currency: 'GBP',
}
}
}
})
if (!product_id) {
return
}
ui.createComponent('product', {
id: product_id,
node: document.getElementById('product_holder'),
moneyFormat: '£{{amount}}',
currency: 'GBP',
iframe: true,
options: {
moneyFormat:'£{{amount}}',
product: {
layout: 'hortontal',
contents: {
description: false
},
styles: {
button: {
'background-color': '#EB64A0',
':hover': {
'background-color': '#CF2A75'
}
}
},
}
}
})
Any help is welcome, thank you!