For this project we want to show the correct prices with the correct currency symbol based on the culture.
How would we go ahead and make sure the correct culture is shown?
And if we get the correct culture, will the mollie provider receive the correct amount with the correct currency?
attached some pictures of our setup:
cultures in settings -> shop
currencies in backoffice currency details
product detail price property
front end value (tried keeping euro empty, shows 0)
When you switch languages, you'd need to set in the Vendr SessionManager what the default currency is. Vendr will then use this when it's calculating prices, and then also use this when it creates an order. If you have an open order though, you may also need to set the language / currency of the current order to switch that.
Generally you'd add this logic into some kind of langauge / currency switcher.
Once an orders language / currency is set, it will use those to calculate the right prices and pass those through to the given payment gateway.
To be clear, I could get the needed currency from the store be using VendrApi.GetCurrency(store, iso). Then use VendrApi.SetDefaultCurrency(store.Id, currency.Id, applyToCurrentOrder: true);
Is this the way forward? And do I need to set it once or with every page visit (is the session remembered)?
Yup. This sets a cookie so no need to keep updating, you’ll just update it when the language for the current user changes, ie, via a language switcher
Vary by culture + show the correct values
Hi Matt,
We have a umbraco 10.2, vendr 3.0.4 installation.
For this project we want to show the correct prices with the correct currency symbol based on the culture.
How would we go ahead and make sure the correct culture is shown? And if we get the correct culture, will the mollie provider receive the correct amount with the correct currency?
attached some pictures of our setup:
When you switch languages, you'd need to set in the Vendr
SessionManager
what the default currency is. Vendr will then use this when it's calculating prices, and then also use this when it creates an order. If you have an open order though, you may also need to set the language / currency of the current order to switch that.Generally you'd add this logic into some kind of langauge / currency switcher.
Once an orders language / currency is set, it will use those to calculate the right prices and pass those through to the given payment gateway.
To be clear, I could get the needed currency from the store be using VendrApi.GetCurrency(store, iso). Then use VendrApi.SetDefaultCurrency(store.Id, currency.Id, applyToCurrentOrder: true);
Is this the way forward? And do I need to set it once or with every page visit (is the session remembered)?
Yup. This sets a cookie so no need to keep updating, you’ll just update it when the language for the current user changes, ie, via a language switcher
is working on a reply...