-
Notifications
You must be signed in to change notification settings - Fork 121
Open
Description
Hello,
We now use markets (and Shopify Payments) to allow our customers to pay in their local currency.
We had already integrated the possibility of retrieving the translated content of the store by setting up the client:
const client = ShopifyBuy.buildClient({
domain: shopify.domain,
storefrontAccessToken: shopify.token,
language: shopify.language
})How is it possible to set the currency (or market country)?
When the customer adds a product to the cart and proceeds to payment, the local currency is displayed correctly only when he has entered his delivery address (step 2).
Is it possible to also force the opening of the cart in a certain currency (other than the base currency of the store)?
(we also had to adapt the script to force the language of the shopping cart because the configuration of the language at the client level was not sufficient:
cart: {
events: {
beforeInit(cart) {
const actualOpen = cart.checkout.open
cart.checkout.open = function (url) {
const newUrl = new URL(url)
newUrl.searchParams.set('locale', shopify.language)
let finalUrl = newUrl.toString()
actualOpen.call(this, finalUrl)
}
}
}
})
Thanks!
Toooorch, simoncrypta and petrutoader
Metadata
Metadata
Assignees
Labels
No labels