| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Determine the customer country from the IP address | ||||
|
|
Thread Tools | Search this Thread |
#11
|
|||||||
|
|||||||
Re: Determine the customer country from the IP address
I tried the update .. it installs properly but I am getting errors when I enable it.
I am trying to use this together with your currency module. --------------------------------------------------------------------------------------------------------------------------------- INVALID SQL: 1064 : 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 'SET currency='USD' WHERE ip=''' at line 1 SQL QUERY FAILURE:UPDATE SET currency='USD' WHERE ip='' Warning: Cannot modify header information - headers already sent by (output started at /home/pointofs/public_html/include/func/func.db.php:195) in /home/pointofs/public_html/include/get_language.php on line 155 ------------------------------------------------------------------------------------------------------------------------ Thanks Randy
__________________
X-Cart Gold 4.1.9 |
|||||||
#12
|
|||||||
|
|||||||
Re: Determine the customer country from the IP address
Quote:
Really sorry, I should have tested it better. It's fixed now, just download this module again, unpack it, uninstall and install again. Unfortunately, the table ip_range will be empty after that, so you have to repeat filling data into the table. Please, download Multicurrency modul as well, cause I've changed one file there either. No need to reinstall, just download and unpack it. Best regard, virtual@croatia
__________________
Check what you can do with x-cart 4.1.9: www.smee.com Modules I made: IP_Ranges Multy_Currency Order_Dates Modules I use: Fancycategory Magnifier Survey AOM |
|||||||
#13
|
|||||||
|
|||||||
Re: Determine the customer country from the IP address
Sorry but I am still getting this error after installation:
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 'SET currency='USD' WHERE ip=''' at line 1 I followed your directions (updated multi-currency etc) but still no luck. Looking at the ip_range zip file I noticed that the skin1_original/modules/ip_range folder is empty ... is this the way it supposed to be? Thanks for all your help. Randy
__________________
X-Cart Gold 4.1.9 |
|||||||
#14
|
|||||||
|
|||||||
Re: Determine the customer country from the IP address
Quote:
I fixed that in the last version, I don't know why are you still getting the same message, but OK, there is a way to fix it. Open php MyAdmin and execute this: Code:
Everything should be OK after that. Quote:
Yes, that's how it's supposed to be. Regards, virtual@croatia
__________________
Check what you can do with x-cart 4.1.9: www.smee.com Modules I made: IP_Ranges Multy_Currency Order_Dates Modules I use: Fancycategory Magnifier Survey AOM |
|||||||
#15
|
|||||||
|
|||||||
Re: Determine the customer country from the IP address
I am considering using this to show the correct currency on my site based on geo location. Does this work with UK based users on AOL as I thought they used to resolve to the USA.
Anyone in the UK confirm this has changes at all?
__________________
X-Cart 4.7.12 (Live) Redux Template CDSEO |
|||||||
#16
|
|||||||
|
|||||||
Re: Determine the customer country from the IP address
haven't tried it yet, but looks like a nice mod, esp for the multi-lingual sites. nice job
|
|||||||
#17
|
|||||||
|
|||||||
Re: Determine the customer country from the IP address
Quote:
I don't remember where from I collected the ip addresses database, but if you have any of these ip addresses, I can check what the database says for it.
__________________
Check what you can do with x-cart 4.1.9: www.smee.com Modules I made: IP_Ranges Multy_Currency Order_Dates Modules I use: Fancycategory Magnifier Survey AOM |
|||||||
#18
|
|||||||
|
|||||||
Re: Determine the customer country from the IP address
Quote:
Solved! The problem was that you've installed Multicurrency module before the IP_Range one and there was no way to tell the web site to switch the places of them. I've fixed it changing the line in include/data_cache.php as I explained at the top post of this thread. Regards, virtual@croatia
__________________
Check what you can do with x-cart 4.1.9: www.smee.com Modules I made: IP_Ranges Multy_Currency Order_Dates Modules I use: Fancycategory Magnifier Survey AOM |
|||||||
#19
|
|||||||
|
|||||||
Re: Determine the customer country from the IP address
Hi guys!
This mod works very vell, but now I'm wondering how can we update the database of IPs. Here http://www.maxmind.com/app/geolitecountry you can download GeoIP database in CSV updating monthly, but how can we use it? Couldn't it be easer to make this mod compatable with maxmind's csv file?
__________________
X-Cart Gold Plus 4.6.6 A lot of custom mods |
|||||||
#20
|
|||||||
|
|||||||
Re: Determine the customer country from the IP address
Quote:
It is not possible to use csv directly, what you can do is to make an sql query from the csv file, send it to me and I will update the first post in the thread. The easiest way to do that is through Excel. Open the csv file with Excel, make a formula in the last column, copy it to the end and than copy all formula cells into the Notepad. Split it into two pieces, save it as ip-range_1.sql and ip-range_2.sql, zip it and send it to the forum. I'll copy it into the first post.
__________________
Check what you can do with x-cart 4.1.9: www.smee.com Modules I made: IP_Ranges Multy_Currency Order_Dates Modules I use: Fancycategory Magnifier Survey AOM |
|||||||
|
|||
X-Cart forums © 2001-2020
|