Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Sander Los 27 posts 160 karma points
    Jan 20, 2023 @ 14:06
    Sander Los
    0

    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:

    • cultures in settings -> shop
    • currencies in backoffice currency details
    • product detail price property
    • front end value (tried keeping euro empty, shows 0)
    • cultures set on home node

    cultures in settings -> shop

    currencies in backoffice currency details product detail price property front end value (tried keeping euro empty, shows 0 cultures set on home node

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jan 20, 2023 @ 14:49
    Matt Brailsford
    100

    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.

  • Sander Los 27 posts 160 karma points
    Jan 20, 2023 @ 15:23
    Sander Los
    0

    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)?

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jan 20, 2023 @ 15:40
    Matt Brailsford
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft