Jump to content

European Central Bank Currency Update Feature is Here !


Recommended Posts

Hi,

I am new at prestashop. I realized that real time currency exchange feature is not uptodate. The data comes from the http://www.prestashop.com/xml/currencies.xml, which is an old file.

After some investigation i found the site of European Central Bank http://www.ecb.europa.eu/home/html/index.en.html
The ECB gives the currency exchange rates in XML format at http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml.

The exchange rates of ECB are updated daily and more important thing is "They are from a very trusted and reliable source"

I modifed the currency.php file located at prestashop_1.0\classes folder. When you replace the currency.php file with my modified file, you will get the exchange rates of ECB. I wish it will help your business.

Note: Check the ISO symbol of the currencies from http://www.ecb.europa.eu/stats/exchange/eurofxref/html/index.en.html

Currency.zip

Link to comment
Share on other sites

Thank you Debugginglife for this modified file, it seems to work.

One question : does this modification automatically update the currencies rates ? Or must I update them daily manually, by clicking on Update currencies in the BO ?

And I'm surprised, after hanving replaced my currency.php vith your modified version, after updating :

1€ = 1.3035$ = 0.7907£

But when looking at http://fr.finance.yahoo.com/convertisseur?u

1€ = 1,276$ = 0,78847£

What's wrong ?

Thank you !

Link to comment
Share on other sites

Hi,

Regarding the question of Ratatosk

One question : does this modification automatically update the currencies rates ? Or must I update them daily manually, by clicking on Update currencies in the BO ?


Yes, you have to press Update Currencies button to update currencies. ECB gives the currencies daily so there can be some differences with other sources. ECB gives the currency rates previous business day. If there are some other reliable currency rate sources in xml format, i can try to supply those rates also
Link to comment
Share on other sites

  • 1 month later...

Hi debugginglife,

i downloaded the new version 1.1 and it seems prestashop still have an old currency XML included. i have changed the link to http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml and the currency still not updated correctly.

since you are experience with this can you please be kind have a look at the new 1.1 version. thanks

thanks

Link to comment
Share on other sites

Hello
I am new here .I am testing prestashop about 1 week now .I like it But...
The currency issue (outdated) remains in the new final version 1.1
Your fix debugginglife was very nice but its not working with new version
I modified the new currency.php based on your fixed and its working now for me in ver1.1
Here is the file:

Currency_v1.1.zip

Link to comment
Share on other sites

hi strs156,

excellent, it works for me now.

however, there is 1 small issue related to it that is when you change the default currency and click SAVE the value of the new default and old default will be the same i.e. 1. To adjust that value, i need to click "update currencies rates" button and things will work fine.

it would be nice though if by changing the default currency the rates change as well.

Link to comment
Share on other sites

hi strs156,

excellent, it works for me now.

however, there is 1 small issue related to it that is when you change the default currency and click SAVE the value of the new default and old default will be the same i.e. 1. To adjust that value, i need to click "update currencies rates" button and things will work fine.

it would be nice though if by changing the default currency the rates change as well.


glad to be helpful ..I am not a coder and my knowledge in scripting are very limited .
I wish it could be automated or better yet we had a module that configures all that and updating automatic
Link to comment
Share on other sites

  • 3 weeks later...

Anyone else that didn't get this to work??
In 1.0 i replaced my file with the one from debugginglife and it worked fine.
In ver 1.1 it is not longer working. So i uploaded strs156 version of the currency.php but that file gives me "parse error"
What to do?

Anyone who can help out?
This is i think an important module, specially with today's economy.

Best regards
Peter

Link to comment
Share on other sites

  • 4 weeks later...

AHHHH! Can anyone help me please?

I have version Version 1.1.0.5 - 0.117s and I have updated Currency.php as in the zip file above and when I click "update currency" once I have uploaded the file I get the following error "Hack attempt (Currency -> sign = €)"

I want to disable Euros & Dollars but again im getting the 'Hack attempt' error

Please HELP!!!!

Thanks
Darshan Patel

Link to comment
Share on other sites

  • 2 months later...
Hello
I am new here .I am testing prestashop about 1 week now .I like it But...
The currency issue (outdated) remains in the new final version 1.1
Your fix debugginglife was very nice but its not working with new version
I modified the new currency.php based on your fixed and its working now for me in ver1.1
Here is the file:


@ debugginglife, @ strs156: Hi all, i add a new currency in my website and setup it default: Dong (Vietnamese). I download your files and I can't update currencies rates, bcs The ECB gives the currency exchange rates in XML format at http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml but no have VND (Vietnamese Dong).

I know the http://forexrate.com.au/ support converter all currencies, but i don't know how to config and modify the currency.php for my case. Please help me out.

Thanks and best regards,
Link to comment
Share on other sites

Do you know of another feed with currency rates that support more currencies? if so, we can probobly make another module for that feed in a day or two.


I'm sorry, I don't know. Could you help me and share for every body around here and me? Tks
Link to comment
Share on other sites

  • 1 year later...

just spotted this so apologies if i'm rehashing old ground - but this mod is based on a Euro base rate, so updates all currencies AGAINST the euro.. SOOOO this is basically only for users who use EURO as a default currency.. unless you point it to reference an XML thats outputting with your own countries currency as the base unit..

I'm just trying to think of ways you could sort of "fool" the backoffice around it.. but i've been coding most of the day and concentration is lacking at this point in the evening haha :)

Link to comment
Share on other sites

  • 1 year later...
  • 4 weeks later...
  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...