shopify - Shopify BuyButton moneyFormat 不起作用
问题描述
我在使用外部网站上的 BuyButton JS 库更改 Shopify 购物车上的货币符号时遇到问题。
我在这篇文章中看到有人设法通过使用 moneyFormat 选项来解决它。但是当我这样做时,什么都没有改变:/
这是我的代码:
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'
}
}
},
}
}
})
欢迎任何帮助,谢谢!
解决方案
推荐阅读
- git - 在没有文件的情况下将 repo 状态推送到远程
- flash - 保存简单 Flash 游戏的关卡?
- java - 袋子 remove() 方法
- scala - 如何评估对链中最后一个成功步骤的理解?
- javascript - Dragover:无法向左和顶部移动
- r - R - dplyr mutate with function 只检查第一行
- javascript - 使用其上下文调用原始回调函数
- javascript - 在 Chrome 开发人员控制台中加载页面后 window.onload 不起作用
- python - 在 Python 中使用 æ、ø 和 å
- java - Java Selenium“findElement”找不到现有对象