We use cookies to improve our services and provide a better experience. By continuing to use this site, you agree with our Cookies Policy.

Tutorials
More than 400 step-by-step articles to guide you through online project development.
HomeTutorialsCMS TutorialsMagentoMagento Administration

How to Automate Currency Rate Updates

Linux KVM Hosting
USA VPS
Windows Cloud Server
Linux Cloud Server
Germany Cloud Servers
Ubuntu VPS
OpenVZ VPS
Brazil VPS
cPanel KVM
KVM VPS

By default Magento is not updating currency rates automatically. To keep them updated you need to do this manually almost every day. To automate this process, you might need to set up a script which will do this at specified intervals.

Follow These Steps to Automate Currency Rate Updates

Start with editing Magento configuration file which is located in “app/code/core/Mage/Directory/etc/config.xml”. Open it with any text editor and put the following lines.

1
2
3
4
5
6
7
8
9
10
11
12
 <crontab>
<jobs>
<currency_rates_update>
<schedule>
<cron_expr>0 * * * *</cron_expr>
</schedule>
<run>
<model>directory/observer::scheduledUpdateCurrencyRates</model>
</run>
</currency_rates_update>
</jobs>
</crontab>

These lines will set to run scheduled task (Cron job) every hour. You can adjust time stamp by editing line between “cron_expr”.

Next step is to set up your server to run Magento cron jobs. This can be done by adding the following line in the server cron job manager.

1
/usr/bin/wget -q 'http://www.domain.com/magento/cron.php'

By executing this line, Magento will be running its Cron jobs as well. The last step is to set scheduled tasks settings in Magento admin backend. Simply navigate to “Admin > Configuration > System > Cron (Scheduled Tasks)” and set the following settings.

  • Generate Schedules Every 30
  • Schedule Ahead for 60
  • Missed if Not Run Within 120
  • History Cleanup Every 60
  • Success History Lifetime 180
  • Failure History Lifetime 600

Of course, you can adjust them according to your needs as well. By using this simple system we will not need to worry about not updated currencies in your store.

USA VPS
Linux KVM Hosting
Linux Cloud Server
cPanel KVM
Ubuntu VPS
KVM VPS
Germany Cloud Servers
OpenVZ VPS
Brazil VPS
Windows Cloud Server
Rate this Tutorial:
No Comments Leave a Comment
Leave a Comment