Quote:
Originally Posted by floracal
I get this error
$query = "SELECT * FROM xcart_currencies WHERE rate != '0'";
How do i add rate field?
|
Go to your patch/upgrade in the admin section and in the bottom box type in:
Code:
ALTER TABLE `xcart_currencies` ADD `rate` double NOT NULL default '0'
Also it works on 4.1.9 as well.
And the
admin/configuration.php code that puts the rate into the xcart_currencies using the command
UPDATE xcart_currencies SET rate='$val' WHERE code='$code' does not work with the euro (as per the instructions) as the code for euro is EUR not euro.
So when you modify the table for xcart_config and you want the Euro currency you must use:
Code:
INSERT INTO `xcart_config` VALUES ('currency_rate_EUR', 'Rate for the Euro', '1.35572', 'Multiple_Currency', 0, 'numeric', '1.0', '');
Now if you use the above insert code, please go into your admin section and change the currency value (
'1.35572') and save it, then change it back and save it so that the configuration.php script updates the xcart_currencies, then you will find this new update in the drop down box on your web site.
The code only looks for rates defined in the xcart_currencies table > 0 and by inserting the currency conversion value like the above code the configuration.php file has not been run to update the xcart_currencies rate value, so it wont show on your web site.
Also make sure that the currency symbol is only 3 characters long, like USD, EUR, GBP, CAD, HKD, TND etc.
Anyway you can see a working copy at
http://www.elmaallem.com