Guest Posted August 18, 2005 Share Posted August 18, 2005 File Name :: Automated currency updates Author :: webwonderuk Category :: Admin Description Automatically update the currencies on the website with the click of a mouse. This script is set up for stores using UK Pounds as the default currency and will update the default currencies (Except Mexican peso) direct from the European Central Banks currency feed. Updatable manually from admin or a cron job script is included for fully automated updates from the server. View File Link to comment Share on other sites More sharing options...
Guest Posted August 19, 2005 Share Posted August 19, 2005 I have just finished modifying this script for any currency to automatically update. Will be posted and available for download once approved by admin. Link to comment Share on other sites More sharing options...
Guest retire_young2005 Posted August 24, 2005 Share Posted August 24, 2005 WIll this be available for CC3? This is awesome if it can update all currencies automatically. Link to comment Share on other sites More sharing options...
Guest Posted August 24, 2005 Share Posted August 24, 2005 This mod is for v3 only Link to comment Share on other sites More sharing options...
Guest hobbyofkings Posted September 11, 2005 Share Posted September 11, 2005 This is brilliant, I love it... BUT it doesn't work on my GBP? I have default currency Australian. All the others work, GBP reports success but the change doesn't actually happen. Any thoughts? Any one have this problem. Have had it a few times over (multiple reinstalls learning Cube Cart)... Link to comment Share on other sites More sharing options...
Guest Posted September 13, 2005 Share Posted September 13, 2005 Thanks hobbyofkings i think you have found a small error in the script. Open up convert.php. Approx line 131 it reads $sql = mysql_query("update ".$glob['dbprefix']."CubeCart_currencies set value='$exchanged',lastUpdated=$timer where name='US Dollars'"); Change to: $sql = mysql_query("update ".$glob['dbprefix']."CubeCart_currencies set value='$exchanged',lastUpdated=$timer where name='British Pounds'"); That should sort the problem out. Link to comment Share on other sites More sharing options...
Guest Gaijin Posted September 17, 2005 Share Posted September 17, 2005 Installed the mod - it works great! Just wonder how to add a new currency, namely Czech crown (CZK). I found that czk-CZK is on the bank list, copied the last conversion formula in the convert file with all the attributes and mechanically replaced the currency symbols, entered the currency name - and ... failed. Could you, webwonderuk, tell me the corrent procedure? Thanks a lot... Link to comment Share on other sites More sharing options...
Guest Posted September 18, 2005 Share Posted September 18, 2005 Hi Gaijin, Have attathced a file with the czech update, it is important that on the database the czech currency code is CZK and the currency name is exactly Czech Koruna Just use this convert.php file and everything should be ok, although i havent tested it!!!convert.php Link to comment Share on other sites More sharing options...
Guest Gaijin Posted September 20, 2005 Share Posted September 20, 2005 Thanks webwonderuk a lot, I'm going to try it out The problem may has been caused by my excessive creativity as I put the Koruna in plural Korunas :innocent: Link to comment Share on other sites More sharing options...
Guest MASsIVE Posted September 23, 2005 Share Posted September 23, 2005 Hi all What do I need to do if I have Euro set as default in admin?? I would need Euro to be the whole default currency Link to comment Share on other sites More sharing options...
Guest Gaijin Posted September 29, 2005 Share Posted September 29, 2005 Hi MAssIVE, First be sure the prices in your DB are in EUR. Then, being logged as Admin, select "Currencies", edit EUR so its value turns "1". The exchange ratios of the other currencies will be recalculated accordingly. The default currency in the General Settings is merely for displaying, not for calculation. This separation has been another "nasty" CC trick and the reason I choose this script. Link to comment Share on other sites More sharing options...
Guest fiddy Posted September 29, 2005 Share Posted September 29, 2005 Excellent mate, well done. Q: why use the currency text name in the sql, rather than the universally accepted 3 char code? Link to comment Share on other sites More sharing options...
Guest AmeFa Posted September 29, 2005 Share Posted September 29, 2005 I was thinking the same....I also have a question tho....for neone who knows: Q: How can i modify this to have default US dollars...and does this work for 3.0.4? Link to comment Share on other sites More sharing options...
Guest benlogan Posted September 30, 2005 Share Posted September 30, 2005 Hi MAssIVE, First be sure the prices in your DB are in EUR. Then, being logged as Admin, select "Currencies", edit EUR so its value turns "1". The exchange ratios of the other currencies will be recalculated accordingly. The default currency in the General Settings is merely for displaying, not for calculation. This separation has been another "nasty" cool.gif CC trick and the reason I choose this script. to set a default currency, it must be sent to 1 also,make sure you dont have multiple of them. and yes it will work for 3.02, 3.03 and 3.04. i dont know about previous versions beccause i started at 3.02. Link to comment Share on other sites More sharing options...
Guest Gaijin Posted September 30, 2005 Share Posted September 30, 2005 Q: why use the currency text name in the sql, rather than the universally accepted 3 char code? Hi fiddy, I think these are just plain text, not variables. By editing admin/settings/convert.php you can enter any text you want to. The actual values for rate calculations are being input on daily basis from here: http://www.ecb.int/stats/eurofxref/eurofxref-daily.xml Link to comment Share on other sites More sharing options...
Guest Gaijin Posted September 30, 2005 Share Posted September 30, 2005 Q: How can i modify this to have default US dollars...and does this work for 3.0.4? Hi AmeFa, Do as benlogan told: Edit USD from the Admin panel/Currency and overwrite the current value to get 1. The toucan hidden in CC will do the rest. :D Link to comment Share on other sites More sharing options...
Guest limkimpoh Posted October 8, 2005 Share Posted October 8, 2005 Hello, i got a slight problem here, my default currency is in singapore dollars and its being set to value 1 but i got the following warning as below. Any advice ? Thanks. Warning: Division by zero in admin/settings/convert.php on line 112 :whistle: Link to comment Share on other sites More sharing options...
Guest AmeFa Posted October 8, 2005 Share Posted October 8, 2005 Yeah thanks I got it working BUT...some currency do not update..like SEK and uh...jap. currency i believe. Link to comment Share on other sites More sharing options...
Guest Gaijin Posted October 9, 2005 Share Posted October 9, 2005 Yeah thanks I got it working BUT...some currency do not update..like SEK and uh...jap. currency i believe. All the currencies applicable for the conversion are listed here, SEK and JPY included : http://www.ecb.int/stats/eurofxref/eurofxref-daily.xml Link to comment Share on other sites More sharing options...
Guest Posted October 9, 2005 Share Posted October 9, 2005 All currencies that the European Central Bank supports are listed here: http://www.ecb.int/stats/exchange/eurofxre...l/index.en.html Please feel free to adapt the script to suit your particular currency, if you need help just post and i will eventually reply. Paul Link to comment Share on other sites More sharing options...
Guest toosweets Posted December 11, 2005 Share Posted December 11, 2005 Will this work on 3.0.6? Link to comment Share on other sites More sharing options...
Guest digilution Posted December 12, 2005 Share Posted December 12, 2005 Will this work on 3.0.6? I also want to know :) Link to comment Share on other sites More sharing options...
Guest Posted December 15, 2005 Share Posted December 15, 2005 The latest version that works in v3.06 is available in my mod store, i am rebuilding shortly to accept all currencies worldwide supported by the ECB. Link to comment Share on other sites More sharing options...
Guest digilution Posted February 16, 2006 Share Posted February 16, 2006 The latest version that works in v3.06 is available in my mod store, i am rebuilding shortly to accept all currencies worldwide supported by the ECB. The mod is gr8 but now I want to use the cronjob version. What should I put in the ' command to run' setting up the cron. If I can get this sorted and give the customer the option of what currency to choose, what happens on checkout....will it be done in their currency or will it be in GBP? Cheers Link to comment Share on other sites More sharing options...
Recommended Posts