Multi currency modul
16 Attachment(s)
Important!
This feature is implemented in all new xcart versions and my work on it is discontinued. Here is a module which brings a multi currency support. - No limited number of currencies - It can automatically update the currency rate with only one button pressing - In combination with IP_Range it can recognize the country where the customer is coming from and choose the right currency for him http://www.smee.hr/skin1/images/xcart%20forum/client.jpg Currency management: http://www.smee.hr/skin1/images/xcart%20forum/admin.jpg Instrunctions how to install it: 1. Unzip all files in the root of the xcart. Replace all files with the new one (be carefull if you made some changes on admin/func/func.mail.php, skin1/currency.tpl, skin1/modules/Product_Options/check_options.tpl or skin1/modules/Product_Options/func.js) 2. In a browser type http://yoursitedomain/install-currency.php and follow the procedure. You will need a number you were provided with when you were installing the shop for the first time. If you don't have it, you can find it in include/install.php file under $installation_auth_code 3. Insert this code into your design (for example in skin1/head.tpl), where you would like to have a currency choice. If you want to put it in between a table: PHP Code:
Out of a table: PHP Code:
4. Insert this code in skin1/admin/menu_admin.tpl, anywhere between lines 3 and 20: PHP Code:
5. Insert this code in skin1/single/home.tpl, anywhere between lines 60 and 250, on any empty line: PHP Code:
After inserting it should look something like this: PHP Code:
6. Insert this code in skin1/admin/home.tpl, anywhere between lines 60 and 250, on any empty line: PHP Code:
After inserting it should look something like this: PHP Code:
7. Insert this code in skin1/admin/menu.tpl: PHP Code:
8. Do not forget to empty the field of the alternative currency symbol in Admin/General Settings, paragraph General parameters. The default currency should have 3 letters, like CAD or USD or EUR, not US$, € or similar! Don't forget to make some of the currencies active. Go to the currencies section in the admin mode and check Active for the currencies you want to be active. 9. If you use PayPal unpack the file paypal.zip and overwrite your existing files. Important! If you want to use it with IP_Range module, you have to install IP_Range module first! If you miss to do that you have to change line 67 in include/data_cache.php from PHP Code:
to PHP Code:
It's been tested with 4.1.10 and 4.2.1 versions New version uploaded 23/08/2007 - fixed error "Unknown column 'xcart_currencies.orderby' in 'order clause'" New version uploaded 02/03/2008 - fixed error with product options prices New version uploaded 04/03/2008 - fixed minor error with product options prices New version uploaded 19/03/2008 - implemented gift certificate support New version uploaded 29/10/2008 - updated for 4.1.10 version New version uploaded 08/11/2008 - fixed an error when a changing the currency forced the page to be redirected to the main page Paypal files uploaded 13/01/2009 - if you use PayPal please overwrite your existing files with the one in the attachment 4.2.1 version uploaded 07/06/2009 - this is the first version for xcart 4.2.1. It should work, but if it doesn't please post your problem and I will fix it soon New versions uploaded 22/06/2009 - Auto update added. It auto sets the rate from the web site http://rss.timegenie.com/forex.txt. After the update the updated currencies will be italic. New version uploaded 25/06/2009 - minor fix an error during the uninstalling New version uploaded 25/06/2009 - fix an error for 4.2.1 when SEO option was enabled New version uploaded 25/06/2009 - fixed some issues with Product Options in 4.2.1 New version uploaded 07/08/2009 - fixed loosing order by after update in version for 4.1.10 |
Re: Multi currency modul
Hi
Is this version OK to install on a 4.1.8 store? |
Re: Multi currency modul
Quote:
Yes, it is. It's been tested from 4.1.6 to 4.1.9 versions. |
Re: Multi currency modul
For some reason after I install this mod there are no fields showing in the section where you define the exchange rates. All of the countries and areas are these just no boxes in which to enter anything.
Any ideas what this might be or how to fix it? |
Re: Multi currency modul
Quote:
It seams that some xcart versions have the tables xcart_currencies and xcart_country_currencies empty. In that case you should download the last full version of the xcart, decompress it, open the file xcart_data.sql which is in the folder sql and copy everything between lines: INSERT INTO xcart_country_currencies VALUES ('ADP','AD'); and INSERT INTO xcart_currencies VALUES ('ZWD',716,'Zimbabwe Dollar','$'); Paste it in php MyAdmin and execute it. This will fill the tables with all world currencies. |
Re: Multi currency modul
Thanks very much for this.
This is working like a charm except I don't know how to get the currency symbol to be in front of the price on product pages. I edited the skin1/currency.tpl to get the other areas of the site to reverse these fields but the product page doesn't use this tpl I guess. Everything else works great. Thanks again. Randy |
Re: Multi currency modul
Quote:
You were on the right way. Open the file skin1/currency.tpl and find the line {$value|abs_value|formatprice} {$shop_currenc y.symbol} which is in use when module is activated. If you want to have the currency symbol in front of the price just change it to: {$shop_currency.symbol}{$value|abs_value|formatpri ce} (For some reason, this forum is presenting this two lines with a space in between text. Please, delete the space when you copy/paste the text.) Regards, virtual@croatia |
Re: Multi currency modul
Actually that is the edit I made but it is not working on the product page, but I think I know why: all my products have options. If I add a product with no options then it works fine, but with options it still shows the currency symbol after the price.
Regards, Randy |
Re: Multi currency modul
Quote:
OK, now I know where the problem is. Open skin1/modules/Product_Options/func.js, find: Code:
document.getElementById('product_price').innerHTML = price_format(price < 0 ? 0 : price)+' '+currency_symbol; and change it to: Code:
document.getElementById('product_price').innerHTML = currency_symbol+price_format(price < 0 ? 0 : price); Regards, virtual@croatia |
Re: Multi currency modul
I am still seeing no boxes to fill out on the currency lists.
I have followed your instructions about posting the SQL into phpMyadmin and it now says there are Rows 210 Row length 6 Row size 26 B Any ideas what else i could try? |
Re: Multi currency modul
Quote:
Can you send me the master password on admin@smee.hr and I'll check it today? |
Re: Multi currency modul
Sorry for the delay - been away
Have sent over the details now, thanks for taking a look at this for us. |
Re: Multi currency modul
Quote:
We have fixed the problem. The problem was that, during the first installation, the tables xcart_currencies and xcart_country_currencies were empty and the module couldn't retract the data from them, required for the third table which is the part of the module. If someone else will have the same problem, fill the tables as I explained below and reinstall the module after that: Quote:
|
Re: Multi currency modul
Does anyone here have the programming chops (and time/energy/goodwill) to look into updating the currency data with daily exchange rates posted (for free) by the Federal Reserve at:
http://www.federalreserve.gov/releases/h10/Update/ It would be great if someone knew how to set up some sort of cron job or script that ran once daily to import the Federal Reserve data, parse it and update the x-cart currency SQL, turning this mod into a free near-real-time currency converter. With the dollar doing its thing lately I am more and more concerned with easy international order accessibility, this would be a great thing! |
Re: Multi currency modul
Big thanks to Hrvoje for all his help in getting this and the GeoIP mod working on our store.
Immediate overnight benefit with many orders from the USA. Great mod, really nice guy.. |
Re: Multi currency modul
Quote:
I've checked the pages. I was working on lot of parsers and the problem is that when they change the pages the whole job must to be redone again, completely from the beginning. If you find any xml pages for free with the same data I will do that. In the mean time, you'll have to do that manually. Regards, virtual@croatia |
Re: Multi currency modul
Just a quick question:
I deal with two main currencies (USD & CAD). If my Canadian clients click on CAD, will their account be credited in CAD by PayPal? Conversely, if my US clients click on USD, will their account be credited in USD by PayPal? My site is currently only in USD and although I show the CAD conversion on the site, my Canadian clients still get charged in USD and some of them are annoyed by this (and some others have written to tell me that they won't buy from me until they can purchase in CAD). Thanks for letting me know if your mod does this. If not, perhaps you can point me to something that could do the job. Thanks!!! Mario |
Re: Multi currency modul
Quote:
This module won't help you to solve it. In the next 30 days I'm planning to include pay pal system into my web site and after that I'll know is it possible or not to do that. Could you please remind me on it 30 days from now? virtual@croatia |
Re: Multi currency modul
Will do. Thanks for your help!
Mario |
Re: Multi currency modul
Hi
I got the following error when trying to install, any pointers. Am using 4.1.9. Thanks Copying skin files ... Copying to file skin1\modules/Multi_Currency\currencies.tpl - [OK] Copying to file skin1\modules/Multi_Currency\menu_currency.tpl - [OK] [OK] Activating the module ... Please wait ... [OK] Please wait ... Creating table: [xcart_currency_rate] ... [OK] [FAILED] You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT value FROM xcart_config WHERE name = 'currency_symbol') |
Re: Multi currency modul
Quote:
Hi, I didn't get any email for this thread that's why I didn't respond earlier. Try to manually execute the SQL code to see what kind of error do you get. Open the php MyAdmin for your database (you should've got it from your web provider) and execute the following: UPDATE xcart_currency_rate SET active = 'Y' WHERE code = (SELECT value FROM xcart_config WHERE name = 'currency_symbol') OR code = (SELECT xcart_currencies.code FROM xcart_currencies INNER JOIN xcart_config ON xcart_currencies.symbol = xcart_config.value AND xcart_config.name = 'currency_symbol'); CREATE TABLE xcart_customer_currency ( login VARCHAR ( 32 ) NOT NULL DEFAULT '', currency CHAR( 3 ) NOT NULL DEFAULT '', PRIMARY KEY (login) ) TYPE=MyISAM; Send me a post if you get any errror. virtual |
Re: Multi currency modul
Quote:
I've begun the work on the PayPal and gess what, it doesn't support non us or non uk businesses :evil:. So it will take a time untill I find a solution for it. And after I find I will work on it. It won't be a problem to implement the multi currency in the paypal, but you have to be aware that PayPal charges you 2,5% for conversion, so it might be lot cheaper for your customers to pay in USD than to pay in CAD and than to you pay 2,5% for conversion in USD. Can I ask you, how were you able to open an account on the US PayPal when you are from Canada? virtual |
Re: Multi currency modul
Sorry for the long reply Virtual, this post must have sneaked by me.
Paypal allows you to use it if you are from Canada but only the Paypal Standard -- we cannot use the Paypal Pro. Thanks for the heads up on the currency conversion costs. I think that I can work with that (will have to adjust prices somewhat) but I think that the optics would still be best if I can provide the items in CAD as well as USD. I appreciate you working on this and look forward to hearing what you can do. Thanks again! Mario |
Re: Multi currency modul
Quote:
We are opening a branch in the UK to get the option of using the PayPal Pro. It will take a while to open it and after that I will check how to implement the module with it. virtual |
Re: Multi currency modul
I'm trying to install this on 4.1.10 but am getting an error:
Copying skin files ... Copying to file skin1/modules/Multi_Currency/menu_currency.tpl - [OK] Copying to file skin1/modules/Multi_Currency/currencies.tpl - [OK] [OK] Activating the module ... Please wait ... [OK] Please wait ... [FAILED] Column count doesn't match value count at row 1 Can anyone help? |
Re: Multi currency modul
Thanks you for posting this mod - I have a question about the compatibility of this mod with One Page Checkout by Altered Cart.
I have a need for Managing currencies and showing the price based on IP location - so I really hope this works :) PS - do we need to download another mod for the IP location stuff? P.P.S - is there anyway to manage more than 2 currencies with the out of the box distribution of xcart 4.1.9? - so far I can only show 2. Euro and USD. |
Re: Multi currency modul
Quote:
same here... have you found a solution to this yet or at least a hint where i can search :mrgreen: |
Re: Multi currency modul
Quote:
The author is willing to work on the solution, but needs access to a site running 4.1.10 and phpMyAdmin, but I can't help on my setup. |
Re: Multi currency modul
Quote:
I'm at the vacation right now and have limited access to the internet. Seems to me that the problem is with the version 4.1.10 and with the changed table xcart_config in it. It looks that there is a column added at the end for some other purpose which produces the error. I tried to add an empty string at the end of the query and have sent it to tqualizerman but he said that the problem still exists. If you are willing to search for it, there is a file x-currency.sql in folder sql which has to be corrected. If you won't be able to fix it, I'll do it for you when I come home (2 weeks). Regards, virtual |
Re: Multi currency modul
Quote:
I don't know, never tried. I'm not at home right now so I won't be able to help you if there is a problem with it. Better try it locally first and if it works do it on line. Quote:
It does, you can check it on my web site www.smee.hr. Quote:
Yes, and YOU HAVE TO INSTALL IT FIRST! IP range module and then Multicurrency module or you will have to change a line in a file as it is explained in the first post. Quote:
No, it's not. |
Re: Multi currency modul
Hi guys
This mod is exactly what I need. I'm using 4.1.9. (my signature says 4.1.10, but the site I'm currently working on is 4.1.9) Does it work on this version? Your signature is a bit disconcerting Virtual! LOL: Quote:
I have limited knowledge of PHP so would need assistance fixing any bugs. Much appreciated :D/ |
Re: Multi currency modul
Quote:
I think it should work with it. I can help you with it if it won't work. |
Re: Multi currency modul
Many Thanks!! I'll implement it and let you know either way.
|
Re: Multi currency modul
Hi Virtual
I've implemented the module and its working great. Thank you very much! The instructions were clear and simple :) I do want to ask about one small issue though. When I change currency it goes back to the home page, instead of refreshing the product page. I see that on your www.smee.hr site, that's not the case. Can you help? |
Re: Multi currency modul
Yep - I would also like to know how to keep the user on the current page after a currency change - thanks
|
Re: Multi currency modul
Quote:
Hi there I tried to fix it myself but i didn't have any success. I always get the same sql error. I also have to admit that my sql-knowledge isn't very good either :mrgreen:. Is there anything else i should try? thanks for your time Aqua |
Re: Multi currency modul
Okay, i figured that one out, just add an empty string at the end of row 1 and it will install but the menu-point "currencies" won't appear in the backend and i get this if i try to reinstall the module
Code:
Copying skin files ... |
Re: Multi currency modul
Quote:
I hope we can get this module working for 4.1.10. Is the author around anymore? |
Re: Multi currency modul
Okay, i figured this one out
It actually was an empty string missing in the x-currency.sql in the sql folder. I didn't try this because Virtual stated in a post before that it didn't work. BEWARE I'm posting this only to find out what the problem is. The problem is following and i'm still working on it, maybe someone can help me out: I installed the module and it's working correctly on 4.1.10 but i get the error 2 posts above if i try to reinstall/uninstall the module. I don't know what will happen with other 4.1.10 installations and i'm not sure if it is good for anyone to install it this way untill we've found a proper solution(!). This is how my x-currency.sql in the sql folder looks like: Code:
INSERT INTO xcart_config VALUES ('default_currency', 'Select default currency', 'EUR', 'Multi_Currency', 10, 'text', 'EUR','',''); I only added an empty string in the first line. If you want to try it for yourself then please backup everything you can and don't chop off my head if something goes wrong, i never told that this is a nice solution, it' merely an unfinished fix :D |
Re: Multi currency modul
Can anyone help get this mod working? I am willing to pay for this.
|
All times are GMT -8. The time now is 01:00 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.