Version Notes
Fix Issue :- Add Table prefix. Auto default Store information load. easy to install.
Download this release
Release Info
Developer | mukesh kumar saini |
Extension | Mks_Storelocator |
Version | 1.1.2 |
Comparing to | |
See all releases |
Code changes from version 1.1.1 to 1.1.2
- app/code/community/Mks/Storelocator/sql/storelocator_setup/mysql4-install-1.1.1.php +5 -1
- app/design/adminhtml/default/default/template/storelocator/storelocatorbackend.phtml +2 -12
- app/design/frontend/base/default/template/storelocator/config.phtml +50 -0
- app/design/frontend/base/default/template/storelocator/index.phtml +24 -72
- media/storelocator/storelocator/map1.jpg +0 -0
- media/storelocator/storelocator/map2.jpg +0 -0
- media/storelocator/storelocator/map3.jpg +0 -0
- package.xml +8 -10
app/code/community/Mks/Storelocator/sql/storelocator_setup/mysql4-install-1.1.1.php
CHANGED
@@ -2,7 +2,11 @@
|
|
2 |
$installer = $this;
|
3 |
$installer->startSetup();
|
4 |
$sql=<<<SQLTEXT
|
5 |
-
create table mksstorelocator(id int not null auto_increment, name varchar(100), address varchar(255),zipcode varchar(100),city varchar(100),country_id varchar(100),phone varchar(100),fax varchar(100),description varchar(255),store_url varchar(100),image varchar(100),marker varchar(100),lat varchar(100),longt varchar(100),status varchar(100),primary key(id));
|
|
|
|
|
|
|
|
|
6 |
|
7 |
SQLTEXT;
|
8 |
|
2 |
$installer = $this;
|
3 |
$installer->startSetup();
|
4 |
$sql=<<<SQLTEXT
|
5 |
+
create table {$this->getTable('mksstorelocator')} (id int not null auto_increment, name varchar(100), address varchar(255),zipcode varchar(100),city varchar(100),country_id varchar(100),phone varchar(100),fax varchar(100),description varchar(255),store_url varchar(100),image varchar(100),marker varchar(100),lat varchar(100),longt varchar(100),status varchar(100),primary key(id));
|
6 |
+
|
7 |
+
INSERT INTO {$this->getTable('mksstorelocator')} (`name`, `address`, `zipcode`, `city`, `country_id`, `phone`, `fax`, `description`, `store_url`, `image`, `lat`, `longt`, `status`) VALUES ('Malviya Nagar','Malviya Nagar Rajasthan (India)','302018','jaipur','india','8764226568','xxxxx','Malviya Nagar Rajasthan (India) ','http://www.magentocommerce.com/magento-connect/developer/mukeshsaini','storelocator/storelocator/map1.jpg','26.857126400000000000','75.812719900000050000','0'),
|
8 |
+
('Karachi Sindh','Karachi Sindh Pakistan','302018','Karachi','Pakistan','8764226568','xxxxx','Karachi Sindh Pakistan ','http://www.magentocommerce.com/magento-connect/developer/mukeshsaini','storelocator/storelocator/map2.jpg','24.893379000000000000','67.028060900000010000','0'),
|
9 |
+
('New York NY','New York NY United States','302018','New York','United States','8764226568','xxxxx','New York NY United States ','http://www.magentocommerce.com/magento-connect/developer/mukeshsaini','storelocator/storelocator/map3.jpg','40.714352800000000000','-74.005973100000000000','0');
|
10 |
|
11 |
SQLTEXT;
|
12 |
|
app/design/adminhtml/default/default/template/storelocator/storelocatorbackend.phtml
CHANGED
@@ -1,13 +1,3 @@
|
|
1 |
-
<h1>Storelocator</h1>
|
2 |
-
<b>Display your locations on the map and make customers know where your offline shops are situated. </b>
|
3 |
|
4 |
-
<
|
5 |
-
|
6 |
-
<h2>Store Locator </h2>
|
7 |
-
<p>
|
8 |
-
The Store Locator Magento extension is an amazing tool for merchants who have physical locations of retailers. The module gives you a help in adding store addresses to the website and navigating visitors to the required one.
|
9 |
-
</p>
|
10 |
-
|
11 |
-
<p>
|
12 |
-
You can create as many locations as you need - they will be displayed in a pleasant vertical presentation on a separate page. Just specify the address of your store and see how it will be automatically detected on the map. Let your customers easily find the page with addresses by adding store locations url to the top Magento links. Customers get to know all existed locations on the map and view the detailed information about them by clicking the store icon.
|
13 |
-
</p>
|
|
|
|
|
1 |
|
2 |
+
<iframe src="http://www.magentocommerce.com/magento-connect/developer/mukeshsaini" width="100%" height="1000"></iframe>
|
3 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/storelocator/config.phtml
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$prefix = Mage::getConfig()->getTablePrefix();
|
3 |
+
$connection = Mage::getSingleton('core/resource')->getConnection('core_write');
|
4 |
+
$prefix = Mage::getConfig()->getTablePrefix();
|
5 |
+
$tblname=$prefix.'mksstorelocator';
|
6 |
+
$sql1 = $connection->query("select * from $tblname order by id limit 1" );
|
7 |
+
$row1 = $sql1->fetch();
|
8 |
+
$latitudex = $row1['lat'];
|
9 |
+
$longitudex = $row1['longt'];
|
10 |
+
$addressx = $row1['address'];
|
11 |
+
?>
|
12 |
+
|
13 |
+
<script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
|
14 |
+
<script src="https://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>
|
15 |
+
<script type="text/javascript">
|
16 |
+
|
17 |
+
function map_xxx(x,y,z)
|
18 |
+
{
|
19 |
+
var latitude = x; // parseFloat("26.850883100000000000");
|
20 |
+
var longitude = y; // parseFloat("75.824783600000040000");
|
21 |
+
var address = z; // "Rohini, New Delhi, Delhi, India";
|
22 |
+
var latlngPos = new google.maps.LatLng(latitude,longitude);
|
23 |
+
|
24 |
+
// Set up options for the Google map
|
25 |
+
var myOptions = {
|
26 |
+
zoom: 10,
|
27 |
+
center: latlngPos,
|
28 |
+
mapTypeId: google.maps.MapTypeId.ROADMAP,
|
29 |
+
zoomControlOptions: true,
|
30 |
+
zoomControlOptions: {
|
31 |
+
style: google.maps.ZoomControlStyle.LARGE
|
32 |
+
}
|
33 |
+
};
|
34 |
+
// Define the map
|
35 |
+
map = new google.maps.Map(document.getElementById("map"), myOptions);
|
36 |
+
// Add the marker
|
37 |
+
var marker = new google.maps.Marker({
|
38 |
+
position: latlngPos,
|
39 |
+
map: map,
|
40 |
+
draggable: false,
|
41 |
+
title: address
|
42 |
+
});
|
43 |
+
|
44 |
+
};
|
45 |
+
</script>
|
46 |
+
|
47 |
+
<body onload="map_xxx('<?php echo $latitudex ?>','<?php echo $longitudex; ?>','<?php echo $addressx; ?>');">
|
48 |
+
<?php
|
49 |
+
$sql = $connection->query("select * from $tblname where status='0'" );
|
50 |
+
?>
|
app/design/frontend/base/default/template/storelocator/index.phtml
CHANGED
@@ -1,86 +1,37 @@
|
|
1 |
-
<?php
|
2 |
-
$connection = Mage::getSingleton('core/resource')->getConnection('core_write');
|
3 |
-
$sql1 = $connection->query("select * from mksstorelocator order by id limit 1" );
|
4 |
-
$row1 = $sql1->fetch();
|
5 |
-
$latitudex = $row1['lat'];
|
6 |
-
$longitudex = $row1['longt'];
|
7 |
-
$addressx = $row1['address'];
|
8 |
-
?>
|
9 |
-
|
10 |
-
<script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
|
11 |
-
<script src="https://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>
|
12 |
-
<script type="text/javascript">
|
13 |
-
|
14 |
-
function map_xxx(x,y,z)
|
15 |
-
{
|
16 |
-
var latitude = x; // parseFloat("26.850883100000000000");
|
17 |
-
var longitude = y; // parseFloat("75.824783600000040000");
|
18 |
-
var address = z; // "Rohini, New Delhi, Delhi, India";
|
19 |
-
var latlngPos = new google.maps.LatLng(latitude,longitude);
|
20 |
-
|
21 |
-
// Set up options for the Google map
|
22 |
-
var myOptions = {
|
23 |
-
zoom: 10,
|
24 |
-
center: latlngPos,
|
25 |
-
mapTypeId: google.maps.MapTypeId.ROADMAP,
|
26 |
-
zoomControlOptions: true,
|
27 |
-
zoomControlOptions: {
|
28 |
-
style: google.maps.ZoomControlStyle.LARGE
|
29 |
-
}
|
30 |
-
};
|
31 |
-
// Define the map
|
32 |
-
map = new google.maps.Map(document.getElementById("map"), myOptions);
|
33 |
-
// Add the marker
|
34 |
-
var marker = new google.maps.Marker({
|
35 |
-
position: latlngPos,
|
36 |
-
map: map,
|
37 |
-
draggable: false,
|
38 |
-
title: address
|
39 |
-
});
|
40 |
-
|
41 |
-
};
|
42 |
-
</script>
|
43 |
-
|
44 |
-
<body onload="map_xxx('<?php echo $latitudex ?>','<?php echo $longitudex; ?>','<?php echo $addressx; ?>');">
|
45 |
-
|
46 |
<table id="map_xxx" style="width:900px; border:10px;">
|
47 |
-
<tr><td style="
|
48 |
-
<?php
|
49 |
-
$sql = $connection->query("select * from mksstorelocator" );
|
50 |
while($row = $sql->fetch())
|
51 |
{?>
|
52 |
-
<table id="store-table" class="store-table">
|
53 |
<tr>
|
54 |
-
<td
|
55 |
-
<img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).$row['image']; ?>" alt="
|
56 |
</td>
|
57 |
-
|
|
|
58 |
<tr>
|
59 |
<td>
|
60 |
<h3 class="store_name" onclick="map_xxx('<?php echo $row['lat']; ?>','<?php echo $row['longt']; ?>','<?php echo $row['address']; ?>');"><?php echo $row['name']; ?></h3>
|
61 |
</td>
|
62 |
</tr>
|
63 |
-
<tr>
|
64 |
-
<td class="col-address"
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
?>
|
70 |
-
|
71 |
-
</tr>
|
72 |
-
<tr>
|
73 |
-
|
74 |
-
|
75 |
-
<tr>
|
76 |
-
<td>Website : <a href="<?php echo $row['store_url']; ?>" target="_blank"><?php echo $row['store_url']; ?></a></td>
|
77 |
-
</tr>
|
78 |
-
<tr>
|
79 |
-
<td> Phone :<?php echo $row['phone']; ?> </td>
|
80 |
</tr>
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
</table>
|
85 |
<?php } ?>
|
86 |
|
@@ -89,3 +40,4 @@ $add = $row['zipcode'].$row['address'];
|
|
89 |
<td style="width:500px;">
|
90 |
<div id="map" style="width:500px; height:500px;"></div>
|
91 |
</td></tr></table>
|
|
1 |
+
<?php require_once 'app/design/frontend/base/default/template/storelocator/config.phtml'; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
<table id="map_xxx" style="width:900px; border:10px;">
|
3 |
+
<tr><td style="height: 500px; overflow: auto; display:block;" >
|
4 |
+
<?php
|
|
|
5 |
while($row = $sql->fetch())
|
6 |
{?>
|
7 |
+
<table id="store-table" class="store-table" style="margin-bottom:10px;">
|
8 |
<tr>
|
9 |
+
<td class="left">
|
10 |
+
<img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).$row['image']; ?>" alt="<?php echo $row['name']; ?>" width="120" height="100" style="margin-right:5px;">
|
11 |
</td>
|
12 |
+
<td class="right" style="width:250px;">
|
13 |
+
<table class="mintbl">
|
14 |
<tr>
|
15 |
<td>
|
16 |
<h3 class="store_name" onclick="map_xxx('<?php echo $row['lat']; ?>','<?php echo $row['longt']; ?>','<?php echo $row['address']; ?>');"><?php echo $row['name']; ?></h3>
|
17 |
</td>
|
18 |
</tr>
|
19 |
+
<tr><td class="col-address"><?php echo $row['address']; ?></td></tr>
|
20 |
+
<tr><td class="col-address">
|
21 |
+
Zip Code : <?php echo $row['zipcode']; ?> ,
|
22 |
+
City : <?php echo $row['city']; ?>
|
23 |
+
</td></tr>
|
24 |
+
<tr><td class="col-address">
|
25 |
+
Country : <?php echo $row['country_id']; ?> ,
|
26 |
+
Phone : <?php echo $row['phone']; ?>
|
27 |
+
</td></tr>
|
28 |
+
<tr><td>Fax :<?php echo $row['fax']; ?></td></tr>
|
29 |
+
</table>
|
30 |
+
</td>
|
|
|
|
|
|
|
|
|
|
|
31 |
</tr>
|
32 |
+
|
33 |
+
<tr><td colspan="2"> Website : <a href="<?php echo $row['store_url']; ?>" target="_blank"><?php echo $row['store_url']; ?></a></td></tr>
|
34 |
+
<tr><td colspan="2"> <?php echo $row['description']; ?></td></tr>
|
35 |
</table>
|
36 |
<?php } ?>
|
37 |
|
40 |
<td style="width:500px;">
|
41 |
<div id="map" style="width:500px; height:500px;"></div>
|
42 |
</td></tr></table>
|
43 |
+
|
media/storelocator/storelocator/map1.jpg
ADDED
Binary file
|
media/storelocator/storelocator/map2.jpg
ADDED
Binary file
|
media/storelocator/storelocator/map3.jpg
ADDED
Binary file
|
package.xml
CHANGED
@@ -1,20 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Mks_Storelocator</name>
|
4 |
-
<version>1.1.
|
5 |
<stability>stable</stability>
|
6 |
<license>OSL</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
-
<summary>
|
10 |
-
<description>
|
11 |
-
|
12 |
-
<
|
13 |
-
|
14 |
-
<
|
15 |
-
<
|
16 |
-
<time>07:11:46</time>
|
17 |
-
<contents><target name="magecommunity"><dir name="Mks"><dir name="Storelocator"><dir name="Block"><dir name="Adminhtml"><dir name="Storelocator"><dir name="Edit"><file name="Form.php" hash="00fed13f02e804d93bac7258689769ad"/><dir name="Tab"><file name="Form.php" hash="4620d9bad225fc9dc88b808fccae3b2f"/></dir><file name="Tabs.php" hash="8819f35cd4af4b61d14bf377c58432b6"/></dir><file name="Edit.php" hash="9be35d036a69cfb545d2f1c1649cb6ba"/><file name="Grid.php" hash="c1901ceac4aec85340a9d4f2d5e9df9f"/></dir><file name="Storelocator.php" hash="81770ec5e092a177c22e188b8db38d7e"/><file name="Storelocatorbackend.php" hash="d600cb8ff797f008c7c652a299305c8d"/></dir><file name="Index.php" hash="85128403f14502fe6642a23231079532"/></dir><dir name="Helper"><file name="Data.php" hash="083521dd42bf734a864e06dceb37b5a0"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Storelocator"><file name="Collection.php" hash="183c5eeeb2ef6b444bfc08a829b93cde"/></dir><file name="Storelocator.php" hash="29d65325bd746be070275726e309afdb"/></dir><file name="Storelocator.php" hash="e91d32a733f49d62d54c1335a57e2ee5"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="StorelocatorController.php" hash="0c853bc509d0069930481f4d09e426c6"/><file name="StorelocatorbackendController.php" hash="ea616e919ef3a6492ebbfb55daf57ea1"/></dir><file name="IndexController.php" hash="2da311b739d05591f0f4355c740cb5bc"/></dir><dir name="etc"><file name="config.xml" hash="1aed48b7351a7e3dcd8924c146ac4af0"/></dir><dir name="sql"><dir name="storelocator_setup"><file name="mysql4-install-1.1.1.php" hash="c30c6bcbb6b8b6a211f66e3e0da62586"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Mks_Storelocator.xml" hash="a6f6119398e1ac1d5d007d16f0b1a9c9"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="storelocator.xml" hash="c5ce52ab3f3f3d71dbb902134642e2dc"/></dir><dir name="template"><dir name="storelocator"><file name="storelocatorbackend.phtml" hash="e07dd382a8826b59d7ff43774fc73d87"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="storelocator.xml" hash="db01f1e299e94c6a4d633a1d2458f343"/></dir><dir name="template"><dir name="storelocator"><file name="index.phtml" hash="8e1c82a98529be3dd1d8fc5eb15b7580"/></dir></dir></dir></dir></dir></target></contents>
|
18 |
<compatible/>
|
19 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
20 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Mks_Storelocator</name>
|
4 |
+
<version>1.1.2</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>OSL</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
+
<summary>Store Locator show multi store. store locator increase your store sell. famous store with store locator.</summary>
|
10 |
+
<description>Store Locator show multi store. store locator increase your store sell. famous store with store locator.</description>
|
11 |
+
<notes>Fix Issue :- Add Table prefix. Auto default Store information load. easy to install.</notes>
|
12 |
+
<authors><author><name>mukesh kumar saini</name><user>mukeshbagri</user><email>in.mukeshsaini@gmail.com</email></author></authors>
|
13 |
+
<date>2014-02-21</date>
|
14 |
+
<time>11:19:14</time>
|
15 |
+
<contents><target name="mageetc"><dir name="modules"><file name="Mks_Storelocator.xml" hash="a6f6119398e1ac1d5d007d16f0b1a9c9"/></dir></target><target name="magecommunity"><dir name="Mks"><dir name="Storelocator"><dir name="Block"><dir name="Adminhtml"><dir name="Storelocator"><dir name="Edit"><file name="Form.php" hash="00fed13f02e804d93bac7258689769ad"/><dir name="Tab"><file name="Form.php" hash="4620d9bad225fc9dc88b808fccae3b2f"/></dir><file name="Tabs.php" hash="8819f35cd4af4b61d14bf377c58432b6"/></dir><file name="Edit.php" hash="9be35d036a69cfb545d2f1c1649cb6ba"/><file name="Grid.php" hash="c1901ceac4aec85340a9d4f2d5e9df9f"/></dir><file name="Storelocator.php" hash="81770ec5e092a177c22e188b8db38d7e"/><file name="Storelocatorbackend.php" hash="d600cb8ff797f008c7c652a299305c8d"/></dir><file name="Index.php" hash="85128403f14502fe6642a23231079532"/></dir><dir name="Helper"><file name="Data.php" hash="083521dd42bf734a864e06dceb37b5a0"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Storelocator"><file name="Collection.php" hash="183c5eeeb2ef6b444bfc08a829b93cde"/></dir><file name="Storelocator.php" hash="29d65325bd746be070275726e309afdb"/></dir><file name="Storelocator.php" hash="e91d32a733f49d62d54c1335a57e2ee5"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="StorelocatorController.php" hash="0c853bc509d0069930481f4d09e426c6"/><file name="StorelocatorbackendController.php" hash="ea616e919ef3a6492ebbfb55daf57ea1"/></dir><file name="IndexController.php" hash="2da311b739d05591f0f4355c740cb5bc"/></dir><dir name="etc"><file name="config.xml" hash="1aed48b7351a7e3dcd8924c146ac4af0"/></dir><dir name="sql"><dir name="storelocator_setup"><file name="mysql4-install-1.1.1.php" hash="6e216933bbef70d59742516037479dff"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="storelocator.xml" hash="c5ce52ab3f3f3d71dbb902134642e2dc"/></dir><dir name="template"><dir name="storelocator"><file name="storelocatorbackend.phtml" hash="c78b53b275cfeff357c7720666f77295"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="storelocator.xml" hash="db01f1e299e94c6a4d633a1d2458f343"/></dir><dir name="template"><dir name="storelocator"><file name="config.phtml" hash="0ce7cd1303320ca4f2f9d8007b0d3a6a"/><file name="index.phtml" hash="22b7f355417788b5468d99200f6dda13"/></dir></dir></dir></dir></dir></target><target name="magemedia"><dir name="storelocator"><dir name="storelocator"><file name="map1.jpg" hash="a27ada4df9c7106527e4db655c7d15ed"/><file name="map2.jpg" hash="d632084de7a0e99a8eeb4a3720be3066"/><file name="map3.jpg" hash="bd06793b455379880266505f5ea49b81"/></dir></dir></target></contents>
|
|
|
|
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|