Jump to content
ilan316

Updating currencies automatically

Recommended Posts

Can someone once and for all can explain how can i do a cron job to update automatically currencies ?

 

im using Cpanel and Prestashop 1.4.8

Share this post


Link to post
Share on other sites

There should be a cron jobs icon in your cPanel dashboard. Set a cron job there at the desired frequency using the URL given in the exchange rates page. Say if you want to update rates once a day at 23:15 add the following with appropriate change:

 

15 23 * * * php -f /home/domain/your_server_account/public_html/renamed_admin_folder/cron_currency_rates.php secure_key=your_secure_key

 

(there is a blank space between cron_currency_rates.php and secure_key)

 

Add an email if you want to receive cron notices.

 

Or if you have more than one PS related cron jobs (or neeed to to an alternative method to cron) download and install Samdha's free 'Crontab for PrestaShop' module from add-ons, Set one cron job for the module in your cPanel dashboard and manage the rest from the module's back office configuration.

Share this post


Link to post
Share on other sites

how do i set a cron job in " Crontab for PrestaShop' module for currencies ?

Share this post


Link to post
Share on other sites

Select method, enable test job to make sure module is setup properly. Then disable test job and add a job.

URL: http://your domain/your_admin_dir/cron_currency_rates.php?secure_key=your_key (Back Office > Payment > Currencies > Currency rates update)

Schedule: As desired

Edited by phrasespot (see edit history)

Share this post


Link to post
Share on other sites

Test job worked.

copied job from Back Office > Payment > Currencies > Currency rates update

Cron job executed successfully

 

last execution - 07/17/2012 00:00:02

But Currencies hasn't updated.

 

why?

Share this post


Link to post
Share on other sites

when im updating the currency manually in

 

Back Office > Payment >Currencies

 

it works fine.

post-216596-0-78214000-1342526973_thumb.png

Share this post


Link to post
Share on other sites

OK, let's first make sure module's invocation works. Change the method from 'server crontab' to 'shop traffic'. Visit the front office. Then check whether the 'last execution time' has changed to coincide with your visit and the rates updated. Note that feed rates are coming from European Central Bank and is updated once a day.

Share this post


Link to post
Share on other sites

i hope i understood your last message.

 

i changed the method.

and visited my front office

Share this post


Link to post
Share on other sites

i hope i understood your last message.

 

i changed the method.

and visited my front office

post-216596-0-83584800-1342764640_thumb.png

Share this post


Link to post
Share on other sites

i hope i understood your last message.

 

i changed the method.

and visited my front office

Yes, that is what I meant. Did the currencies update using this method?

Share this post


Link to post
Share on other sites

OK, great. Then it should update with cron as well. Maybe cron update was within the current currency rates period. Set it to cron and watch it for a few days. Post again if it does not update.

Share this post


Link to post
Share on other sites

/usr/bin/php -q /home/xxxxxxxx.com/k4928592/public_html/admin123/cron_currency_rates.php secure_key=scurecode

 

still not work

 

it's said from email crontab:

No input file specified.

 

help!!ps 1.5.1 fresh installation

Share this post


Link to post
Share on other sites

Hi there,

this may be a stupid question but how can I get my presta secure key? When I go to localisation->currencies I do not see anything on the bottom to update live currencies. 

Screen Shot 2020-06-28 at 18.20.52.png

Share this post


Link to post
Share on other sites

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...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More