How to convert prices to the current currency in Magento 2?
To convert Magento 2 price to current currency, you need to install and enable the Store Switcher extension. Then you need to install the GeoIP database, configure general settings, restrictions, and redirects. Follow the detailed step-by-step instructions that are given below.
So how to configure Magento 2 currency conversion in this extension?
Step 1. First, to install the GeoIP database, make sure the module operates correctly and locates the visitor.
To do this, navigate to Stores > Configuration > Amasty Extensions > GeoIP Data.
Databases can be auto-added or uploaded by you:
- Click the Download and Import button, and the extension will download or update the SQL dump file and then import it into the database itself.
- If you want to load files from your source, use the Import button.
Step 2. After that, you need to configure the extension. Navigate to Stores > Configuration > Amasty Extensions > GeoIP Redirect to do it.
Step 3. Expand the General settings. In the Enable GeoIP Redirect dropdown, choose Yes to enable or No to disable the Store Switcher extension.
Step 4. Next, go to the Restriction settings section.
In the Apply Logic To dropdown, choose the general redirection rules logic among the following options:
- All URLs
- Specified URLs
- All Except Specified URLs
- Redirect From Home Page Only.
Step 5. In the Excepted URLs field, specify URLs exceptions in case you chose the Specified URLs or All Except Specified URLs parameters in the upper section.
Step 6. Then choose search engines to ignore redirection rules in the User Agents field and define IP’s to Ignore in the next field.
Step 7. Set Yes on the First Visit Redirect Only option to turn on the redirection for the first visit only and remember that if you choose No, then users will not be able to change currency and store view.
Step 8. The last section is Redirect Between Websites. Set Yes to redirect visitors between multiple websites.
Step 9. Scroll to the Country to Currency Switch section.
Choose Yes in the Enable Country > Currency dropdown option to enable auto currency switching based on customer’s location. And define country-currency relations by choosing countries and their currencies in the Country to Currency Mapping section. Click Add to create an additional relation.
How to set up Magento 2 currency converter API?
To set up Magento 2 currency converter API, log in to your admin panel and navigate to Stores > Settings > Configuration > General > Currency Setup. Then, scroll down and find the Currency Convertor API section. Enter your API key and set the Connection Timeout in Seconds. Save the changes.
Why do you need to enable Magento 2 currency conversion?
According to research by Epsilon, 80% of buyers prefer to make purchases from a company that offers personalized experiences. And 44% of shoppers are more likely to return to your store after a personalized shopping experience. One of the elements of store personalization is to provide the users with a payment currency that corresponds to their country of residence.
That's it. Currency converter API for Magento 2 configured!
Check the user guide for more extension settings.
Besides changing the currency, this extension has functionality that allows users to be redirected to a specific version of sites, depending on their location, and also allows you to specify URLs for individual countries. It gives you an opportunity to redirect international customers to specific pages.
In addition, you can read the article with the top 30 must-have functionality features for online store where we’ve gathered valuable e-commerce statistics about other useful features for your store, including more detailed statistics on why currency personalization is important.