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

How to display or even log IP address on register page?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-11-2009, 09:51 PM
  acidon's Avatar 
acidon acidon is offline
 

Senior Member
  
Join Date: Feb 2008
Posts: 139
 

Default How to display or even log IP address on register page?

Hi I would like to be able to either log registrant IP or to display it on Register page?

Do I need to modify register.php or there a way to include it in register.tpl?

Thanks in advance!
__________________
Version 4.7.6 X-cart Gold
Reply With Quote
  #2  
Old 02-12-2009, 04:29 PM
 
uglysign uglysign is offline
 

Advanced Member
  
Join Date: Feb 2008
Posts: 70
 

Default Re: How to display or even log IP address on register page?

Use:

{$REMOTE_ADDR}
__________________
4.4.3
One Page Checkout :: OnSale :: Download Expander
Smart Template by X-Cart MODS
Reply With Quote

The following user thanks uglysign for this useful post:
acidon (04-15-2009)
  #3  
Old 12-01-2009, 01:25 PM
 
SGS SGS is offline
 

Advanced Member
  
Join Date: May 2006
Posts: 99
 

Default Re: How to display or even log IP address on register page?

What code can I use to get the IP address to show up on a customers invoice. I want to track each IP address used for each purchase and have it show on the invoice.

I have tried {$order.$REMOTE_ADDR} but it does not show the IP address on the invoice?

When I use the {$REMOTE_ADDR} alone, it works but only shows my IP address.

Anyone doing this now?
__________________
Currently Using:

For X-cart v5.2.0
1 Business v5.2.6 license <Getting Better>!
1 Banner Mod 5.2.7 license
1 #28 iGoods Template

For X-cart v4.7.0

1 GoldPlus v4 license unused

3 Gold v4 license Unused

A wise man once said it is best to fix the cart instead of trying to use a broken cart. The horse has a very hard time pushing a broken cart!!
Reply With Quote
  #4  
Old 12-01-2009, 02:17 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: How to display or even log IP address on register page?

{$REMOTE_ADDR} will show the ip address at the moment {$REMOTE_ADDR} is called. If IP is not saved in orders table with all order details when order is placed then you can't show it. It must be saved at the time order is placed in orders table
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #5  
Old 12-01-2009, 06:50 PM
 
SGS SGS is offline
 

Advanced Member
  
Join Date: May 2006
Posts: 99
 

Wink Re: How to display or even log IP address on register page?

Ok, so if every time an order is made and the IP address is save, also saved and shown on the Admin order page, then that code when placed on the Invoice template will also show the IP address used at the time the order was placed?



Will the IP address change on all past orders, in the Order History if customer has a different IP address?

Thank you for the very fast reply too.
__________________
Currently Using:

For X-cart v5.2.0
1 Business v5.2.6 license <Getting Better>!
1 Banner Mod 5.2.7 license
1 #28 iGoods Template

For X-cart v4.7.0

1 GoldPlus v4 license unused

3 Gold v4 license Unused

A wise man once said it is best to fix the cart instead of trying to use a broken cart. The horse has a very hard time pushing a broken cart!!
Reply With Quote
  #6  
Old 12-01-2009, 07:02 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: How to display or even log IP address on register page?

No it won't. Past orders IP is already in DB and won't change
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #7  
Old 12-02-2009, 01:04 AM
 
SGS SGS is offline
 

Advanced Member
  
Join Date: May 2006
Posts: 99
 

Default Re: How to display or even log IP address on register page?

Ok, well I got it to work. I used the {$order.extra.ip} and that seems to work fine. Each order has and IP now, all called from the order info table I would think.

Thanks for all your help.

Cheers
__________________
Currently Using:

For X-cart v5.2.0
1 Business v5.2.6 license <Getting Better>!
1 Banner Mod 5.2.7 license
1 #28 iGoods Template

For X-cart v4.7.0

1 GoldPlus v4 license unused

3 Gold v4 license Unused

A wise man once said it is best to fix the cart instead of trying to use a broken cart. The horse has a very hard time pushing a broken cart!!
Reply With Quote
  #8  
Old 12-02-2009, 03:28 AM
 
anandat anandat is offline
 

X-Adept
  
Join Date: Jan 2004
Posts: 914
 

Question Re: How to display or even log IP address on register page?

Quote:
Originally Posted by SGS
Ok, well I got it to work. I used the {$order.extra.ip} and that seems to work fine. Each order has and IP now, all called from the order info table I would think.

Thanks for all your help.

Cheers
Hi can you please tell me in detail exactly where to put $order.extra.ip} so in the order it will automatically added ?
__________________
X-Cart: 4.7.7 LIVE
Skin:Ultra by xcartmods.co.uk
X-cart Modules: | ACR, Rich Google Search, Customer Testimonials | Cloud Search, | Websitecm: CDSEO (2.1.9)
---------------
Server: Linux
php: 5.3
mysql: 5.0.89
----------------
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 03:19 PM.

   

 
X-Cart forums © 2001-2020