Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Logging IP numbers

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #71  
Old 09-07-2004, 05:00 AM
 
garryhs garryhs is offline
 

Senior Member
  
Join Date: Sep 2002
Location: Australia
Posts: 159
 

Default IP Logging in X-CART Gold 4.0.x

Hi all,

Just a quick note, I may be wrong, and have not had time to look at the code, but looking at the database, it appears that when an order is placed in 4.0.x it now displays the IP Address for the customer.

However, this IP may be wrong. I looked quickly and I cannot find anywhere except for the login table where the IP is stored.

So if a customer is either using different machines, or having their IP assigned each time they logon to the net, then this could be wrong.

A Customer may place many orders with your store, and each order may be placed from different locations (work, home, even remote now with wireless internet). So picking up the IP from the login table could be wrong.

I agree, it should be recorded in the login table, but why does X-CART not store it in the orders table as well ???.

This way you would have the correct IP for each order !

Come on X-CART, think about it !

PS: I have now developed a mod, which detects the country of the shopper/visitor and displays the alternate currency for their country (if availbale). With a small mod, it could also be used to stop traffic from certain countries. (ie. If you do not ship outside the USA, then stop the customer at the front door and don't let them in. This would save on server resourses and bandwidth).
__________________
All versions of X-Cart

Been in eCommerce 10 years, Coding, PM, SEO, Social. X-Cart 11 years. IT 30+ years.

Head of Web Dev for Australia's largest eCommerce 2 years.

Attended conferences, Velocity 2009 US, CeBit 2009, MySQL 2010 US, Online Retailer 2010, Web 2.0 2011 US, MySQL 2012 US (Percona).

Specialise in High Performance, High Volume, PHP, MySQL, HTML, CSS, JAVASCRIPT, SMARTY, MEMCACHED, APACHE, LIGHTTPD, FREEBSD, LINUX.

Email your requests to xcart@gazwebtech.com
Reply With Quote
  #72  
Old 09-23-2004, 02:25 PM
 
wallachee wallachee is offline
 

Senior Member
  
Join Date: Feb 2003
Posts: 102
 

Default

The mod doesn't appear to work in 3.5.10...It gives this error:

Parse error: parse error, unexpected T_STRING in ....../include/fetch_remote_address.php on line 12

Any ideas?

-Bradley
Reply With Quote
  #73  
Old 09-23-2004, 02:49 PM
 
wallachee wallachee is offline
 

Senior Member
  
Join Date: Feb 2003
Posts: 102
 

Default

I got the IP to be displayed in 3.5.10 using Boomers original mod...to get it working, follow Boomer's mod and then just modify the top_inc.php file to include the additional variables...the code should look like:

Code:
if (!in_array($__key, array("HTTP_GET_VARS","HTTP_POST_VARS","HTTP_SERVER_VARS","HTTP_ENV_VARS","HTTP_COOKIE_VARS","HTTP_POST_FILES","__key","__val","_GET","_POST","_SERVER")))

-Bradley
Reply With Quote
  #74  
Old 09-25-2004, 02:25 PM
  adpboss's Avatar 
adpboss adpboss is offline
 

X-Man
  
Join Date: Feb 2003
Location: Ontario, Canada
Posts: 2,389
 

Default

Anyone got this working on 4.0?
Reply With Quote
  #75  
Old 09-25-2004, 04:08 PM
  lildawg's Avatar 
lildawg lildawg is offline
 

X-Adept
  
Join Date: Jan 2003
Location: Utah
Posts: 686
 

Default

garryhs:

The IP is stored in xcart_order_extras for each order placed and not just in the login. You will notice there are 2 fields created for eash order placed in this table and it also list the time it was placed in here as well.
Reply With Quote
  #76  
Old 09-25-2004, 04:11 PM
  adpboss's Avatar 
adpboss adpboss is offline
 

X-Man
  
Join Date: Feb 2003
Location: Ontario, Canada
Posts: 2,389
 

Default

Quote:
Originally Posted by lildawg
garryhs:

The IP is stored in xcart_order_extras for each order placed and not just in the login. You will notice there are 2 fields created for eash order placed in this table and it also list the time it was placed in here as well.
DAYAM. Thanks 'Dawg!
Reply With Quote
  #77  
Old 09-25-2004, 04:13 PM
  lildawg's Avatar 
lildawg lildawg is offline
 

X-Adept
  
Join Date: Jan 2003
Location: Utah
Posts: 686
 

Default

Ah shucks, it was nothing and thanks by the way for that htaccess file earlier.
Reply With Quote
  #78  
Old 09-25-2004, 05:53 PM
  BCSE's Avatar 
BCSE BCSE is offline
 

X-Guru
  
Join Date: Apr 2003
Location: Ohio - bcsengineering.com
Posts: 3,091
 

Default

Quote:
Originally Posted by adpboss
Anyone got this working on 4.0?

4.0.x logs IP addresses with the orders already. They listened.

Carrie
__________________
Custom Development, Custom Coding and Pre-built modules for X-cart since 2002!

We support X-cart versions 3.x through 5.x!

Home of the famous Authorize.net DPM & CIM Modules, Reward Points Module, Point of Sale module, Speed Booster modules and more!


Over 200 X-cart Mods available & Thousands of Customizations Since 2002 - bcsengineering.com

Please E-Mail us for questions/support!
Reply With Quote
  #79  
Old 10-09-2004, 06:22 PM
 
sabrina sabrina is offline
 

Advanced Member
  
Join Date: Feb 2003
Location: Indianapolis, IN., USA
Posts: 53
 

Default

Quote:
Originally Posted by Blind Freddy
Hi,

Could someone please tell me if it is possible to take the IP address of the clients who register, do a WHOIS lookup, and then store the country in which their ISP is located into an X-Cart field?

thanks,
Eric G.

Try this, it's not perfect but maybe help.
__________________
X-CART GOLD: 4.0.14

Operating system Linux
Apache version 1.3.33 (Unix)
PERL version 5.8.1
PHP version 4.3.10
MySQL version 4.0.22-standard
Reply With Quote
  #80  
Old 10-09-2004, 06:26 PM
 
sabrina sabrina is offline
 

Advanced Member
  
Join Date: Feb 2003
Location: Indianapolis, IN., USA
Posts: 53
 

Default


Your IP address <a href="http://www.samspade.org/t/lookat?a={$smarty.server.REMOTE_ADDR}" target="_blank">
{$smarty.server.REMOTE_ADDR} is logged for security reasons.</a>
__________________
X-CART GOLD: 4.0.14

Operating system Linux
Apache version 1.3.33 (Unix)
PERL version 5.8.1
PHP version 4.3.10
MySQL version 4.0.22-standard
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 06:49 AM.

   

 
X-Cart forums © 2001-2020