Javascript 通过JS—购买Shopify按钮;购物车显示错误的货币
我已通过集成Shopify。 一切正常,但购物车显示的货币错误(它显示的是美元而不是欧元)。 我已经通过Shopify管理仪表板(位于Javascript 通过JS—购买Shopify按钮;购物车显示错误的货币,javascript,shopify,shopify-app,shopify-javascript-buy-sdk,Javascript,Shopify,Shopify App,Shopify Javascript Buy Sdk,我已通过集成Shopify。 一切正常,但购物车显示的货币错误(它显示的是美元而不是欧元)。 我已经通过Shopify管理仪表板(位于https://domain.myshopify.com/admin)。商店的主要货币设置为EUR,我可以通过cart.text.currency参数设置货币。我这样做了,但没有改变什么。这是虫子吗 到目前为止,我的JS代码: <script src="//sdks.shopifycdn.com/buy-button/1.0.0/buybutton.js"&
https://domain.myshopify.com/admin
)。商店的主要货币设置为EUR
,我可以通过cart.text.currency
参数设置货币。我这样做了,但没有改变什么。这是虫子吗
到目前为止,我的JS代码:
<script src="//sdks.shopifycdn.com/buy-button/1.0.0/buybutton.js"></script>
<script>
var client = ShopifyBuy.buildClient({
domain: 'domain.myshopify.com',
storefrontAccessToken: '2b3xxxxxxxxjh5', // previously apiKey, now deprecated
});
ui = ShopifyBuy.UI.init(client);
ui.createComponent('product', {
id: 23xxxxxx56,
node: document.getElementById('my-product'),
options: {
"product": {
"iframe": true
},
toggle: {
"iframe": true
},
cart: {
"iframe": true,
"popup": false,
"text": {
"title": 'Warenkorb',
"empty": 'Dein Warenkorb ist leer.',
"button": 'Jetzt bestellen',
"total": 'Gesamt',
"currency": 'EUR',
}
}
});
</script>
检查以确保显示购物车的主题代码符合货币设置。您的主题可能只是因为主题代码与货币无关而显示美元符号。带货币的液体过滤货币通常用于此目的。检查以确保显示购物车的主题代码符合货币设置。您的主题可能只是因为主题代码与货币无关而显示美元符号。液体过滤货币通常用于此目的。这对我有用,谢谢!这对我有用,谢谢!
shopifyUI.createComponent('product', {
id: 23xxxxxx56,
node: document.getElementById('shopify-button-buy-regular'),
moneyFormat: '€{{amount_no_decimals}}',
options: shopifyOptions
});