How does it work, or where can find out how it works?
Printable View
Not sure what you're talking about. I was referring to the fact that the ECB bank source for updates is built-in to v1.5.0.
No cron jobs. No hands-off automated updating. Just a more reliable source for updates when you click on the "Update" button on the currencies screen.
And since the addon discussed in this thread has adopted ECB stuff, you'll probably want to remove the duplication from the addon if you're using it with 1.5.0.
Sorry, it wasn't an "end user" tip, but rather a tip to whoever updates or supports the addon to be mindful of the core code change.
Yes, but the rates update manually, don't they? The mod updates them automatically every day and you just set it up once and forget about it.Quote:
No cron jobs. No hands-off automated updating. Just a more reliable source for updates when you click on the "Update" button on the currencies screen.
I have upgraded to ZC 1.5 and the mod still works fine.
The manual updating of the exchange rates is part of the base zencart software. I am still running my 1.3.9 store, but have a test store in 1.5.0. I am therefore able to test the currency updating side-by-side. Manually updating works better in 1.5.0. When I manually update in 1.3.9, I get errors that it cannot update AUS$ and Euros. I don't get that error in 1.5.0
This mod updates the rates when it is invoked. The timing for when the mod is invoked is set in your hosting site. I don't see any errors when it is invoked.
What I am still trying to determine is that some of the exchange rates are different between the 1.3.9 site and the 1.5.0 site. I am still trying to determine the cause. If I figure it out, I will come back here.
Steve, the reason you see differences in rates is that 1.50 uses the ECB rates, while 1.3.9h takes the rates from oanda (a different provider).
Hi people,
I have a Zen Cart v1.5.0 site and everything works perfectly except this really-important mod. I spent many days trying to configure it and reading many possible sollutions in this thread, but I still can't configure it correctly. First I had problems setting the cron job at the cPanel, but I asked my hosting provider and they fixed it by writing "curl" just before the root of the file. Since then the cron job seems to work but currencies don't update in the admin. In the email I receive appears the following text:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 389 100 389 0 0 7245 0 --:--:-- --:--:-- --:--:-- 7245
100 389 100 389 0 0 7227 0 --:--:-- --:--:-- --:--:-- 0
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>406 Not Acceptable</title>
</head><body>
<h1>Not Acceptable</h1>
<p>An appropriate representation of the requested resource /currency_update.php could not be found on this server.</p>
<p>Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle the request.</p>
</body></html>
Does anybody knows what am I doing wrong?
(sorry for my poor english)
I forgot to say that the file is in the root folder. I tested the v4 module and also the v3.1 "curled version", and I tried with many different roots with no success. Now I have this settings in the currency_update.php (of course replacing "my_user_name" with the real one):
define('/home/my_user_name/public_html/','/home/my_user_name/public_html/');
require_once(PATH_TO_STORE_ROOT . '/home/my_user_name/public_html/includes/configure.php');
require_once(PATH_TO_STORE_ROOT . '/home/my_user_name/public_html/includes/database_tables.php');
forget my question and excuse me!!
finally I found the sollution in post #139 (page 14) of this thread. Also, the first line I posted before was wrong (happens when you change the code thousand times :P
I still receive the same error mesage in the email from the cron job, but the mod works fine...
I now have this script working fine on a v1.5.1 installation running on PHP Version 5.2.17.
However, it was initially not without the same problem that so many others seem to have had with the PATH_TO_STORE_ROOT issue.
It didn't matter that the path was correctly inserted, the script still gave the error that the includes/configure.php file did not exist.
My solution
I have the currency update script in the store's root folder but I have renamed it to gtcu.php with the following changes to lines 20, 23 and 24:
Change line 20 from
toPHP Code:
define('PATH_TO_STORE_ROOT','');
This disables this line altogether as it's now no longer needed.PHP Code:
// define('PATH_TO_STORE_ROOT','');
Then change lines 23 and 24 from
toPHP Code:
require_once(PATH_TO_STORE_ROOT . 'includes/configure.php');
require_once(PATH_TO_STORE_ROOT . 'includes/database_tables.php');
As my store is UK based I have also changed the default currency from EUR to GBP, so lines 53 and 82 are changed accordingly:PHP Code:
require_once('includes/configure.php');
require_once('includes/database_tables.php');
Line 53
Line 82PHP Code:
if (DEFAULT_CURRENCY == 'GBP')
The CRON job I used in cPanel is set to run once a day at 6amPHP Code:
$cc='GBP';
0 6 * * * php -q /home/MY_ACCOUNT_NAME/public_html/MY_STORE_NAME/gtcu.php
For testing, I set the CRON to run every 5 minutes and it correctly sent a blank email each time, which means it was working properly.
Finally, I had to tweak the default uplift ratio, as the converted amounts seemed well below what they should be.
in Admin > Configuration > My Store > Currency Conversion Ratio I changed from the default 1.05 to 1.171 which now looks about right.
My live store is at http://www.gizmotronic.co.uk if you want to check my store prices with the automatically updated currencies.
Hope this was some help to you.