Version Notes
Store Locator allows you to store location for dealer and retail store. user can show his store location
Download this release
Release Info
Developer | Manvendra Sharma |
Extension | Manv_storelocator |
Version | 1.1.3 |
Comparing to | |
See all releases |
Code changes from version 1.1.2 to 1.1.3
- app/code/community/Manv/Storelocator/Block/Adminhtml/Storelocator/Edit/Tab/Form.php +30 -20
- app/code/community/Manv/Storelocator/Block/Adminhtml/Storelocator/Grid.php +27 -19
- app/code/community/Manv/Storelocator/controllers/Adminhtml/StorelocatorController.php +0 -44
- app/code/community/Manv/Storelocator/controllers/IndexController.php +3 -3
- app/code/community/Manv/Storelocator/etc/config.xml +1 -1
- app/code/community/Manv/Storelocator/sql/storelocator_setup/{mysql4-install-1.1.1.php → mysql4-install-1.1.3.php} +1 -1
- app/design/adminhtml/default/default/layout/storelocator.xml +0 -5
- app/design/adminhtml/default/default/template/storelocator/storelocatorbackend.phtml +0 -13
- app/design/frontend/base/default/layout/storelocator.xml +1 -1
- app/design/frontend/base/default/template/storelocator/index.phtml +35 -22
- app/etc/modules/Manv_Storelocator.xml +1 -1
- package.xml +7 -7
app/code/community/Manv/Storelocator/Block/Adminhtml/Storelocator/Edit/Tab/Form.php
CHANGED
@@ -10,75 +10,85 @@ class Manv_Storelocator_Block_Adminhtml_Storelocator_Edit_Tab_Form extends Mage_
|
|
10 |
|
11 |
|
12 |
$fieldset->addField("name", "text", array(
|
13 |
-
"label" => Mage::helper("storelocator")->__("
|
14 |
"name" => "name",
|
15 |
));
|
16 |
|
17 |
$fieldset->addField("address", "text", array(
|
18 |
-
"label" => Mage::helper("storelocator")->__("
|
19 |
"name" => "address",
|
20 |
));
|
21 |
|
22 |
$fieldset->addField("zipcode", "text", array(
|
23 |
-
"label" => Mage::helper("storelocator")->__("
|
24 |
"name" => "zipcode",
|
25 |
));
|
26 |
|
27 |
$fieldset->addField("city", "text", array(
|
28 |
-
"label" => Mage::helper("storelocator")->__("
|
29 |
"name" => "city",
|
30 |
));
|
31 |
|
32 |
$fieldset->addField("country_id", "text", array(
|
33 |
-
"label" => Mage::helper("storelocator")->__("
|
34 |
"name" => "country_id",
|
35 |
));
|
36 |
|
37 |
$fieldset->addField("phone", "text", array(
|
38 |
-
"label" => Mage::helper("storelocator")->__("
|
39 |
"name" => "phone",
|
40 |
));
|
41 |
|
42 |
$fieldset->addField("fax", "text", array(
|
43 |
-
"label" => Mage::helper("storelocator")->__("
|
44 |
"name" => "fax",
|
45 |
));
|
46 |
|
47 |
-
$fieldset->addField("description", "
|
48 |
-
"label" => Mage::helper("storelocator")->__("
|
49 |
"name" => "description",
|
50 |
));
|
51 |
|
52 |
$fieldset->addField("store_url", "text", array(
|
53 |
-
"label" => Mage::helper("storelocator")->__("
|
54 |
"name" => "store_url",
|
55 |
));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
|
57 |
$fieldset->addField('image', 'image', array(
|
58 |
-
'label' => Mage::helper('storelocator')->__('
|
59 |
'name' => 'image',
|
60 |
'note' => '(*.jpg, *.png, *.gif)',
|
61 |
-
));
|
62 |
-
$fieldset->addField('marker', 'image', array(
|
63 |
-
'label' => Mage::helper('storelocator')->__('marker'),
|
64 |
-
'name' => 'marker',
|
65 |
-
'note' => '(*.jpg, *.png, *.gif)',
|
66 |
));
|
67 |
$fieldset->addField("lat", "text", array(
|
68 |
-
"label" => Mage::helper("storelocator")->__("
|
69 |
"name" => "lat",
|
70 |
));
|
71 |
|
72 |
$fieldset->addField("longt", "text", array(
|
73 |
-
"label" => Mage::helper("storelocator")->__("
|
74 |
"name" => "longt",
|
75 |
));
|
76 |
|
77 |
$fieldset->addField('status', 'select', array(
|
78 |
-
'label' => Mage::helper('storelocator')->__('
|
79 |
-
'values' => Manv_Storelocator_Block_Adminhtml_Storelocator_Grid::
|
80 |
'name' => 'status',
|
81 |
));
|
|
|
|
|
|
|
|
|
|
|
82 |
|
83 |
if (Mage::getSingleton("adminhtml/session")->getStorelocatorData())
|
84 |
{
|
10 |
|
11 |
|
12 |
$fieldset->addField("name", "text", array(
|
13 |
+
"label" => Mage::helper("storelocator")->__("Name"),
|
14 |
"name" => "name",
|
15 |
));
|
16 |
|
17 |
$fieldset->addField("address", "text", array(
|
18 |
+
"label" => Mage::helper("storelocator")->__("Address"),
|
19 |
"name" => "address",
|
20 |
));
|
21 |
|
22 |
$fieldset->addField("zipcode", "text", array(
|
23 |
+
"label" => Mage::helper("storelocator")->__("Zipcode"),
|
24 |
"name" => "zipcode",
|
25 |
));
|
26 |
|
27 |
$fieldset->addField("city", "text", array(
|
28 |
+
"label" => Mage::helper("storelocator")->__("City"),
|
29 |
"name" => "city",
|
30 |
));
|
31 |
|
32 |
$fieldset->addField("country_id", "text", array(
|
33 |
+
"label" => Mage::helper("storelocator")->__("Country"),
|
34 |
"name" => "country_id",
|
35 |
));
|
36 |
|
37 |
$fieldset->addField("phone", "text", array(
|
38 |
+
"label" => Mage::helper("storelocator")->__("Phone"),
|
39 |
"name" => "phone",
|
40 |
));
|
41 |
|
42 |
$fieldset->addField("fax", "text", array(
|
43 |
+
"label" => Mage::helper("storelocator")->__("Fax"),
|
44 |
"name" => "fax",
|
45 |
));
|
46 |
|
47 |
+
$fieldset->addField("description", "textarea", array(
|
48 |
+
"label" => Mage::helper("storelocator")->__("Description"),
|
49 |
"name" => "description",
|
50 |
));
|
51 |
|
52 |
$fieldset->addField("store_url", "text", array(
|
53 |
+
"label" => Mage::helper("storelocator")->__("Store_url"),
|
54 |
"name" => "store_url",
|
55 |
));
|
56 |
+
|
57 |
+
$fieldset->addField("email", "text", array(
|
58 |
+
"label" => Mage::helper("storelocator")->__("Email"),
|
59 |
+
"name" => "email",
|
60 |
+
));
|
61 |
+
|
62 |
+
$fieldset->addField("tradinghours", "text", array(
|
63 |
+
"label" => Mage::helper("storelocator")->__("Trading Hours"),
|
64 |
+
"name" => "tradinghours",
|
65 |
+
));
|
66 |
|
67 |
$fieldset->addField('image', 'image', array(
|
68 |
+
'label' => Mage::helper('storelocator')->__('Store Image'),
|
69 |
'name' => 'image',
|
70 |
'note' => '(*.jpg, *.png, *.gif)',
|
|
|
|
|
|
|
|
|
|
|
71 |
));
|
72 |
$fieldset->addField("lat", "text", array(
|
73 |
+
"label" => Mage::helper("storelocator")->__("Latitude"),
|
74 |
"name" => "lat",
|
75 |
));
|
76 |
|
77 |
$fieldset->addField("longt", "text", array(
|
78 |
+
"label" => Mage::helper("storelocator")->__("Longitude"),
|
79 |
"name" => "longt",
|
80 |
));
|
81 |
|
82 |
$fieldset->addField('status', 'select', array(
|
83 |
+
'label' => Mage::helper('storelocator')->__('Status'),
|
84 |
+
'values' => Manv_Storelocator_Block_Adminhtml_Storelocator_Grid::getValueArray15(),
|
85 |
'name' => 'status',
|
86 |
));
|
87 |
+
$fieldset->addField("radius", "text", array(
|
88 |
+
"label" => Mage::helper("storelocator")->__("Radius"),
|
89 |
+
"name" => "radius",
|
90 |
+
));
|
91 |
+
|
92 |
|
93 |
if (Mage::getSingleton("adminhtml/session")->getStorelocatorData())
|
94 |
{
|
app/code/community/Manv/Storelocator/Block/Adminhtml/Storelocator/Grid.php
CHANGED
@@ -29,56 +29,64 @@ class Manv_Storelocator_Block_Adminhtml_Storelocator_Grid extends Mage_Adminhtml
|
|
29 |
));
|
30 |
|
31 |
$this->addColumn("name", array(
|
32 |
-
"header" => Mage::helper("storelocator")->__("
|
33 |
"index" => "name",
|
34 |
));
|
35 |
$this->addColumn("address", array(
|
36 |
-
"header" => Mage::helper("storelocator")->__("
|
37 |
"index" => "address",
|
38 |
));
|
39 |
$this->addColumn("zipcode", array(
|
40 |
-
"header" => Mage::helper("storelocator")->__("
|
41 |
"index" => "zipcode",
|
42 |
));
|
43 |
$this->addColumn("city", array(
|
44 |
-
"header" => Mage::helper("storelocator")->__("
|
45 |
"index" => "city",
|
46 |
));
|
47 |
$this->addColumn("country_id", array(
|
48 |
-
"header" => Mage::helper("storelocator")->__("
|
49 |
"index" => "country_id",
|
50 |
));
|
51 |
$this->addColumn("phone", array(
|
52 |
-
"header" => Mage::helper("storelocator")->__("
|
53 |
"index" => "phone",
|
54 |
));
|
55 |
$this->addColumn("fax", array(
|
56 |
-
"header" => Mage::helper("storelocator")->__("
|
57 |
"index" => "fax",
|
58 |
));
|
59 |
-
$this->addColumn("description", array(
|
60 |
-
"header" => Mage::helper("storelocator")->__("description"),
|
61 |
-
"index" => "description",
|
62 |
-
));
|
63 |
$this->addColumn("store_url", array(
|
64 |
-
"header" => Mage::helper("storelocator")->__("
|
65 |
"index" => "store_url",
|
66 |
));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
$this->addColumn("lat", array(
|
68 |
-
"header" => Mage::helper("storelocator")->__("
|
69 |
"index" => "lat",
|
70 |
));
|
71 |
$this->addColumn("longt", array(
|
72 |
-
"header" => Mage::helper("storelocator")->__("
|
73 |
"index" => "longt",
|
74 |
));
|
75 |
$this->addColumn('status', array(
|
76 |
-
'header' => Mage::helper('storelocator')->__('
|
77 |
'index' => 'status',
|
78 |
'type' => 'options',
|
79 |
-
'options'=>Manv_Storelocator_Block_Adminhtml_Storelocator_Grid::
|
80 |
));
|
81 |
|
|
|
|
|
|
|
|
|
82 |
$this->addExportType('*/*/exportCsv', Mage::helper('sales')->__('CSV'));
|
83 |
$this->addExportType('*/*/exportExcel', Mage::helper('sales')->__('Excel'));
|
84 |
|
@@ -105,17 +113,17 @@ class Manv_Storelocator_Block_Adminhtml_Storelocator_Grid extends Mage_Adminhtml
|
|
105 |
return $this;
|
106 |
}
|
107 |
|
108 |
-
static public function
|
109 |
{
|
110 |
$data_array=array();
|
111 |
$data_array[0]='Enable';
|
112 |
$data_array[1]='Disable';
|
113 |
return($data_array);
|
114 |
}
|
115 |
-
static public function
|
116 |
{
|
117 |
$data_array=array();
|
118 |
-
foreach(Manv_Storelocator_Block_Adminhtml_Storelocator_Grid::
|
119 |
$data_array[]=array('value'=>$k,'label'=>$v);
|
120 |
}
|
121 |
return($data_array);
|
29 |
));
|
30 |
|
31 |
$this->addColumn("name", array(
|
32 |
+
"header" => Mage::helper("storelocator")->__("Name"),
|
33 |
"index" => "name",
|
34 |
));
|
35 |
$this->addColumn("address", array(
|
36 |
+
"header" => Mage::helper("storelocator")->__("Address"),
|
37 |
"index" => "address",
|
38 |
));
|
39 |
$this->addColumn("zipcode", array(
|
40 |
+
"header" => Mage::helper("storelocator")->__("Zipcode"),
|
41 |
"index" => "zipcode",
|
42 |
));
|
43 |
$this->addColumn("city", array(
|
44 |
+
"header" => Mage::helper("storelocator")->__("City"),
|
45 |
"index" => "city",
|
46 |
));
|
47 |
$this->addColumn("country_id", array(
|
48 |
+
"header" => Mage::helper("storelocator")->__("Country"),
|
49 |
"index" => "country_id",
|
50 |
));
|
51 |
$this->addColumn("phone", array(
|
52 |
+
"header" => Mage::helper("storelocator")->__("Phone"),
|
53 |
"index" => "phone",
|
54 |
));
|
55 |
$this->addColumn("fax", array(
|
56 |
+
"header" => Mage::helper("storelocator")->__("Fax"),
|
57 |
"index" => "fax",
|
58 |
));
|
|
|
|
|
|
|
|
|
59 |
$this->addColumn("store_url", array(
|
60 |
+
"header" => Mage::helper("storelocator")->__("Store_url"),
|
61 |
"index" => "store_url",
|
62 |
));
|
63 |
+
$this->addColumn("email", array(
|
64 |
+
"header" => Mage::helper("storelocator")->__("Email"),
|
65 |
+
"index" => "email",
|
66 |
+
));
|
67 |
+
$this->addColumn("tradinghours", array(
|
68 |
+
"header" => Mage::helper("storelocator")->__("Trading Hours"),
|
69 |
+
"index" => "tradinghours",
|
70 |
+
));
|
71 |
$this->addColumn("lat", array(
|
72 |
+
"header" => Mage::helper("storelocator")->__("Latitude"),
|
73 |
"index" => "lat",
|
74 |
));
|
75 |
$this->addColumn("longt", array(
|
76 |
+
"header" => Mage::helper("storelocator")->__("Longitude"),
|
77 |
"index" => "longt",
|
78 |
));
|
79 |
$this->addColumn('status', array(
|
80 |
+
'header' => Mage::helper('storelocator')->__('Status'),
|
81 |
'index' => 'status',
|
82 |
'type' => 'options',
|
83 |
+
'options'=>Manv_Storelocator_Block_Adminhtml_Storelocator_Grid::getOptionArray15(),
|
84 |
));
|
85 |
|
86 |
+
$this->addColumn("radius", array(
|
87 |
+
"header" => Mage::helper("storelocator")->__("Radius"),
|
88 |
+
"index" => "radius",
|
89 |
+
));
|
90 |
$this->addExportType('*/*/exportCsv', Mage::helper('sales')->__('CSV'));
|
91 |
$this->addExportType('*/*/exportExcel', Mage::helper('sales')->__('Excel'));
|
92 |
|
113 |
return $this;
|
114 |
}
|
115 |
|
116 |
+
static public function getOptionArray15()
|
117 |
{
|
118 |
$data_array=array();
|
119 |
$data_array[0]='Enable';
|
120 |
$data_array[1]='Disable';
|
121 |
return($data_array);
|
122 |
}
|
123 |
+
static public function getValueArray15()
|
124 |
{
|
125 |
$data_array=array();
|
126 |
+
foreach(Manv_Storelocator_Block_Adminhtml_Storelocator_Grid::getOptionArray15() as $k=>$v){
|
127 |
$data_array[]=array('value'=>$k,'label'=>$v);
|
128 |
}
|
129 |
return($data_array);
|
app/code/community/Manv/Storelocator/controllers/Adminhtml/StorelocatorController.php
CHANGED
@@ -118,50 +118,6 @@ else {
|
|
118 |
}
|
119 |
}
|
120 |
|
121 |
-
} catch (Exception $e) {
|
122 |
-
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
123 |
-
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
|
124 |
-
return;
|
125 |
-
}
|
126 |
-
//save image
|
127 |
-
|
128 |
-
//save image
|
129 |
-
try{
|
130 |
-
|
131 |
-
if((bool)$post_data['marker']['delete']==1) {
|
132 |
-
|
133 |
-
$post_data['marker']='';
|
134 |
-
|
135 |
-
}
|
136 |
-
else {
|
137 |
-
|
138 |
-
unset($post_data['marker']);
|
139 |
-
|
140 |
-
if (isset($_FILES)){
|
141 |
-
|
142 |
-
if ($_FILES['marker']['name']) {
|
143 |
-
|
144 |
-
if($this->getRequest()->getParam("id")){
|
145 |
-
$model = Mage::getModel("storelocator/storelocator")->load($this->getRequest()->getParam("id"));
|
146 |
-
if($model->getData('marker')){
|
147 |
-
$io = new Varien_Io_File();
|
148 |
-
$io->rm(Mage::getBaseDir('media').DS.implode(DS,explode('/',$model->getData('marker'))));
|
149 |
-
}
|
150 |
-
}
|
151 |
-
$path = Mage::getBaseDir('media') . DS . 'storelocator' . DS .'storelocator'.DS;
|
152 |
-
$uploader = new Varien_File_Uploader('marker');
|
153 |
-
$uploader->setAllowedExtensions(array('jpg','png','gif'));
|
154 |
-
$uploader->setAllowRenameFiles(false);
|
155 |
-
$uploader->setFilesDispersion(false);
|
156 |
-
$destFile = $path.$_FILES['marker']['name'];
|
157 |
-
$filename = $uploader->getNewFileName($destFile);
|
158 |
-
$uploader->save($path, $filename);
|
159 |
-
|
160 |
-
$post_data['marker']='storelocator/storelocator/'.$filename;
|
161 |
-
}
|
162 |
-
}
|
163 |
-
}
|
164 |
-
|
165 |
} catch (Exception $e) {
|
166 |
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
167 |
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
|
118 |
}
|
119 |
}
|
120 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
} catch (Exception $e) {
|
122 |
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
123 |
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
|
app/code/community/Manv/Storelocator/controllers/IndexController.php
CHANGED
@@ -3,7 +3,7 @@ class Manv_Storelocator_IndexController extends Mage_Core_Controller_Front_Actio
|
|
3 |
public function IndexAction() {
|
4 |
|
5 |
$this->loadLayout();
|
6 |
-
$this->getLayout()->getBlock("head")->setTitle($this->__("
|
7 |
$breadcrumbs = $this->getLayout()->getBlock("breadcrumbs");
|
8 |
$breadcrumbs->addCrumb("home", array(
|
9 |
"label" => $this->__("Home Page"),
|
@@ -12,8 +12,8 @@ class Manv_Storelocator_IndexController extends Mage_Core_Controller_Front_Actio
|
|
12 |
));
|
13 |
|
14 |
$breadcrumbs->addCrumb("storelocator", array(
|
15 |
-
"label" => $this->__("
|
16 |
-
"title" => $this->__("
|
17 |
));
|
18 |
|
19 |
$this->renderLayout();
|
3 |
public function IndexAction() {
|
4 |
|
5 |
$this->loadLayout();
|
6 |
+
$this->getLayout()->getBlock("head")->setTitle($this->__("Storelocator"));
|
7 |
$breadcrumbs = $this->getLayout()->getBlock("breadcrumbs");
|
8 |
$breadcrumbs->addCrumb("home", array(
|
9 |
"label" => $this->__("Home Page"),
|
12 |
));
|
13 |
|
14 |
$breadcrumbs->addCrumb("storelocator", array(
|
15 |
+
"label" => $this->__("Storelocator"),
|
16 |
+
"title" => $this->__("Storelocator")
|
17 |
));
|
18 |
|
19 |
$this->renderLayout();
|
app/code/community/Manv/Storelocator/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Manv_Storelocator>
|
5 |
-
<version>1.1.
|
6 |
</Manv_Storelocator>
|
7 |
</modules>
|
8 |
<frontend>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Manv_Storelocator>
|
5 |
+
<version>1.1.3</version>
|
6 |
</Manv_Storelocator>
|
7 |
</modules>
|
8 |
<frontend>
|
app/code/community/Manv/Storelocator/sql/storelocator_setup/{mysql4-install-1.1.1.php → mysql4-install-1.1.3.php}
RENAMED
@@ -2,7 +2,7 @@
|
|
2 |
$installer = $this;
|
3 |
$installer->startSetup();
|
4 |
$sql=<<<SQLTEXT
|
5 |
-
create table manvstorelocator(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),
|
6 |
|
7 |
SQLTEXT;
|
8 |
|
2 |
$installer = $this;
|
3 |
$installer->startSetup();
|
4 |
$sql=<<<SQLTEXT
|
5 |
+
create table manvstorelocator(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),email varchar(100),tradinghours varchar(100),radius varchar(100),image varchar(100),lat varchar(100),longt varchar(100),status varchar(100),primary key(id));
|
6 |
|
7 |
SQLTEXT;
|
8 |
|
app/design/adminhtml/default/default/layout/storelocator.xml
CHANGED
@@ -1,10 +1,5 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<layout version="0.1.0">
|
3 |
-
<storelocator_adminhtml_storelocatorbackend_index>
|
4 |
-
<reference name="content">
|
5 |
-
<block type="storelocator/adminhtml_storelocatorbackend" name="storelocatorbackend" template="storelocator/storelocatorbackend.phtml"/>
|
6 |
-
</reference>
|
7 |
-
</storelocator_adminhtml_storelocatorbackend_index>
|
8 |
<storelocator_adminhtml_storelocator_index>
|
9 |
<reference name="content">
|
10 |
<block type="storelocator/adminhtml_storelocator" name="storelocator" />
|
1 |
<?xml version="1.0"?>
|
2 |
<layout version="0.1.0">
|
|
|
|
|
|
|
|
|
|
|
3 |
<storelocator_adminhtml_storelocator_index>
|
4 |
<reference name="content">
|
5 |
<block type="storelocator/adminhtml_storelocator" name="storelocator" />
|
app/design/adminhtml/default/default/template/storelocator/storelocatorbackend.phtml
DELETED
@@ -1,13 +0,0 @@
|
|
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 |
-
<b>Here you can add your all store address and description with google map and many more. </b>
|
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/layout/storelocator.xml
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
-
<layout version="1.1.
|
3 |
<storelocator_index_index>
|
4 |
<reference name="root">
|
5 |
<action method="setTemplate"><template>page/1column.phtml</template></action>
|
1 |
<?xml version="1.0"?>
|
2 |
+
<layout version="1.1.3">
|
3 |
<storelocator_index_index>
|
4 |
<reference name="root">
|
5 |
<action method="setTemplate"><template>page/1column.phtml</template></action>
|
app/design/frontend/base/default/template/storelocator/index.phtml
CHANGED
@@ -5,6 +5,8 @@ $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>
|
@@ -13,32 +15,32 @@ $addressx = $row1['address'];
|
|
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
|
23 |
-
zoom:
|
|
|
24 |
center: latlngPos,
|
25 |
-
mapTypeId: google.maps.MapTypeId.ROADMAP
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
map: map
|
37 |
-
|
38 |
-
title: address
|
39 |
-
});
|
40 |
|
41 |
-
};
|
42 |
</script>
|
43 |
|
44 |
<body onload="map_xxx('<?php echo $latitudex ?>','<?php echo $longitudex; ?>','<?php echo $addressx; ?>');">
|
@@ -51,8 +53,8 @@ while($row = $sql->fetch())
|
|
51 |
{?>
|
52 |
<table id="store-table" class="store-table">
|
53 |
<tr>
|
54 |
-
<td rowspan="
|
55 |
-
<img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).$row['image']; ?>" alt="Manvendra sharma" width="
|
56 |
</td>
|
57 |
</tr>
|
58 |
<tr>
|
@@ -61,11 +63,11 @@ while($row = $sql->fetch())
|
|
61 |
</td>
|
62 |
</tr>
|
63 |
<tr>
|
64 |
-
<td class="col-address"><?php echo $row['
|
65 |
</tr>
|
66 |
<tr>
|
67 |
<?php
|
68 |
-
$add = $row['
|
69 |
?>
|
70 |
<td class="col-address"><?php echo $add; ?></td>
|
71 |
</tr>
|
@@ -78,9 +80,20 @@ $add = $row['zipcode'].$row['address'];
|
|
78 |
<tr>
|
79 |
<td> Phone :<?php echo $row['phone']; ?> </td>
|
80 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
<tr>
|
82 |
<td> Fax :<?php echo $row['fax']; ?></td>
|
83 |
</tr>
|
|
|
84 |
</table>
|
85 |
<?php } ?>
|
86 |
|
5 |
$latitudex = $row1['lat'];
|
6 |
$longitudex = $row1['longt'];
|
7 |
$addressx = $row1['address'];
|
8 |
+
$radius = $row1['radius'];
|
9 |
+
|
10 |
?>
|
11 |
|
12 |
<script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
|
15 |
|
16 |
function map_xxx(x,y,z)
|
17 |
{
|
18 |
+
var miles = 3;
|
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 map = new google.maps.Map(document.getElementById("map"), {
|
26 |
+
zoom: 14,
|
27 |
+
|
28 |
center: latlngPos,
|
29 |
+
mapTypeId: google.maps.MapTypeId.ROADMAP
|
30 |
+
});
|
31 |
+
// draw circle
|
32 |
+
|
33 |
+
var circle = new google.maps.Circle({
|
34 |
+
center: latlngPos,
|
35 |
+
radius: miles *<?php echo $radius; ?>,
|
36 |
+
fillColor: "#ff69b4",
|
37 |
+
fillOpacity: 0.2,
|
38 |
+
strokeOpacity: 0.0,
|
39 |
+
strokeWeight: 0,
|
40 |
+
map: map
|
41 |
+
});
|
|
|
|
|
42 |
|
43 |
+
} google.maps.event.addDomListener(window, 'load', initialize);
|
44 |
</script>
|
45 |
|
46 |
<body onload="map_xxx('<?php echo $latitudex ?>','<?php echo $longitudex; ?>','<?php echo $addressx; ?>');">
|
53 |
{?>
|
54 |
<table id="store-table" class="store-table">
|
55 |
<tr>
|
56 |
+
<td rowspan="10" class="store-image">
|
57 |
+
<img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).$row['image']; ?>" alt="Manvendra sharma" width="100">
|
58 |
</td>
|
59 |
</tr>
|
60 |
<tr>
|
63 |
</td>
|
64 |
</tr>
|
65 |
<tr>
|
66 |
+
<td class="col-address"><?php echo $row['address']; ?></td>
|
67 |
</tr>
|
68 |
<tr>
|
69 |
<?php
|
70 |
+
$add = $row['city']." ".$row['zipcode'];
|
71 |
?>
|
72 |
<td class="col-address"><?php echo $add; ?></td>
|
73 |
</tr>
|
80 |
<tr>
|
81 |
<td> Phone :<?php echo $row['phone']; ?> </td>
|
82 |
</tr>
|
83 |
+
<tr>
|
84 |
+
<td> Email :
|
85 |
+
<a href="mailto:<?php echo $row['email']; ?>?Subject=Store%20Location" target="_top">
|
86 |
+
<?php echo $row['email']; ?></a>
|
87 |
+
</td>
|
88 |
+
</tr>
|
89 |
+
<tr>
|
90 |
+
<td> Trading Hours :<?php echo $row['tradinghours']; ?></td>
|
91 |
+
</tr>
|
92 |
+
<?php if($row['fax'] != '') { ?>
|
93 |
<tr>
|
94 |
<td> Fax :<?php echo $row['fax']; ?></td>
|
95 |
</tr>
|
96 |
+
<?php } ?>
|
97 |
</table>
|
98 |
<?php } ?>
|
99 |
|
app/etc/modules/Manv_Storelocator.xml
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
<Manv_Storelocator>
|
5 |
<active>true</active>
|
6 |
<codePool>community</codePool>
|
7 |
-
<version>1.1.
|
8 |
</Manv_Storelocator>
|
9 |
</modules>
|
10 |
</config>
|
4 |
<Manv_Storelocator>
|
5 |
<active>true</active>
|
6 |
<codePool>community</codePool>
|
7 |
+
<version>1.1.3</version>
|
8 |
</Manv_Storelocator>
|
9 |
</modules>
|
10 |
</config>
|
package.xml
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Manv_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 |
-
<notes>
|
12 |
<authors><author><name>Manvendra Sharma</name><user>sharmamanvendra</user><email>sharmamanvendra6@gmail.com</email></author></authors>
|
13 |
-
<date>2014-01-
|
14 |
-
<time>
|
15 |
-
<contents><target name="
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Manv_storelocator</name>
|
4 |
+
<version>1.1.3</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>OSL</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
+
<summary> Store Locator allows you to store location for dealer and retail store. user can show his store location </summary>
|
10 |
+
<description> Store Locator allows you to store location for dealer and retail store. user can show his store location </description>
|
11 |
+
<notes> Store Locator allows you to store location for dealer and retail store. user can show his store location </notes>
|
12 |
<authors><author><name>Manvendra Sharma</name><user>sharmamanvendra</user><email>sharmamanvendra6@gmail.com</email></author></authors>
|
13 |
+
<date>2014-01-21</date>
|
14 |
+
<time>12:34:02</time>
|
15 |
+
<contents><target name="mageetc"><dir name="modules"><file name="Manv_Storelocator.xml" hash="947a27ad084f8fea37e49ef7cd00687d"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="storelocator"><file name="index.phtml" hash="8427a01d95402a87498bf7517514d945"/></dir></dir><dir name="layout"><file name="storelocator.xml" hash="21b00e9533ac60710e156ccfa904cbf6"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="storelocator.xml" hash="8ac2b36dff821225c86683dccabf65b7"/></dir></dir></dir></dir></target><target name="magecommunity"><dir name="Manv"><dir name="Storelocator"><dir><dir name="Block"><dir name="Adminhtml"><dir name="Storelocator"><dir name="Edit"><file name="Form.php" hash="183787af3dff1f49be0bb751b2d25ae6"/><dir name="Tab"><file name="Form.php" hash="03b036c5739cbcc2e452e4ed5886f422"/></dir><file name="Tabs.php" hash="69cab78ea0631d5248ca3a5a412846a4"/></dir><file name="Edit.php" hash="1c1812b4a0e11bc1344f7ec2b910100d"/><file name="Grid.php" hash="6d8238f9ad4c0b8ba5b2369da4d49005"/></dir><file name="Storelocator.php" hash="0a2ce63f7097ab8372707538a69842a7"/></dir><file name="Index.php" hash="e7a7da34011f86f293b3bb860613f2f4"/></dir><dir name="Helper"><file name="Data.php" hash="0b87ae1bb674b22df79067dc6c8fe2cd"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Storelocator"><file name="Collection.php" hash="63eb3eef688561558300700d61d233a9"/></dir><file name="Storelocator.php" hash="8deb77c0bcad8e84fd0363578f971be7"/></dir><file name="Storelocator.php" hash="90b7ccbfdd3ba71e832c93384c62c7e0"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="StorelocatorController.php" hash="7d9466bd31cce9a0650b82470b95bb82"/></dir><file name="IndexController.php" hash="779b79a350dcd2fa05b9331303f8ae89"/></dir><dir name="etc"><file name="config.xml" hash="13b8ab2368b3dbee5eb23d9fac882b65"/></dir><dir name="sql"><dir name="storelocator_setup"><file name="mysql4-install-1.1.3.php" hash="02ecb2f33c58b3e396625b2266b269fa"/></dir></dir></dir></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>
|