# Docs Question: Currency Switcher - Missing info about code in controller?

**URL:** <https://forum.umbraco.com/t/docs-question-currency-switcher-missing-info-about-code-in-controller/7890>\
**Category:** Questions\
**Tags:** umbraco-commerce, v17\
**Created:** [April 17, 2026, 2:34pm UTC](https://forum.umbraco.com/t/docs-question-currency-switcher-missing-info-about-code-in-controller/7890 "2026-04-17T14:34:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![warren](https://forum.umbraco.com/user_avatar/forum.umbraco.com/warren/32/78_2.png) [@warren](https://forum.umbraco.com/u/warren)\
**Post date:** [April 17, 2026, 2:34pm UTC](https://forum.umbraco.com/t/docs-question-currency-switcher-missing-info-about-code-in-controller/7890/1 "2026-04-17T14:34:20Z")

</div>

Hello 👋  
I am looking at the documentation for Implementing a Currency Switcher

> **[hashtagCreate a Currency Switcher Component - Implementing a Currency Switcher |...](https://docs.umbraco.com/umbraco-commerce/how-to-guides/currency-switching#create-a-currency-switcher-component)**
>
> In a globalized world, it is essential to provide users with the ability to switch between different currencies. This feature is especially important for e-commerce websites that cater to customers from different countries. | Learn how to implement a...

## Question

The partial has a form POST submission to a controller  
Am I missing something or a reference to this in a previous article perhaps?

```auto
 @using (Html.BeginUmbracoForm("ChangeCountry", "Culture", FormMethod.Post, new { @name = "changeCountryForm" }))

```

But currently from this page I have no idea what happens inside the controller method and what it should do in order to switch the currency of the order.

Cheers,  
Warren 🙂

---

<div class="post-metadata">

**Author:** ![EssCee](https://forum.umbraco.com/user_avatar/forum.umbraco.com/esscee/32/3305_2.png) [@EssCee](https://forum.umbraco.com/u/EssCee)\
**Post date:** [April 17, 2026, 3:07pm UTC](https://forum.umbraco.com/t/docs-question-currency-switcher-missing-info-about-code-in-controller/7890/3 "2026-04-17T15:07:34Z")

</div>

Not sure if this is what your after/or helps

> **[Implementing a Currency Switcher | Commerce 16.latest | Umbraco Documentation](https://docs.umbraco.com/umbraco-commerce/16.latest/how-to-guides/currency-switching)**
>
> Learn how to implement a currency switcher in Umbraco Commerce.

---

<div class="post-metadata">

**Author:** ![warren](https://forum.umbraco.com/user_avatar/forum.umbraco.com/warren/32/78_2.png) [@warren](https://forum.umbraco.com/u/warren)\
**Post date:** [April 17, 2026, 3:20pm UTC](https://forum.umbraco.com/t/docs-question-currency-switcher-missing-info-about-code-in-controller/7890/4 "2026-04-17T15:20:43Z")

</div>

Thanks that did indeed help @EssCee and for anyone wanting to know/see the code directly in the post here and save yourself a click then its here…

### CultureSurfaceController.cs

```csharp
public class CultureSurfaceController : SurfaceController
{
    private readonly IUmbracoCommerceApi _commerceApi;

    public CultureSurfaceController(
        IUmbracoContextAccessor umbracoContextAccessor, 
        IUmbracoDatabaseFactory databaseFactory, 
        ServiceContext services, 
        AppCaches appCaches, 
        IProfilingLogger profilingLogger, 
        IPublishedUrlProvider publishedUrlProvider,
        IUmbracoCommerceApi commerceApi) 
        : base(umbracoContextAccessor, databaseFactory, services, appCaches, profilingLogger, publishedUrlProvider)
    {
        _commerceApi = commerceApi;
    }
    
    [HttpPost]
    public async Task<IActionResult> ChangeCountry(ChangeCountryDto changeCountryDto)
    {
        var store = CurrentPage.GetStore();
        var country = await _commerceApi.GetCountryAsync(store.Id, changeCountryDto.CountryIsoCode);
        var currency = await _commerceApi.GetCurrencyAsync(country.DefaultCurrencyId.Value);
    
        await _commerceApi.SetDefaultPaymentCountryAsync(store.Id, country);
        await _commerceApi.SetDefaultShippingCountryAsync(store.Id, country);
        await _commerceApi.SetDefaultCurrencyAsync(store.Id, currency);
    
        var currentOrder = await _commerceApi.GetCurrentOrderAsync(store.Id);
        if (currentOrder != null)
        {
            await _commerceApi.Uow.ExecuteAsync(async uow =>
            {
                var writableOrder = await currentOrder.AsWritableAsync(uow)
                    .ClearPaymentCountryRegionAsync()
                    .ClearShippingCountryRegionAsync()
                    .SetCurrencyAsync(currency.Id);
    
                await _commerceApi.SaveOrderAsync(writableOrder);
    
                uow.Complete();
            });
        }
    
        return RedirectToCurrentUmbracoPage();
    }
}

```

### ChangeCountryDto.cs

```csharp
public class ChangeCountryDto
{
    public string CountryIsoCode { get; set; }
}

```

---

<div class="post-metadata">

**Author:** ![system](https://forum.umbraco.com/uploads/default/original/1X/624adeddd330a3d0268a184db47946ca7e82c676.png) [@system](https://forum.umbraco.com/u/system)\
**Post date:** [June 16, 2026, 3:20pm UTC](https://forum.umbraco.com/t/docs-question-currency-switcher-missing-info-about-code-in-controller/7890/5 "2026-06-16T15:20:56Z")

</div>

Closed on June 16, 2026, 3:20pm UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
