Switch between multiple currencies

Add a currency selector to your theme to let your customers choose the local currency to use while browsing your Shopify store and paying for their orders.

Currency selection

After you enable selling in multiple currencies with Shopify Payments, your customers can browse your store and check out in their local currency. The currency that your customer sees in your store can be set in a few ways:

  • Your store - when a customer visits your store, your store chooses the currency to display based on the geolocation of your customer
  • A link - you can send your customers a link that opens your store in a specific currency.
  • A currency selector - If you want your customers to choose their local currency, then your theme needs a currency selector.

Currency selector

In February 2019, Shopify Liquid objects were introduced to support selling in multiple currencies with Shopify Payments. You need a currency selector that uses these objects. Currency selectors that use different objects don't work when you enable selling in multiple currencies. If you have an incompatible selector in your theme, then you need to replace it with one that uses the currency objects.

Most themes don't include a currency selector by default, so you need to create your own. An example of a theme that includes a currency selector that supports selling in multiple currencies is Debut.

Example currency selector

Liquid currency objects

The following Liquid objects are useful when creating a currency selector:

  • currency - A form that you can use to add a currency selector to your store.

  • currency_selector - A theme tag form that can generate a drop-down list of currencies.

  • shop.currency - An attribute for the shop object that returns the currency of your store.

  • shop.enabled_currencies - An attribute for the shop object that returns the list of currencies that your store accepts.

  • cart.currency - An attribute for the Cart object that returns the currency of the cart. If your store sells in multiple currencies, then the cart.currency is the same as your customer's local (presentment) currency. Otherwise, the cart currency is the same as your store currency.

All Shopify Liquid money amounts are returned in the customer's local (presentment) currency.

Create a currency selector

Use the currency form to create a currency selector.

If you want your currency selector to appear on all pages in your store, then add the currency selector code to the <head> section in your theme.liquid layout

Example currency selector

  • The following example creates a currency selector that sorts and displays the currencies by their ISO code:

        {% form 'currency' %}
         {{ form | currency_selector }}
         <button type="submit">Update</button>
        {% endform %}
  • The following example also creates a currency selector that sorts and displays the currencies by their ISO code. This example uses JavaScript to trigger the currency change rather than a button:

        {% form 'currency' %}
         {{ form | currency_selector }}
        {% endform %}
    To make the currency change occur when a selection is made from the dropdown, you need to add the following JavaScript code to your `theme.js`:
    $('.shopify-currency-form select').on('change', function() {
  • The following example contains a customized currency selector:

      {% form 'currency' %}
      <select name="currency">
        {% for currency in shop.enabled_currencies %}
          {% if currency == cart.currency %}
            <option selected="true">{{currency.iso_code}}</option>
            {% else %}
          {% endif %}
        {% endfor %}
      {% endform %}

    After your customer chooses their currency, the prices in the storefront change to the new currency.

    By default, your customer remains on the same page that they were on before they selected their currency. You can use the return_to type to send your customer to a different page.

    The following example redirects your customers to the collections page:

      {% form 'currency' %}
        {{ form | currency_selector }}
        <input type="hidden" name="return_to" value="/collections/all">
        <button type="submit">Update</button>
      {% endform %}

Ready to start selling with Shopify?

Try it free