1

I am developing a deal based site in drupal 7. I am using addressfield, geocoder, leaflet and views module to display deals node on leaflet map.

I am able to attach exposed filter "city" so that use can search deals on specific city but I want it like groupon site, where they recognize visitor city and displaying all deals related to visitor current city.

How can I get user current city and display all content related to user city on leaflet map and node view.

Thanks

1

You might want to use SmartIP to get the ip/location of the visitor. Or enter a location in the user profile.

Then in the leaflet view, as filter use proximity. This way you can select the distance from the user to the node you want to filter on.

1
  • SmartIp provide $_SESSION['smart_ip'] variable which is available to use but how to use this information into views and apply filter to views? do I have to insert visitor city to any field and then use it on views! Jun 3 '15 at 4:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.