Super Store Finder is a fully featured PHP Application integrated with Google Maps API v3 that allows customers to locate your stores easily. Packed with Geo IP technology, your customers will be able to view a list of nearby stores / outlets around them sorted by distance. Setup is really easy and quick while deploying the store finder to any website gets even easier when you can embed it to any web page or CMS (Joomla/Wordpress/Drupal/etc) by simply copy and paste the embed code. The responsive user interface works on various platform such as PC, laptops, smart phones and other mobile devices.
Run the SQL below to create the tables structure and sample data for a database called store_finder. A sample admin user is created as below.
username: admin
password: password
/* Database Creation */
CREATE DATABASE `store_finder`;
USE `store_finder`;
/* Stores table */
CREATE TABLE IF NOT EXISTS `stores` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(255) character set utf8 collate utf8_bin NOT NULL,
`address` varchar(255) character set utf8 collate utf8_bin NOT NULL,
`telephone` varchar(25) NOT NULL default '',
`fax` varchar(25) NOT NULL default '',
`mobile` varchar(25) NOT NULL default '',
`email` varchar(255) NOT NULL default '',
`website` varchar(255) NOT NULL default '',
`description` text character set utf8 collate utf8_bin NOT NULL,
`approved` tinyint(1) NOT NULL default '0',
`latitude` float NOT NULL default '0',
`longitude` float NOT NULL default '0',
`created` datetime NOT NULL,
`modified` datetime NOT NULL,
`status` tinyint(1) NOT NULL default '1',
`cat_id` int(9) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
);
/* Users table */
CREATE TABLE `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(100) NOT NULL,
`password` varchar(100) NOT NULL,
`firstname` varchar(255) NOT NULL,
`lastname` varchar(255) NOT NULL,
`facebook_id` varchar(255) NOT NULL,
`address` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`created` datetime NOT NULL,
`modified` datetime NOT NULL,
`status` tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`)
);
/* insert admin user */
/* Username: admin, Password: password */
insert into `users`(`username`,`password`) values ('admin','e64a4f78be2256a38de080744dd5b117');
/* Store categories table */
CREATE TABLE `categories` (
`id` int(11) NOT NULL auto_increment,
`cat_name` varchar(100) character set utf8 collate utf8_bin default NULL,
`cat_icon` varchar(255) default NULL,
`cat_parent_id` int(11) default NULL,
`cat_free_flag` int(1) default NULL,
PRIMARY KEY (id)
);
There are two files that you need to setup the database information. Kindly edit the following code with the correct information:
/includes/config.inc.php - for the frontend
// define the root path to the front end folder
define('ROOT', $_SERVER['DOCUMENT_ROOT'].'/superstorefinder/');
// define the root URL to the front end section
define('ROOT_URL', 'http://yourwebsite.com/superstorefinder/');
// define database settings
define('HOSTNAME','localhost');
define('DB_USERNAME','your_database_username');
define('DB_PASSWORD','your_database_password');
define('DB_NAME','store_finder');
// define default language. Note: session will have to be deleted before it will reflect the site upon refresh
define('DEFAULT_LANGUAGE', 'en_US');
/admin/includes/config.inc.php - for the administrator
// define the root path to the admin folder
define('ROOT', $_SERVER['DOCUMENT_ROOT'].'/superstorefinder/admin/');
// define the root URL to the admin section
define('ROOT_URL', 'http://yourwebsite.com/superstorefinder/admin/');
// define database settings
define('HOSTNAME','localhost');
define('DB_USERNAME','your_database_username');
define('DB_PASSWORD','your_database_password');
define('DB_NAME','store_finder');
You need to edit:
Next, you need to set permission 777 (with recursive) for the following folders:
To view to the Administrator's Area visit the '/admin' section. You will be required to login. The premade admin user login is as the following.
username: admin
password: password
You can have multiple admin users to manage your stores using the administrator area. Features such as Add/Edit/Delete admin users and change their password are available. To add a new admin user, login to administrator's area and click on 'Add Admin User' from the navigation bar. To view / edit / delete admin users, click on 'Admin User List'.
This will display all your store list from the database. You can add more store by clicking Store List link at the top navigation. To edit or delete a specific Store use the edit icon for each store.
To add a Store click the Add Store link from the main navigation. Here you can enter Store Name, Store Address, Upload picture, etc. Longitude and Latitude values will be auto detected upon entering an address.
Firstly navigate to Store List from the main navigation menu. To edit a Store click the Edit icon for a store. You can make changes here and save.
Firstly navigate to Store List from the main navigation menu. To delete a Store click the Delete icon for a particular store. You will be prompted with a confirmation.
Firstly navigate to Store List from the main navigation menu. Stores that have added by users from frontend by default will be having status of 'Not Approved', this means that they must be approved by an admin user before it's visible at frontend. Administrators can approve a store add request by clicking the Approve link from the Action column.
If you wish to disable Geo IP, edit index.php and search for:
$('#address').val(geoip_city()+", "+geoip_country_name());
Edit it to your city and country, example:
$('#address').val("Sydney, Australia");
Next edit js/super-store-finder.js and change the following
// auto detect GEO ip, use script below
gmap_location_lookup(geoip_city()+', '+geoip_country_name(),'200','');
Modify it for example New York. Take note the 200 is the radius by mile of nearby stores you can modify that too.
//Hard coding default location
gmap_location_lookup('New York, NY','200','');
You can embed your store finder on any website using the embed code which can be found at index page. Refer screenshot below.
If you have installed the store finder at http://yoursite.com/storefinder, navigate to that path to view the store finder frontend user interface.
When you're searching for a location, the autofill feature will suggest a city name. Press Find Store button to proceed and nearby stores will be displayed on map as well as in the list from the right navigation.
By clicking on a particular store, it will display the store information such as address, tel and website. If the store has email, a button Contact this Store will appear allowing you to contact the store outlet via email.
Wish public users to help grow your store database, if you're opening a directory listing you can allow public users to click on Add Store link from the navigation menu. Once added, the store will require approval from an administrator before it will be published in the store finder.
We provide fast and reliable support, for inquiry, troubleshooting, customization and special requests, please send an email to Highwarden at http://codecanyon.net/user/highwarden
Be sure to follow us on envator for new releases and future products here.