Configuring currency rates

Every website selling products uses some kind of currency. Without a valid currency things would start to get messy.

Configuring these currencies is pretty straightforward. The most interesting part is the currency rate exchange. Every day this rate needs to be checked and updated. Decreases in value are important on the product you sell. So choosing the correct default currency needs to be considered appropriately.

Getting ready

To step through this recipe, you will use a Droplet created in Chapter 2, Magento 2 System Tools at DigitalOcean https://www.digitalocean.com/. We will be using an NGINX, PHP-FPM, Composer-based setup including sample data. No other prerequisites are required.

How to do it…

For the purpose of this recipe, let's assume that we need to configure three currencies—US Dollar, Euro, and Pound Sterling—with Magento 2. The following steps will guide you through this.

  1. First log in to the backend of Magento. Go to Stores | Configuration | General | Currency Setup and select the Base Currency. Now select Default Display Currency. When running a multi website or store view, you may need to switch to the appropriate website or store view to change the value.
  2. Next select in the multi select window a currency from British Pound Sterling, Euro, and US Dollar. Hold down the Ctrl key as you select from the list and click Save Config. Make sure you update your cache.
  3. Now go to Stores | Currency Symbols to check if they are correct. Make adjustments when needed.
  4. Now go to Stores | Currency Rates and click on the Import button. Depending on the default currency, the exchange rate between GBP, EUR, or USD is calculated. Check if the rates are correct and click Save Currency Rates. Make sure you update your cache:
    How to do it…
  5. Next open up a new browser and go to your home page. In the top right corner there is a drop-down with all the listed currencies. Select one of them to test if the currencies are correct.
  6. Congratulations, you just finished configuring currency rates in Magento 2.

How it works…

Let's recap and find out what we did throughout the preceding recipe. In Steps 1 through 5, we configured additional currency for our website. Depending on the currencies you are selling, this can be updated in the backend. On the frontend, customers can easily switch and buy in their preferred currency.

There's more…

Would you like to update the currency rates on a daily, weekly, or monthly basis? Go to Stores | Configuration | General | Currency Setup | Scheduled Import Setting and Enable this depending on your needs. This service will update the rates on the selected time basis.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.168.203