Nop 3.50 Does not show user location

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
3 anni tempo fa
Hi,

I'm running Nop 3.50 (cannot upgrade due to many customizations that were done on this version). When I go to the online customers section, I can see the customer and guests logged in, but the Location column is always empty. Any ideas how to enable it so that it shows the users' locations?

Thank you in advance for your help.
3 anni tempo fa
not sure if 3.5 works exactly the same as 4.3+, but I imagine it's close enough.  The location is determined by the GeoLookupService and gets the Country Name associated with the IP address in /App_Data/GeoLite2-Country.mmdb

I would guess that your Geo file is either very outdated (IP address ranges can change on a monthly time scale) or perhaps missing.  Assuming 3.5 uses it, you can get an updated copy here:https://dev.maxmind.com/geoip/geoip2/geolite2/

You can check the code here: https://github.com/nopSolutions/nopCommerce/blob/9b73ccd65d6b6abecb691132fafdb451c1c6bfa3/src/Libraries/Nop.Services/Directory/GeoLookupService.cs#L42
3 anni tempo fa
Thank you for this reply. I actually downloaded and updated that very file yesterday and made no difference.
3 anni tempo fa
you'd have to get the source code to see how 3.5 works:
https://github.com/nopSolutions/nopCommerce/releases/tag/release-3.50

I imagine it's catching an exception and returning null, but you'll need Visual Studio and the ability to edit/debug code to be sure.
3 anni tempo fa
also double check that your website has read permissions for that file.  It has to have permissions already for /App_Data, otherwise the site wouldn't work, but if the Geo db underneath has been updated, well, I've seen stranger things.

Has it ever worked, or did it stop recently?
3 anni tempo fa
It never worked. Ever. Is there an easy way to make sure and/or enable the permission to read that file? Everything else works great but the location does not appear. It is blank.
3 anni tempo fa
If it's never worked I doubt it's permissions.  Do you have the source code for your installation?

To check permissions it depends on the server, but for Windows (assuming you have RDP access) just right click and go to the Security tab.  Highlight your site's user and Edit:

3 anni tempo fa
OK. I will try this tomorrow. Thanks!
3 anni tempo fa
Well, I had this due to the fact that there were some problems with the IP, I found the solution here on the forum, look at this topic https://www.nopcommerce.com/en/boards/topic/28402/guest-showing-no-ip-addresspage maybe it will be useful for you.
3 anni tempo fa
martystevenson wrote:
Well, I had this due to the fact that there were some problems with the IP, I found the solution here on the forum, look at this topic https://www.nopcommerce.com/en/boards/topic/28402/guest-showing-no-ip-addresspage maybe it will be useful for you.


Thanks but I had seen this post before. I don't think it provides an actual solution as to how to block or see the actual IP. It appears that topic only explains how to delete these users, no?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.