PHP & AJAX Store Locator

PHP & AJAX Store Locator

Released 3 years ago , Last update 2 years ago

An easy-to-configure PHP, AJAX & MySQL store locator script using Google Maps.

This is a fully featured store locator that you can use to provide easy store locator functionality to your (or your client's) website in under 5 minutes.

Features

  • Easy to configure and set up. (minimal coding skills required)
  • Uses Google Maps API v3 - No API key required!
  • Highly commented, with extra documentation included. (with package)
  • Admin Panel for listing, editing and removing stores.
  • Front-End for adding stores.
  • Easily integrated into existing website - minimal styling, login systems, etc.
  • Uses jQuery library for effects and AJAX.
  • New! JSON API for easy use with apps
4.6
  • 5 5
  • 4 4
  • 3 0
  • 2 0
  • 1 0
9 Reviews Read Reviews

Pricing

$9.99

Single Site

  • Perpetual license

  • 1 site, unlimited servers

  • No distribution (hosted use only)

  • Commercial use

  • 12 months support

$39.99

Developer License

  • Perpetual license

  • Unlimited projects

  • Can distribute code and binary products

  • Commercial use

  • 24 months support

Need custom services for this product? Get a quote

FAQ

Does this script use any JavaScript libraries?

Yes, it uses the latest jQuery library (1.6.2 at time of publishing).

What is "geocoder"/"geocoding"?

Geocoding is the process of converting a string into a latitude/longitude pair. A geocoder is a script/tool that geocodes addresses.

What is "region biasing"?

Region biasing, put simply is biasing results/favoring results from one region over another. For example, let's say a user typed in San Francisco as a location. If the region was set to the US, the geocoder pick San Francisco, CA over other results from other regions, such as San Francisco, Spain. Vice-versa, if the region was set to ES, it would pick San Francisco in Spain. That's why it's very important to set the region.

Installation

The configuration of this script is quick and easy, and should not take more than 3 minutes. This requires no skill other than copying/pasting text and editing a basic file.

Almost all of the configuration is done in the settings.php file, which is in the /bin directory. Out of the box, it should look something like this:

<?php
//Database Connection information.
$host="hostname"; //usually localhost
$username="username";
$password="secret";
$db_name="dbname";

//The unit of distance. If you want to use KM instead, put 'kilometers'
$unit = "miles";
$hav_int = 3959;    
//convert the unit string to a number.
if ($unit=="kilometers") {    
    $hav_int = 6371;
}
?>

Quick Setup (3 Steps)

  1. Unzip the directory into your location of choice (probably /public_html)
  2. Change your database connection information at the top ( the top 4 variables)
  3. Import the 'import.sql' file in the /bin folder which will create a folder called "stores" in your database of choice. Make sure that you are in the database of choice

Once you have done that, you are ready to roll out the script. However, you might want to make some localizations to your script (especially if you're deploying outside of the US).

Localizations

  1. In order to change default location of the map (from San Francisco, CA), you need to know the latitude and longitude of your new location, (if you don't know you can use a free geocoder like Tiny Geocoder). Then, go to add.js and locator.js (in the "js" folder), and in each file there is a line : var def_coords = {'lat' : 37.775196, 'lng': -122.419204};. replace 37.775196 with your latitude, and replace -122.419204 with your longitude.
  2. Change the $unit variable in settings.php to "kilometers" if you want kilometers, or keep it as miles depending on what is used in your country.
  3. Go to add.js, edit.js, and locator.js (in the "js" directory) and in each file at the top, there is a line: var region = 'us'; if you would like to change the region, you have to change it to ccTLD abbreviation for your country. (the top-level domain name). For example, you could set it to ca, or uk.
3 licenses, starting from From » $9.99 View Licenses

Get A Quote

What do you need?
  • Custom development
  • Integration
  • Customization / Reskinning
  • Consultation
When do you need it?
  • Soon
  • Next week
  • Next month
  • Anytime

Thanks for getting in touch!

Your quote details have been received and we'll get back to you soon.

or Get a quote

for customization or integration services


Or enter your name and Email
  • SC Simon Choy License holderSingle Site
    1 year support
    Purchased on Mar 23, 2012
    2 years ago
    Hi Souleiman. I've been using your script and modifying a few things. Really happy with it and definitely recommend it to others! There's two features that I wanted to add that are a bit challenging for me, so I wanted to pick your brain. 1. Pre-loading a search so it already displays results when a user visits. For example, on my site http://www.stringingnetwork.com/stringing-locator/ say I wanted to have a landing page specifically for New York, I would create one that has all 'stores' from NY already displayed within 50mi range. Been playing around in locator.js but can't get it to work!! 2. Allows registered users to input 'stores'. I know you can do this through add.php but I want the address inputted in separated form (i.e. by country, street, state etc.) instead of one big line so I can sort/filter data. My theoretical solution so far is to geocode user-inputted data through PHP server side (http://bit.ly/UPkI5B) and then write it to the stores table. PS. I realize providing the solution could be complex and time consuming for you. Even just a nudge in the right direction would be helpful.
  • GC Gus Castaneda 2 years ago
    I wish to buy this, but have few questions... Can it support different screen sizes such as desktop and mobiles? Can map be eleminated from displaying on same page and instead add Get Driving directions on every results list?
    • Souleiman Benhida Publisher 2 years ago
      Hi, thanks for showing interest in my script. 1) I'm not sure what you mean by support.. if you mean that it has a specific mobile website part, then no, but the regular desktop version runs fine on iPhones and iPads. 2) As of the current version, you can not get driving directions. I can't imagine it'd be too hard, but sadly it is not in the current version. Perhaps, in a later version I may add it IA but in the meantime you may want to look for another locator that does that. I'm sorry that my locator doesn't have all the features you want, but I think the code is clean and easy to understand and with a decent knowledge of PHP/AJAX you could do anything you want with it! Thanks!
  • CC Chuck Card 2 years ago
    Can you send google maps a look up request with lat and lng instead of the street address? The reason I ask is because google maps will often send back a marker in the wrong lat lng location on the map when the request is via a street address. Off by a mile in many instances.
    • Souleiman Benhida Publisher 2 years ago
      *sorry for double post* Hi, The way the locator works is that it takes the inputted address, sends it to google's geocoding service (address to lng/lat) then uses that lat/lng to put a marker on the map and find stores. I see you don't own a copy of the script, so I can't recommend any fixes, but please give me the addresses you put in to take a look at the problem. Cheers