Invoices in multiple currencies

If your Shopify store sells in multiple currencies, Sufio can create and send invoices and receipts to your customers in the same currency they used while shopping in your store. 

Stores running on Shopify are able to display product prices in different currencies, but only allow payments in one base currency during the checkout. Sufio is not able to modify the checkout itself, but it lets customers pay invoices in their local currency afterwards.

Invoice British

Invoice in British Pounds

Enabling invoices in multiple currencies

To create an invoice in a specific currency, two values need to be added as additional order information; a currency code and the currency exchange rate that is used to convert product prices.

These values should be stored as cart attributes named Invoice Currency and Invoice Currency Rate.

For instance, if your store uses US dollars (USD) as a base currency, but you want to create an invoice in euros (EUR), you should add the following cart attributes to the cart page.

<input type="hidden" name="attributes[Invoice Currency]" value="EUR" />
<input type="hidden" name="attributes[Invoice Currency Rate]" value="0.9" />

Shopify apps

Stores in multiple currencies usually use one of the Shopify apps that allow to display product prices in different currencies. 

Coin

Coin is a great multi-currency Shopify app. It is easy to set up, updates the prices in your store every hour and even allows you to round your prices to whole numbers.

If you use the Coin app in your store, you can start creating invoices in a different currency by adding a code snippet to the cart file in your theme.

To install the code snippet to your store:

  1. Go to the page Online Store→ Themes in your Shopify store admin.
  2. Click the Actions button, then click Edit code.
  3. Select cart.liquid in the left sidebar.
  4. Insert the code snippet before the </form> tag.
<!-- Integration between Sufio and Coin apps to enable multi-currency support. -->
<div class="invoice-currency-container" style="display:none;">
    <input type="hidden" id="invoice-currency" name="attributes[Invoice Currency]" value="" />
    <input type="hidden" id="invoice-currency-rate" name="attributes[Invoice Currency Rate]" value="" />
    <input type="hidden" id="invoice-usd-rate" name="attributes[Invoice USD Rate]" value="" />
</div>
<script type="text/javascript">
    updateInvoiceCurrency = function() {
        $("input#invoice-currency").val(window.Shoppad.apps.coin.getLocalCurrency());
        $("input#invoice-currency-rate").val(window.Shoppad.apps.coin.getLocalCurrencyUSDExchangeRate() / window.Shoppad.apps.coin.getBaseCurrencyUSDExchangeRate());
        $("input#invoice-usd-rate").val(window.Shoppad.apps.coin.getLocalCurrencyUSDExchangeRate());      
    };
    $(window).on('load', function() {
        updateInvoiceCurrency();
    });
    $( document ).on( "shoppad:coin:currencychange", function() {
        updateInvoiceCurrency();
    });
</script>

Note

If your store uses cart drawer (also called ajax cart), this code snippet needs to be added to a different file than cart.liquid. In most cases, it needs to be added to ajax-cart-template.liquid file.

Currency Converter Plus

Currency Converter Plus is a great currency converter app that requires no coding skills to install and configure. It includes automatic country detection and exchange rates are updated every minute.

Configuring the app to allow you to create invoices in a different currency is very simple:

  1. Open the application's Preferences page.
  2. In the Shopping cart section, click on Additional settings.
  3. Make sure the Enable cart tracking attributes checkbox is selected.

Shopify theme customization

If you have manually updated your theme to display multiple currencies as described in the article Showmultiple currencies in a drop-down list on your storefront, insert the following code snippet to the cart file in your theme.

<!-- Integration between Sufio and Shopify themes with multi-currency support. -->
<div class="invoice-currency-container" style="display:none;">
    <span class=money id="currency-rate">1.00</span>
    <input type="hidden" id="invoice-currency" name="attributes[Invoice Currency]" value="" />
    <input type="hidden" id="invoice-currency-rate" name="attributes[Invoice Currency Rate]" value="" />
</div>
<script type="text/javascript">
    updateInvoiceCurrency = function() {
    	$("input#invoice-currency").val($("span#currency-rate").attr("data-currency")); 
        $("input#invoice-currency-rate").val(Number($('span#currency-rate').text().replace(/[^0-9\.]+/g,"").replace(/^[^0-9]+/g,"").replace(/[^0-9]+$/g,"")));
    };
    $("select.currency-picker").change(function() {
      updateInvoiceCurrency();
    });
    $(window).load(function() {
      updateInvoiceCurrency();
    });
    var observerTarget = $("span#currency-rate")[0];
    var observerConfig = { attributes: true, childList: true, characterData: true };
    var observer = new MutationObserver(function( mutations ) {
      mutations.forEach(function( mutation ) {
      	updateInvoiceCurrency();
      });    
    });
    observer.observe(observerTarget, observerConfig);
</script>

Need help?

Do you need any help with setting up invoices in multiple currencies for your store? Contact one of our Shopify Expert partners and they will be happy to help you!