Copied to clipboard

Flag this post as spam?

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


  • Victor Bjørholm 41 posts 121 karma points
    Jul 23, 2020 @ 12:13
    Victor Bjørholm
    0

    Stripe - select country on site

    Hi Matt, I finally have all the basics of my webshop up and running. I can finalize transactions and they show up as captured in the Commerce section in Umbraco. Now I only have one issue left, I need to be able to select a country and have it show the local price with the local currency. I can't seem to find any documentation on this, is that right?

  • Matt Brailsford 2807 posts 14331 karma points MVP 7x c-trib
    Jul 23, 2020 @ 12:20
    Matt Brailsford
    0

    Hi Victor,

    I don't think this has been fully documented yet, but the top level answer would be that within your store settings you define the currencies that you want to support. Then on your products, the price field will allow you to enter a price for each currency.

    On the site then, you'll want to create a language picker which will need to list the currencies supported by store and then when a currency is selected you can call the session managers SetDefaultCurrency(storeId, currencyId, applyToCurrentOrder:true) to set the current sessions currency and to set the current orders currency to that selected currency.

    When you show prices on the site via Vendr's CalculatePrice methods, this will now take into account the order / session currency to determine which price is displayed.

    Hope this helps

    /Matt

  • Victor Bjørholm 41 posts 121 karma points
    Jul 23, 2020 @ 12:34
    Victor Bjørholm
    0

    Hi Matt, Thanks for the quick answer. Just to be sure I understood it, will the CalculatePrice method, automatically take into account which currency was selected via the SetDefaultCurrency? What do I do about taxes then? Taxes may vary by country and not by currency. Especially in the US where the taxes differ statewise

  • Matt Brailsford 2807 posts 14331 karma points MVP 7x c-trib
    Jul 23, 2020 @ 12:43
    Matt Brailsford
    0

    Hi Victor,

    Yes, the CalculatePrice method will take into account the current currency.

    Regarding Tax, the first thing you'll have to do is setup all the countries / regions your store needs to support in the stores countries settings section.

    Then, you can either define one tax class and provide tax rates for each of the countries / regions. Or you can define different tax rates and call the session managers SetDefaultTaxClass(storeId, taxClassId, applyToCurrentOrder:true) to change the default tax class of the current session.

    /Matt

  • Victor Bjørholm 41 posts 121 karma points
    Jul 23, 2020 @ 12:53
    Victor Bjørholm
    0

    Alright thanks. That seems doable :) I currently have some issues creating US as a country. Whenever I try to create it, I run into this issue

    Failed to save country United States of America: An error has occurred. I can create other countries without any issues, but for some reason I can't create this one.

  • Matt Brailsford 2807 posts 14331 karma points MVP 7x c-trib
    Jul 23, 2020 @ 12:56
    Matt Brailsford
    0

    Are you creating it from the blank menu option? Or the "New country from ISO 3166 ISO preset" option?

  • Victor Bjørholm 41 posts 121 karma points
    Jul 23, 2020 @ 12:58
    Victor Bjørholm
    0

    The "New country from ISO 3166 ISO preset" option

  • Matt Brailsford 2807 posts 14331 karma points MVP 7x c-trib
    Jul 23, 2020 @ 13:00
    Matt Brailsford
    0

    Ok, I can see it's doing it on the demo store too so I'll raise a bug on the issue tracker for this and take look 👍

    Update1: https://github.com/vendrhub/vendr/issues/159

    Update2: I've found the issue and fixed it locally. The fix will be in an upcoming 1.2.7 patch release

  • Victor Bjørholm 41 posts 121 karma points
    Jul 23, 2020 @ 13:06
    Victor Bjørholm
    0

    Alright, thank you very much 😄 One last question. When we are to ship products to US customers, it is of course important to know which state they are based in. Does the checkout package support a state picker/input box when US is selected as a country?

  • Matt Brailsford 2807 posts 14331 karma points MVP 7x c-trib
    Jul 23, 2020 @ 13:26
    Matt Brailsford
    0

    Good question, I don't think we do currently. It's just based on the simplified country selection. I'll add that as an issue too 👍

    Update: Issue raised here https://github.com/vendrhub/vendr-checkout/issues/8

Please Sign in or register to post replies

Write your reply to:

Draft