iGoogle is shutting down.
There is an (undocumented?) currency conversion API available with URLs like: http://www.google.com/ig/calculator?hl=en&q=1GBP=?USD
The base of this url - google.com/ig - takes you to iGoogle. Will the API be available after iGoogle shuts down?
How it works. Currency conversion automatically converts the price in your product data to the currency of the new target country and displays both prices in your ads and free product listings.
Get Started with Google Shopping Currency Conversion Tool All you need to do is create an extra Google export and rename it. Then head to your Merchant Center and under the Shopping ads > Configuration you will find the currency converter switch and you can start your upload.
I was having the same issue described here: https://stackoverflow.com/a/19786423/2819754
I used @hobailey answer for a temporary fix until i can update it to another version or google decide to do a proper api.
As google changed the URL to
https://www.google.com/finance/converter?a
So the fix i found is below.
$amount = urlencode($amount);
$from_Currency = urlencode($from_Currency);
$to_Currency = urlencode($to_Currency);
$get = file_get_contents("https://www.google.com/finance/converter?a=$amount&from=$from_Currency&to=$to_Currency");
$get = explode("<span class=bld>",$get);
$get = explode("</span>",$get[1]);
$converted_amount = preg_replace("/[^0-9\.]/", null, $get[0]);
thanks to @hobailey for this little fix.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With