As a professional e-Commerce solution, PrestaShop does support multi-currency on selling products certainly. The related setting can be found in backoffice in
Don’t know how to set up currencies? Check out our video!
We can find a option on bottom like the below picture, which enable to update the exchange rate periodically. However, you can see that the switch is greyed out with a text saying to let you install the cronjobs module.
It used to be a cron job module available in the add-on marketplace, which able user to set cron job with this module. However, this module was removed, as it was not working reliably, while it is actually hard to cover different OS with only one module. Therefore, the best practice would always be setting it directly on the server, or via the hosting.
But how do we set this?
No idea how to set up Cron Job? Check out our article!
We are using curl / wget to browse a PHP file inside the admin folder, so you need:
- Figure out the complete URL which link to that PHP file
A secure key is also required to access the function by passing to the url and you will need the below to get the key:
- Shop Name
- MD5 Generator
- The backoffice folder is named
- We are updating the exchange at 6am per day
- The domain of the website is:
The PHP file is named
cron_currency_rates.php inside the admin folder. Therefore, in this exmaple, the URL to the file will be:
- This is a 56-char string and unique for every shop, which could be found easily in app/config/parameters.php
We are using this as example:
There are 2 ways to find it:
- Go to
Contact. Look for the
Storestab, then get the shop name on the bottom “Contact Detail”
- Run the following SQL on your database:
SELECT `value` FROM `ps_configuration` WHERE `name` = 'PS_SHOP_NAME'
- The key is generated by MD5 digesting after joining the COOKIE KEY and the shop name. There are lots of MD5 tools on the internet and below is one of the example:
- Join the COOKIE KEY and shop name:
- Digest with MD5 you will get the secure key:
As we are updating it 6am per day, so the period should write
0 6 * * *
The complete URL will be
Finally, the full sentence to be written in crontab -e on the server would be:
0 6 * * * curl "http://shop.genkiware.com/admin2021/cron_currency_rates.php?secure_key=dd8de15a41ed5815785a08f1256dbd8c"
And…Done! Your shop would now update the exchange rate automatically at 6am per day, Yay!