Solve the problem of currency rate conversion in Magento 1.9

Solve The Problem Of Currency Rate Conversion In Magento 1.9

This article is about how to solve the problem of currency rate conversion in Magento 1.9, using Payserv GoogleFinance module.

Magento 1.9 uses Webservicex as the default service for currency rate conversion. However, Webservicex has stopped working for some time as of writing this blog. Hence there is a need to look for another service.

Payserv_GoogleFinance is the alternate to Webservicex for currency rate conversion.

To test the Payserv_GoogleFinance service, you can use this URL.

You can find the source code of the module at Github.

Once you download the source code files, follow steps as mentioned below to install the Payserv_GoogleFinance module:

Let’s copy the source code files at the appropriate location in the Magento store files first.

1. Create a folder with name ‘Payserv’ under store/app/code/community where ‘store’ is your base directory for the Magento store. Create another directory with name ‘GoogleFinance’ under ‘Payserv’.

2. Create a folder with name ‘Model’ under ‘GoogleFinance’ newly created in step 1. Copy Google.php from the source code under this directory.

Now, there needs to make a small correction to the source file Google.php at line #32 pertaining to the URL to be referred to get the exchange rates. The correct line should be as below:

protected $_url = ‘{{CURRENCY_FROM}}&to={{CURRENCY_TO}}’;

3. Create a folder with name ‘etc’ under ‘GoogleFinance’ newly created in step 1. Copy config.xml from the source code under this directory.
Let’s create the module file now:

4. Go to store/app/etc/modules directory. Here, create a file with name ‘Payserv_GoogleFinance.xml’ and the code lines as shown below within it.

<?xml version="1.0"?>

5. Flush the cache from Admin panel – System> Cache Management

6. Go to Admin panel – System> Manage Currency> Rates
Under ‘Import Service’ drop-down you can now see ‘Google Finance’ as another option besides ‘Webservicex’.

You can use this option to import the exchange rates now.

If you liked this article, please take a moment to share it! If you have any questions or want to share your thoughts, do it in the comment section below.

PS. Infomatica Labs has a strong focus on E-commerce. It helps startups and SMEs with consultation and implementation of an Online Store. Also, it can help with the development of a Mobile Commerce App or any other related technological solutions. If you think we can help you, contact us here.

  1. Hiroyuki Shibata

    Still blow errors are shown.

    Cannot retrieve rate from{{CURRENCY_FROM}}&to={{CURRENCY_TO}}
    Cannot retrieve rate from{{CURRENCY_FROM}}&to={{CURRENCY_TO}}
    All possible rates were fetched, please click on “Save” to apply

    1. larp

      Use this:{{CURRENCY_FROM}}&to={{CURRENCY_TO}}

  2. Jonathan Lumley-Kelly

    New Google Finance url is:

Leave a Reply

Your email address will not be published. Required fields are marked *