When I downloaded the plugin to update the currency exchange rates using cron I noticed it was throwing errors when I tested by running it manually. I was able to solve it by replacing (line 29 - 37):
# Get default currency.
$row=$mysqli->query("select configuration_value from " . TABLE_CONFIGURATION .
" WHERE configuration_key='DEFAULT_CURRENCY' LIMIT 1 ")->fetch_row();
define('DEFAULT_CURRENCY', $row[0]);
#Get currency conversion ratio.
$row=$mysqli->query("select configuration_value from " . TABLE_CONFIGURATION .
" WHERE configuration_key='CURRENCY_UPLIFT_RATIO' LIMIT 1 ")->fetch_row();
define('CURRENCY_UPLIFT_RATIO', $row[0]);
into:
# Get default currency.
$p = $mysqli->query("select configuration_value from " . TABLE_CONFIGURATION .
" WHERE configuration_key='DEFAULT_CURRENCY' LIMIT 1 ");
$row = $p->fetch_row();
define('DEFAULT_CURRENCY', $row[0]);
#Get currency conversion ratio.
$p = $mysqli->query("select configuration_value from " . TABLE_CONFIGURATION .
" WHERE configuration_key='CURRENCY_UPLIFT_RATIO' LIMIT 1 ");
$row = $p->fetch_row();
define('CURRENCY_UPLIFT_RATIO', $row[0]);
It might got to do with my php version being a bit old (4.4.8) but if you encounter trouble getting it to work you might want to consider this...
regards,
Rob Musquetier
The Netherlands


Reply With Quote
