View Single Post
  #1  
Old 03-04-2008, 07:48 AM
 
virtual@croatia virtual@croatia is offline
 

Advanced Member
  
Join Date: May 2007
Posts: 92
 

Default Determine the customer country from the IP address

Important!: This feature is implemented in all new xcart versions, so my work on this is discontinued.

This modul recognizes the customer country and chooses the right language for him. In the combination with the Multi_Currency module it sets the right currency as well.

Country page in admin mode is slightly modified and you can choose a proper language for the country (for example, country San Marino - language Italian).

As the data file is bigger than 512 kb I had to split it in separate files. Please, unpack everything, open "ip_range_1.sql" from "ip-range_1.zip", copy the text and paste it at the end of "sql/x-ip_range.sql" file from "x-iprange-4.1.7.zip file". Do it again with "ip-range_2.sql".

All ip range data is completely updated and 2 new countries will be added:
1. Serbia
2. Montenegro

All changes are visible in the admin area at the "countries" page.

http://www.smee.hr/skin1/images/xcart%20forum/ip_range_admin.jpg

and on the statistic page:

http://www.smee.hr/skin1/images/xcart%20forum/ip_range_statistic.jpg



For all problems send a post here or email to me.

Important!
If you want to use it with Multi_Currency module, you have to install the IP_Range module first!
If you miss to do that you have to change line 67 in include/data_cache.php from


PHP Code:
$all_active_modules func_query_column("SELECT module_name FROM $sql_tbl[modules] USE INDEX (active) WHERE active='Y'"); 
to
PHP Code:
$all_active_modules func_query_column("SELECT module_name FROM $sql_tbl[modules] USE INDEX (active) WHERE active='Y' ORDER BY module_name"); 

New version uploaded 08/04/2008 - fixed error "FAILED] Table 'mydatabasename.tmp' doesn't exist" and upgraded to 4.1.9 version. Tested with freshly installed 4.1.9 version.
New version uploaded 10/04/2008 - fixed error with no displaying default currency in the country management
New version uploaded 13/04/2008 - robots are excluded from the list and included in a separate table
New version uploaded 16/04/2008 - fixed error "Table 'xcart_stats_robots' doesn't exist"
Attached Files
File Type: zip ip-range_1.zip (397.1 KB, 348 views)
File Type: zip ip-range_2.zip (329.6 KB, 348 views)
File Type: zip x-iprange-4.1.9.zip (14.1 KB, 350 views)
__________________
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
Reply With Quote