Jump to content

Customer IP-addresses are not available


Masteries

Recommended Posts

On the order page, the customer IP address should be visible at the bottom under the "Sources" section but for some reason it's not. The "Sources" section is not at all displayed on most orders and those that have it visible, it's only showing the customer's referral URL & date. All the statistics modules are active and all the database tables pertaining to customer data (including ps_connections) are up to date. My payment processor sent me a notice today telling me to fix this issue as the majority of the orders have 0.0.0.0 as an IP-address. What could the issue be?

 

My Prestashop version: 1.6.0.6

 

 

Any help would be appreciated!

Edited by Masteries (see edit history)
Link to comment
Share on other sites

Look at ../classes/Tools.php

 

There you find

 

 public static function getRemoteAddr()

 

There are several tests performed in order to get the most reliable remote IP Address. Check if this works on your environment.

Use some devices out of your office or company network to test this as well.

 

There most common php array is $_SERVER['REMOTE_ADDR'] - try a temp fix with that function by putting this into the first line of the above mentionned function:

 

return $_SERVER['REMOTE_ADDR'];
Edited by Scully (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...