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
define('PATH_TO_STORE_ROOT','');
to
// define('PATH_TO_STORE_ROOT','');
This disables this line altogether as it's now no longer needed.
Then change lines 23 and 24 from
require_once(PATH_TO_STORE_ROOT . 'includes/configure.php');
require_once(PATH_TO_STORE_ROOT . 'includes/database_tables.php');
to
require_once('includes/configure.php');
require_once('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:
Line 53
if (DEFAULT_CURRENCY == 'GBP')
Line 82
$cc='GBP';
The CRON job I used in cPanel is set to run once a day at 6am
|
|
|
|
|
|
| 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.