Re: Currency Update (Automatic)
I was checking Automatic Currency Updater version 4.0 extension ...and found that currency conversion feed from European Central Bank's website do not contain Middle East Asian countries like UAE, Saudi Riyal, Kuwait Dinar etc Exchange rates...... :unsure: :shocking: So what to do for getting Currency Exchange rates from such Gulf countries??? .......
Re: Currency Update (Automatic)
Quote:
Originally Posted by
nithinalex
I was checking Automatic Currency Updater version 4.0 extension ...and found that currency conversion feed from European Central Bank's website do not contain Middle East Asian countries like UAE, Saudi Riyal, Kuwait Dinar etc Exchange rates...... :unsure: :shocking: So what to do for getting Currency Exchange rates from such Gulf countries??? .......
Have you found somebody prepared to supply that data for free? If so, please advise and we can look at extending this mod to take their feed.
Re: Currency Update (Automatic)
HI,
I am trying to use the mod but i am running in to problems getting it working.
for the physical path of my installation i have added this:
PHP Code:
define('/home/username/public_html/','');
But i keep getting the following messages:
Warning: require_once(PATH_TO_STORE_ROOTincludes/configure.php) [function.require-once]: failed to open stream: No such file or directory in /home/pestcont/public_html/currency_update.php on line 23
Fatal error: require_once() [function.require]: Failed opening required 'PATH_TO_STORE_ROOTincludes/configure.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/pestcont/public_html/currency_update.php on line 23
my currency update file is just located in the main catalogue
Re: Currency Update (Automatic)
Try
PHP Code:
define('PATH_TO_STORE_ROOT','/home/pestcont/public_html/');
which should work, though this defeats the object of allowing you to place the file outside of the web root so that trolls won't be able to browse to and execute it.
Re: Currency Update (Automatic)
thanks, i just want to try it first and then i will relocate it. outside of the website, thanks for your help.
Lee
Re: Currency Update (Automatic)
OK, that worked perfect now thank you, i just have to work out the path once i have moved it, but that's great. Much appreciated.
Thank you
Lee
Re: Currency Update (Automatic)
I am new to zencart. I have just installed v1.3.9h . I am trying to install Currency Update (Automatic) v4 . My host does not allow cronjob. If i place the file in the folder includes/auto_loaders will it run? (define('PATH_TO_STORE_ROOT','www/zen139-1/includes/auto_loaders/');) I tried this but nothing what am i doing wrong?:frusty::wacko:
thank you in advance
Re: Currency Update (Automatic)
Quote:
Originally Posted by
bioreactor
I am new to zencart. I have just installed v1.3.9h . I am trying to install Currency Update (Automatic) v4 . My host does not allow cronjob. If i place the file in the folder includes/auto_loaders will it run? (define('PATH_TO_STORE_ROOT','www/zen139-1/includes/auto_loaders/');) I tried this but nothing what am i doing wrong?:frusty::wacko:
thank you in advance
As far as I know you will need a cron job to execute the file automatically at a given time of the day. Placing the file in the folder includes/auto_loaders will not do the trick.
You may want to talk to your host and see if they can set up a cron for you.
Re: Currency Update (Automatic)
Quote:
Originally Posted by
frank18
As far as I know you will need a cron job to execute the file automatically at a given time of the day. Placing the file in the folder includes/auto_loaders will not do the trick.
You may want to talk to your host and see if they can set up a cron for you.
Thank you very much for you precious help:smile:
I justed hoped that ther was also another way except for cronjob :cry:
Re: Currency Update (Automatic)
A very old thread but a wonderful mod!
Having gone through almost every post, I was struggling to understand how it should be set up. I sent a support ticket to Bluehost but haven't received a reply yet. So, I decided to give it a try until a reply was received.
I have Zen Cart 1.3.9h installed in my root directory and wanted to install the Automatic Currency Updater version 4.0. Based on what I read in the posts above and Bluehost's help files on how to set up a cron job:
I placed the currency_update.php unmodified in my public_html folder. When entering http://athenscollectibles.info/currency_update.php in the browser, I got a blank page which, assuming from earlier posts, is what I should get. When I changed line 20 to define('PATH_TO_STORE_ROOT','/'); (i.e. with an added / between the single quotes), I got the following error:
Warning: require_once(/includes/configure.php) [function.require-once]: failed to open stream: No such file or directory in /home3/MY_USER_NAME/public_html/currency_update.php on line 23
Fatal error: require_once() [function.require]: Failed opening required '/includes/configure.php' (include_path='.:/usr/lib64/php:/usr/lib/php') in /home3/MY_USER_NAME/public_html/currency_update.php on line 23
I removed the / and everything went back to normal, so I left it like this.
Now, setting the cron job: as per Bluehost's help files, I entered the command:
/ramdisk/bin/php5 -c /home3/MY_USER_NAME/public_html/currency_update.php
and set it to run every minute (that's just to see what happens, I will change the frequency after making sure that everything works fine).
The rates were updated quickly and correctly (but see below about rounding). To test the system again, I updated the rates from the Admin > Localization > Currencies which brought up the oanda rates. These soon changed back to the ECB rates, proving that the mod and the cron job function correctly.
So far, so good. However, the auto email I get when the cron job runs, reads:
PHP: Error parsing /home3/MY_USER_NAME/public_html/currency_update.php on line 1
X-Powered-By: PHP/5.2.14
Content-type: text/html
Line 1 of the currency_update.php file reads:
#!/usr/bin/php
I don't know php but thought of changing the first line of the file to
#!/ramdisk/bin/php5 (in line with the cron job command as above) and see what happens. Unfortunately, I still got the same error in the email, so I restored the original line 1.
Although the exchange rates are published with 4 decimal places on the ECB web site, they are entered with 8 decimals in my currencies. I assume that the ECB file used to pull the rates has indeed 8 decimal places but they are displayed with 4 decimal places on the web site or is there another reason?
For example, with EUR as my base currency, rates are as follows:
[FONT="Courier New"]USD 1.3472 1.34720004
GBP 0.8436 0.84359998
CAD 1.3463 1.34630001
AUD 1.3583 1.35829997[/FONT]
The first column shows the rates as published by ECB, the second as they are entered in my currencies. Is this something normal and not to be concerned about?
I wonder if someone can help in eliminating the above error message in emails and advising about the exchange rates decimals.
Any help will be greatly appreciated and my thanks are expressed in advance. Apologies for the very long post, which could possibly be of help to other Bluehost users.