Use Customer's geo-location to filter shops on arrival

Hi again @jveilleux

some quick responses, assuming the 3 numbered questions above are summarised / refined versions of the previous post :slight_smile:

  1. What’s the comparison point for the distance calculation? Are you using the user’s geocode, and if so, how are you getting it?

Not sure - pretty sure we’re not using the user’s geocode (don’t recall it ever being discussed) so I’d be guessing it’s working from the location identified in the search box. Have just had a little poke around using Chrome’s developer tools (view, developer, developer tools, network) and as a non-tech person it kinda looks like that’s what’s happening. Seems to be sending requests to google api as I’m typing

  1. How do we find what table the geocode of the markets is being kept in? Or is it obvious? (there are so many tables in OFN, I haven’t tried to understand the structure myself.

As above, I don’t think the geocode is being stored . . Again, there may be some clues for where to look at what’s going using developer tools (see below), but this is best confirmed by a dev - let us know if @ravi can’t easily see what’s going on

  1. What are you using the geocode the market’s address? I know this is possible using Google Maps API, but trying to understand what method OFN actually uses.

pretty sure that would be the google maps API as above.

Some quick points re. other comments above:

  • stuff about addresses - the Enterprise addresses are street addresses. I don’t know how google maps deals with address geocoding for a suburb / area e.g. if it is looking at centre or what. I’m sure their documentation will tell you. But if you’re trying to match a user’s IP with an enterprise address you’d be comparing two quite specific things and should get a clear distance result
  • does google deal with both mailing and municipal addresses? If so your concerns simplify as users can enter (or detect from IP) more info if they need closer matches. But as long as you’re returning the enterprises/markets closest to them it’ll be fine
  • re. search / categories: as you’re running your own instance you can set both the product categories and properties (more suited to Kosher, Hallal etc) however you want them. If you haven’t had a read-through the setting up your own instance threads now would probably be a good time. Also this recent post could be useful Product categories/taxonomies

Cheers
Kirsten