Version Notes
Store Locator extension allows you to show store location. Store locator increses tour sales. Store locator.
Download this release
Release Info
Developer | Manvendra Sharma |
Extension | Manv_storelocator |
Version | 1.1.5 |
Comparing to | |
See all releases |
Code changes from version 1.1.4 to 1.1.5
- app/code/community/Manv/Storelocator/Block/Adminhtml/Storelocator/Edit/Tab/Form.php +18 -10
- app/code/community/Manv/Storelocator/Block/Adminhtml/Storelocator/Grid.php +7 -11
- app/code/community/Manv/Storelocator/Block/Adminhtml/Storelocatorbackend.php +5 -0
- app/code/community/Manv/Storelocator/Block/Index.php +53 -1
- app/code/community/Manv/Storelocator/controllers/Adminhtml/StorelocatorbackendController.php +10 -0
- app/code/community/Manv/Storelocator/controllers/IndexController.php +4 -4
- app/code/community/Manv/Storelocator/etc/adminhtml.xml +23 -0
- app/code/community/Manv/Storelocator/etc/config.xml +5 -1
- app/code/community/Manv/Storelocator/etc/system.xml +160 -0
- app/code/community/Manv/Storelocator/sql/storelocator_setup/mysql4-install-1.1.3.php +0 -18
- app/code/community/Manv/Storelocator/sql/storelocator_setup/mysql4-install-1.1.5.php +21 -0
- app/design/adminhtml/default/default/layout/storelocator.xml +5 -0
- app/design/frontend/base/default/layout/storelocator.xml +1 -1
- app/design/frontend/base/default/template/storelocator/config.phtml +51 -0
- app/design/frontend/base/default/template/storelocator/copy index.phtml +162 -0
- app/design/frontend/base/default/template/storelocator/index.phtml +57 -83
- app/etc/modules/Manv_Storelocator.xml +1 -1
- media/storelocator/storelocator/14948.jpg +0 -0
- media/storelocator/storelocator/map1.jpg +0 -0
- media/storelocator/storelocator/map2.jpg +0 -0
- media/storelocator/storelocator/map3.jpg +0 -0
- package.xml +4 -4
app/code/community/Manv/Storelocator/Block/Adminhtml/Storelocator/Edit/Tab/Form.php
CHANGED
@@ -10,11 +10,13 @@ class Manv_Storelocator_Block_Adminhtml_Storelocator_Edit_Tab_Form extends Mage_
|
|
10 |
|
11 |
|
12 |
$fieldset->addField("name", "text", array(
|
13 |
-
"label" => Mage::helper("storelocator")->__("Name"),
|
|
|
|
|
14 |
"name" => "name",
|
15 |
));
|
16 |
|
17 |
-
$fieldset->addField("address", "
|
18 |
"label" => Mage::helper("storelocator")->__("Address"),
|
19 |
"name" => "address",
|
20 |
));
|
@@ -50,7 +52,7 @@ class Manv_Storelocator_Block_Adminhtml_Storelocator_Edit_Tab_Form extends Mage_
|
|
50 |
));
|
51 |
|
52 |
$fieldset->addField("store_url", "text", array(
|
53 |
-
"label" => Mage::helper("storelocator")->__("
|
54 |
"name" => "store_url",
|
55 |
));
|
56 |
|
@@ -63,6 +65,13 @@ class Manv_Storelocator_Block_Adminhtml_Storelocator_Edit_Tab_Form extends Mage_
|
|
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'),
|
@@ -70,12 +79,16 @@ class Manv_Storelocator_Block_Adminhtml_Storelocator_Edit_Tab_Form extends Mage_
|
|
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 |
|
@@ -84,11 +97,6 @@ class Manv_Storelocator_Block_Adminhtml_Storelocator_Edit_Tab_Form extends Mage_
|
|
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 |
{
|
10 |
|
11 |
|
12 |
$fieldset->addField("name", "text", array(
|
13 |
+
"label" => Mage::helper("storelocator")->__("Name"),
|
14 |
+
"class" => "required-entry",
|
15 |
+
"required" => true,
|
16 |
"name" => "name",
|
17 |
));
|
18 |
|
19 |
+
$fieldset->addField("address", "textarea", array(
|
20 |
"label" => Mage::helper("storelocator")->__("Address"),
|
21 |
"name" => "address",
|
22 |
));
|
52 |
));
|
53 |
|
54 |
$fieldset->addField("store_url", "text", array(
|
55 |
+
"label" => Mage::helper("storelocator")->__("Store Url"),
|
56 |
"name" => "store_url",
|
57 |
));
|
58 |
|
65 |
"label" => Mage::helper("storelocator")->__("Trading Hours"),
|
66 |
"name" => "tradinghours",
|
67 |
));
|
68 |
+
|
69 |
+
$fieldset->addField("radius", "text", array(
|
70 |
+
"label" => Mage::helper("storelocator")->__("Radius"),
|
71 |
+
"class" => "required-entry",
|
72 |
+
"required" => true,
|
73 |
+
"name" => "radius",
|
74 |
+
));
|
75 |
|
76 |
$fieldset->addField('image', 'image', array(
|
77 |
'label' => Mage::helper('storelocator')->__('Store Image'),
|
79 |
'note' => '(*.jpg, *.png, *.gif)',
|
80 |
));
|
81 |
$fieldset->addField("lat", "text", array(
|
82 |
+
"label" => Mage::helper("storelocator")->__("Latitude"),
|
83 |
+
"class" => "required-entry",
|
84 |
+
"required" => true,
|
85 |
"name" => "lat",
|
86 |
));
|
87 |
|
88 |
$fieldset->addField("longt", "text", array(
|
89 |
+
"label" => Mage::helper("storelocator")->__("Longitude"),
|
90 |
+
"class" => "required-entry",
|
91 |
+
"required" => true,
|
92 |
"name" => "longt",
|
93 |
));
|
94 |
|
97 |
'values' => Manv_Storelocator_Block_Adminhtml_Storelocator_Grid::getValueArray15(),
|
98 |
'name' => 'status',
|
99 |
));
|
|
|
|
|
|
|
|
|
|
|
100 |
|
101 |
if (Mage::getSingleton("adminhtml/session")->getStorelocatorData())
|
102 |
{
|
app/code/community/Manv/Storelocator/Block/Adminhtml/Storelocator/Grid.php
CHANGED
@@ -8,7 +8,7 @@ class Manv_Storelocator_Block_Adminhtml_Storelocator_Grid extends Mage_Adminhtml
|
|
8 |
parent::__construct();
|
9 |
$this->setId("storelocatorGrid");
|
10 |
$this->setDefaultSort("id");
|
11 |
-
$this->setDefaultDir("
|
12 |
$this->setSaveParametersInSession(true);
|
13 |
}
|
14 |
|
@@ -32,10 +32,6 @@ class Manv_Storelocator_Block_Adminhtml_Storelocator_Grid extends Mage_Adminhtml
|
|
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",
|
@@ -57,7 +53,7 @@ class Manv_Storelocator_Block_Adminhtml_Storelocator_Grid extends Mage_Adminhtml
|
|
57 |
"index" => "fax",
|
58 |
));
|
59 |
$this->addColumn("store_url", array(
|
60 |
-
"header" => Mage::helper("storelocator")->__("
|
61 |
"index" => "store_url",
|
62 |
));
|
63 |
$this->addColumn("email", array(
|
@@ -68,6 +64,10 @@ class Manv_Storelocator_Block_Adminhtml_Storelocator_Grid extends Mage_Adminhtml
|
|
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",
|
@@ -83,10 +83,6 @@ class Manv_Storelocator_Block_Adminhtml_Storelocator_Grid extends Mage_Adminhtml
|
|
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 |
|
@@ -117,7 +113,7 @@ class Manv_Storelocator_Block_Adminhtml_Storelocator_Grid extends Mage_Adminhtml
|
|
117 |
{
|
118 |
$data_array=array();
|
119 |
$data_array[0]='Enable';
|
120 |
-
$data_array[1]='
|
121 |
return($data_array);
|
122 |
}
|
123 |
static public function getValueArray15()
|
8 |
parent::__construct();
|
9 |
$this->setId("storelocatorGrid");
|
10 |
$this->setDefaultSort("id");
|
11 |
+
$this->setDefaultDir("DESC");
|
12 |
$this->setSaveParametersInSession(true);
|
13 |
}
|
14 |
|
32 |
"header" => Mage::helper("storelocator")->__("Name"),
|
33 |
"index" => "name",
|
34 |
));
|
|
|
|
|
|
|
|
|
35 |
$this->addColumn("zipcode", array(
|
36 |
"header" => Mage::helper("storelocator")->__("Zipcode"),
|
37 |
"index" => "zipcode",
|
53 |
"index" => "fax",
|
54 |
));
|
55 |
$this->addColumn("store_url", array(
|
56 |
+
"header" => Mage::helper("storelocator")->__("Store Url"),
|
57 |
"index" => "store_url",
|
58 |
));
|
59 |
$this->addColumn("email", array(
|
64 |
"header" => Mage::helper("storelocator")->__("Trading Hours"),
|
65 |
"index" => "tradinghours",
|
66 |
));
|
67 |
+
$this->addColumn("radius", array(
|
68 |
+
"header" => Mage::helper("storelocator")->__("Radius"),
|
69 |
+
"index" => "radius",
|
70 |
+
));
|
71 |
$this->addColumn("lat", array(
|
72 |
"header" => Mage::helper("storelocator")->__("Latitude"),
|
73 |
"index" => "lat",
|
83 |
'options'=>Manv_Storelocator_Block_Adminhtml_Storelocator_Grid::getOptionArray15(),
|
84 |
));
|
85 |
|
|
|
|
|
|
|
|
|
86 |
$this->addExportType('*/*/exportCsv', Mage::helper('sales')->__('CSV'));
|
87 |
$this->addExportType('*/*/exportExcel', Mage::helper('sales')->__('Excel'));
|
88 |
|
113 |
{
|
114 |
$data_array=array();
|
115 |
$data_array[0]='Enable';
|
116 |
+
$data_array[1]='Disasble';
|
117 |
return($data_array);
|
118 |
}
|
119 |
static public function getValueArray15()
|
app/code/community/Manv/Storelocator/Block/Adminhtml/Storelocatorbackend.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Manv_Storelocator_Block_Adminhtml_Storelocatorbackend extends Mage_Adminhtml_Block_Template {
|
4 |
+
|
5 |
+
}
|
app/code/community/Manv/Storelocator/Block/Index.php
CHANGED
@@ -2,7 +2,59 @@
|
|
2 |
class Manv_Storelocator_Block_Index extends Mage_Core_Block_Template{
|
3 |
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
|
7 |
|
8 |
-
}
|
2 |
class Manv_Storelocator_Block_Index extends Mage_Core_Block_Template{
|
3 |
|
4 |
|
5 |
+
public function getStorelocatorEnabled()
|
6 |
+
{
|
7 |
+
return Mage::getStoreConfig('storelocatorcode/storeloactorsetting/enable',Mage::app()->getStore());
|
8 |
+
}
|
9 |
+
public function getStorelocatorName()
|
10 |
+
{
|
11 |
+
return Mage::getStoreConfig('storelocatorcode/storeloactorfields/name',Mage::app()->getStore());
|
12 |
+
}
|
13 |
+
public function getStorelocatorAddress()
|
14 |
+
{
|
15 |
+
return Mage::getStoreConfig('storelocatorcode/storeloactorfields/address',Mage::app()->getStore());
|
16 |
+
}
|
17 |
+
public function getStorelocatorZipcode()
|
18 |
+
{
|
19 |
+
return Mage::getStoreConfig('storelocatorcode/storeloactorfields/zipcode',Mage::app()->getStore());
|
20 |
+
}
|
21 |
+
public function getStorelocatorCity()
|
22 |
+
{
|
23 |
+
return Mage::getStoreConfig('storelocatorcode/storeloactorfields/city',Mage::app()->getStore());
|
24 |
+
}
|
25 |
+
public function getStorelocatorCountry()
|
26 |
+
{
|
27 |
+
return Mage::getStoreConfig('storelocatorcode/storeloactorfields/Country',Mage::app()->getStore());
|
28 |
+
}
|
29 |
+
public function getStorelocatorPhone()
|
30 |
+
{
|
31 |
+
return Mage::getStoreConfig('storelocatorcode/storeloactorfields/phone',Mage::app()->getStore());
|
32 |
+
}
|
33 |
+
public function getStorelocatorFax()
|
34 |
+
{
|
35 |
+
return Mage::getStoreConfig('storelocatorcode/storeloactorfields/fax',Mage::app()->getStore());
|
36 |
+
}
|
37 |
+
public function getStorelocatorDescription()
|
38 |
+
{
|
39 |
+
return Mage::getStoreConfig('storelocatorcode/storeloactorfields/description',Mage::app()->getStore());
|
40 |
+
}
|
41 |
+
public function getStorelocatorStoreurl()
|
42 |
+
{
|
43 |
+
return Mage::getStoreConfig('storelocatorcode/storeloactorfields/storeurl',Mage::app()->getStore());
|
44 |
+
}
|
45 |
+
public function getStorelocatorEmail()
|
46 |
+
{
|
47 |
+
return Mage::getStoreConfig('storelocatorcode/storeloactorfields/email',Mage::app()->getStore());
|
48 |
+
}
|
49 |
+
public function getStorelocatorTradinghours()
|
50 |
+
{
|
51 |
+
return Mage::getStoreConfig('storelocatorcode/storeloactorfields/tradinghours',Mage::app()->getStore());
|
52 |
+
}
|
53 |
+
public function getStorelocatorImage()
|
54 |
+
{
|
55 |
+
return Mage::getStoreConfig('storelocatorcode/storeloactorfields/image',Mage::app()->getStore());
|
56 |
+
}
|
57 |
|
58 |
|
59 |
|
60 |
+
}
|
app/code/community/Manv/Storelocator/controllers/Adminhtml/StorelocatorbackendController.php
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Manv_Storelocator_Adminhtml_StorelocatorbackendController extends Mage_Adminhtml_Controller_Action
|
3 |
+
{
|
4 |
+
public function indexAction()
|
5 |
+
{
|
6 |
+
$this->loadLayout();
|
7 |
+
$this->_title($this->__("About Us"));
|
8 |
+
$this->renderLayout();
|
9 |
+
}
|
10 |
+
}
|
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"),
|
@@ -11,9 +11,9 @@ class Manv_Storelocator_IndexController extends Mage_Core_Controller_Front_Actio
|
|
11 |
"link" => Mage::getBaseUrl()
|
12 |
));
|
13 |
|
14 |
-
$breadcrumbs->addCrumb("
|
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->__("Store locator"));
|
7 |
$breadcrumbs = $this->getLayout()->getBlock("breadcrumbs");
|
8 |
$breadcrumbs->addCrumb("home", array(
|
9 |
"label" => $this->__("Home Page"),
|
11 |
"link" => Mage::getBaseUrl()
|
12 |
));
|
13 |
|
14 |
+
$breadcrumbs->addCrumb("store locator", array(
|
15 |
+
"label" => $this->__("Store locator"),
|
16 |
+
"title" => $this->__("Store locator")
|
17 |
));
|
18 |
|
19 |
$this->renderLayout();
|
app/code/community/Manv/Storelocator/etc/adminhtml.xml
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<acl>
|
4 |
+
<resources>
|
5 |
+
<admin>
|
6 |
+
<children>
|
7 |
+
<system>
|
8 |
+
<children>
|
9 |
+
<config>
|
10 |
+
<children>
|
11 |
+
<storelocatorcode translate="title" module="storelocator">
|
12 |
+
<title>General Setting Section</title>
|
13 |
+
<sort_order>0</sort_order>
|
14 |
+
</storelocatorcode>
|
15 |
+
</children>
|
16 |
+
</config>
|
17 |
+
</children>
|
18 |
+
</system>
|
19 |
+
</children>
|
20 |
+
</admin>
|
21 |
+
</resources>
|
22 |
+
</acl>
|
23 |
+
</config>
|
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>
|
@@ -86,6 +86,7 @@
|
|
86 |
<title>Storelocator</title>
|
87 |
<sort_order>100</sort_order>
|
88 |
<children>
|
|
|
89 |
<storelocator module="storelocator">
|
90 |
<title>Manage Storelocator</title>
|
91 |
<sort_order>0</sort_order>
|
@@ -105,6 +106,9 @@
|
|
105 |
<title>Storelocator</title>
|
106 |
<sort_order>1000</sort_order>
|
107 |
<children>
|
|
|
|
|
|
|
108 |
<storelocator translate="title">
|
109 |
<title>Manage Storelocator</title>
|
110 |
<sort_order>0</sort_order>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Manv_Storelocator>
|
5 |
+
<version>1.1.5</version>
|
6 |
</Manv_Storelocator>
|
7 |
</modules>
|
8 |
<frontend>
|
86 |
<title>Storelocator</title>
|
87 |
<sort_order>100</sort_order>
|
88 |
<children>
|
89 |
+
|
90 |
<storelocator module="storelocator">
|
91 |
<title>Manage Storelocator</title>
|
92 |
<sort_order>0</sort_order>
|
106 |
<title>Storelocator</title>
|
107 |
<sort_order>1000</sort_order>
|
108 |
<children>
|
109 |
+
<storelocatorbackend translate="title">
|
110 |
+
<title>About Us</title>
|
111 |
+
</storelocatorbackend>
|
112 |
<storelocator translate="title">
|
113 |
<title>Manage Storelocator</title>
|
114 |
<sort_order>0</sort_order>
|
app/code/community/Manv/Storelocator/etc/system.xml
ADDED
@@ -0,0 +1,160 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<tabs>
|
4 |
+
<storeloactortab translate="label" module="storelocator">
|
5 |
+
<label>Manv StoreLocator</label>
|
6 |
+
<sort_order>0</sort_order>
|
7 |
+
</storeloactortab>
|
8 |
+
</tabs>
|
9 |
+
<sections>
|
10 |
+
<storelocatorcode translate="label" module="storelocator">
|
11 |
+
<label>General Setting</label>
|
12 |
+
<tab>storeloactortab</tab>
|
13 |
+
<frontend_type>text</frontend_type>
|
14 |
+
<sort_order>0</sort_order>
|
15 |
+
<show_in_default>1</show_in_default>
|
16 |
+
<show_in_website>1</show_in_website>
|
17 |
+
<show_in_store>1</show_in_store>
|
18 |
+
<groups>
|
19 |
+
<storeloactorfields translate="label">
|
20 |
+
<label>Frontend end Fileds to show</label>
|
21 |
+
<frontend_type>text</frontend_type>
|
22 |
+
<sort_order>1</sort_order>
|
23 |
+
<show_in_default>1</show_in_default>
|
24 |
+
<show_in_website>1</show_in_website>
|
25 |
+
<show_in_store>1</show_in_store>
|
26 |
+
<fields>
|
27 |
+
<name translate="label">
|
28 |
+
<label>Name</label>
|
29 |
+
<frontend_type>select</frontend_type>
|
30 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
31 |
+
<fieldtestfield>1</fieldtestfield>
|
32 |
+
<sort_order>0</sort_order>
|
33 |
+
<show_in_default>1</show_in_default>
|
34 |
+
<show_in_website>1</show_in_website>
|
35 |
+
<show_in_store>1</show_in_store>
|
36 |
+
</name>
|
37 |
+
<address translate="label">
|
38 |
+
<label>Address</label>
|
39 |
+
<frontend_type>select</frontend_type>
|
40 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
41 |
+
<sort_order>1</sort_order>
|
42 |
+
<show_in_default>1</show_in_default>
|
43 |
+
<show_in_website>1</show_in_website>
|
44 |
+
<show_in_store>1</show_in_store>
|
45 |
+
</address>
|
46 |
+
<zipcode translate="label">
|
47 |
+
<label>Zipcode</label>
|
48 |
+
<frontend_type>select</frontend_type>
|
49 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
50 |
+
<sort_order>2</sort_order>
|
51 |
+
<show_in_default>1</show_in_default>
|
52 |
+
<show_in_website>1</show_in_website>
|
53 |
+
<show_in_store>1</show_in_store>
|
54 |
+
</zipcode>
|
55 |
+
<city translate="label">
|
56 |
+
<label>City</label>
|
57 |
+
<frontend_type>select</frontend_type>
|
58 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
59 |
+
<sort_order>3</sort_order>
|
60 |
+
<show_in_default>1</show_in_default>
|
61 |
+
<show_in_website>1</show_in_website>
|
62 |
+
<show_in_store>1</show_in_store>
|
63 |
+
</city>
|
64 |
+
<country translate="label">
|
65 |
+
<label>Country</label>
|
66 |
+
<frontend_type>select</frontend_type>
|
67 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
68 |
+
<sort_order>4</sort_order>
|
69 |
+
<show_in_default>1</show_in_default>
|
70 |
+
<show_in_website>1</show_in_website>
|
71 |
+
<show_in_store>1</show_in_store>
|
72 |
+
</country>
|
73 |
+
<phone translate="label">
|
74 |
+
<label>Phone</label>
|
75 |
+
<frontend_type>select</frontend_type>
|
76 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
77 |
+
<sort_order>5</sort_order>
|
78 |
+
<show_in_default>1</show_in_default>
|
79 |
+
<show_in_website>1</show_in_website>
|
80 |
+
<show_in_store>1</show_in_store>
|
81 |
+
</phone>
|
82 |
+
<fax translate="label">
|
83 |
+
<label>Fax</label>
|
84 |
+
<frontend_type>select</frontend_type>
|
85 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
86 |
+
<sort_order>6</sort_order>
|
87 |
+
<show_in_default>1</show_in_default>
|
88 |
+
<show_in_website>1</show_in_website>
|
89 |
+
<show_in_store>1</show_in_store>
|
90 |
+
</fax>
|
91 |
+
<description translate="label">
|
92 |
+
<label>Description</label>
|
93 |
+
<frontend_type>select</frontend_type>
|
94 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
95 |
+
<sort_order>7</sort_order>
|
96 |
+
<show_in_default>1</show_in_default>
|
97 |
+
<show_in_website>1</show_in_website>
|
98 |
+
<show_in_store>1</show_in_store>
|
99 |
+
</description>
|
100 |
+
<storeurl translate="label">
|
101 |
+
<label>Store URL</label>
|
102 |
+
<frontend_type>select</frontend_type>
|
103 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
104 |
+
<sort_order>8</sort_order>
|
105 |
+
<show_in_default>1</show_in_default>
|
106 |
+
<show_in_website>1</show_in_website>
|
107 |
+
<show_in_store>1</show_in_store>
|
108 |
+
</storeurl>
|
109 |
+
<email translate="label">
|
110 |
+
<label>Email</label>
|
111 |
+
<frontend_type>select</frontend_type>
|
112 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
113 |
+
<sort_order>9</sort_order>
|
114 |
+
<show_in_default>1</show_in_default>
|
115 |
+
<show_in_website>1</show_in_website>
|
116 |
+
<show_in_store>1</show_in_store>
|
117 |
+
</email>
|
118 |
+
<tradinghours translate="label">
|
119 |
+
<label>Trading Hours</label>
|
120 |
+
<frontend_type>select</frontend_type>
|
121 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
122 |
+
<sort_order>10</sort_order>
|
123 |
+
<show_in_default>1</show_in_default>
|
124 |
+
<show_in_website>1</show_in_website>
|
125 |
+
<show_in_store>1</show_in_store>
|
126 |
+
</tradinghours>
|
127 |
+
<image translate="label">
|
128 |
+
<label>Image</label>
|
129 |
+
<frontend_type>select</frontend_type>
|
130 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
131 |
+
<sort_order>11</sort_order>
|
132 |
+
<show_in_default>1</show_in_default>
|
133 |
+
<show_in_website>1</show_in_website>
|
134 |
+
<show_in_store>1</show_in_store>
|
135 |
+
</image>
|
136 |
+
</fields>
|
137 |
+
</storeloactorfields>
|
138 |
+
<storeloactorsetting translate="label">
|
139 |
+
<label>Setting </label>
|
140 |
+
<frontend_type>text</frontend_type>
|
141 |
+
<sort_order>0</sort_order>
|
142 |
+
<show_in_default>1</show_in_default>
|
143 |
+
<show_in_website>1</show_in_website>
|
144 |
+
<show_in_store>1</show_in_store>
|
145 |
+
<fields>
|
146 |
+
<enable translate="label">
|
147 |
+
<label>Staus</label>
|
148 |
+
<frontend_type>select</frontend_type>
|
149 |
+
<source_model>adminhtml/system_config_source_enabledisable</source_model>
|
150 |
+
<sort_order>0</sort_order>
|
151 |
+
<show_in_default>1</show_in_default>
|
152 |
+
<show_in_website>1</show_in_website>
|
153 |
+
<show_in_store>1</show_in_store>
|
154 |
+
</enable>
|
155 |
+
</fields>
|
156 |
+
</storeloactorsetting>
|
157 |
+
</groups>
|
158 |
+
</storelocatorcode>
|
159 |
+
</sections>
|
160 |
+
</config>
|
app/code/community/Manv/Storelocator/sql/storelocator_setup/mysql4-install-1.1.3.php
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
$installer = $this;
|
3 |
-
$installer->startSetup();
|
4 |
-
$sql=<<<SQLTEXT
|
5 |
-
create table {$this->getTable('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 |
-
INSERT INTO {$this->getTable('manvstorelocator')} (`name`, `address`, `zipcode`, `city`, `country_id`, `phone`, `fax`, `description`, `store_url`, `email`, `tradinghours`, `radius`, `image`, `lat`, `longt`, `status`) VALUES ('Jaipur Store', 'Jaipur', '302018', 'Jaipur', 'India', '7792047479', NULL, 'Jaipur Store', 'http://www.magentocommerce.com/magento-connect/developer/sharmamanvendra', 'sharmamanvendra6@gmail.com', '7:00 To 8:00PM', '306', 'storelocator/storelocator/14948.jpg', '26.849542700000000000', '75.819621099999950000', '0');
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
SQLTEXT;
|
12 |
-
|
13 |
-
$installer->run($sql);
|
14 |
-
//demo
|
15 |
-
Mage::getModel('core/url_rewrite')->setId(null);
|
16 |
-
//demo
|
17 |
-
$installer->endSetup();
|
18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Manv/Storelocator/sql/storelocator_setup/mysql4-install-1.1.5.php
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$installer = $this;
|
3 |
+
$installer->startSetup();
|
4 |
+
$sql=<<<SQLTEXT
|
5 |
+
create table {$this->getTable('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 |
+
INSERT INTO {$this->getTable('manvstorelocator')} (`name`, `address`, `zipcode`, `city`, `country_id`, `phone`, `fax`, `description`, `store_url`, `image`, `tradinghours`, `radius`, `lat`, `longt`, `status`) VALUES
|
7 |
+
('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','7:00 To 8:00PM', '200','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','7:00 To 8:00PM', '200','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','7:00 To 8:00PM', '250','40.714352800000000000','-74.005973100000000000','0'),
|
10 |
+
('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','7:00 To 8:00PM', '200','26.857126400000000000','75.812719900000050000','0');
|
11 |
+
|
12 |
+
|
13 |
+
|
14 |
+
SQLTEXT;
|
15 |
+
|
16 |
+
$installer->run($sql);
|
17 |
+
//demo
|
18 |
+
//Mage::getModel('core/url_rewrite')->setId(null);
|
19 |
+
//demo
|
20 |
+
$installer->endSetup();
|
21 |
+
|
app/design/adminhtml/default/default/layout/storelocator.xml
CHANGED
@@ -1,5 +1,10 @@
|
|
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" />
|
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" />
|
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.5">
|
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/config.phtml
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$prefix = Mage::getConfig()->getTablePrefix();
|
3 |
+
$connection = Mage::getSingleton('core/resource')->getConnection('core_write');
|
4 |
+
$prefix = Mage::getConfig()->getTablePrefix();
|
5 |
+
$tblname=$prefix.'manvstorelocator';
|
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 |
+
$radius = $row1['radius'];
|
12 |
+
|
13 |
+
?>
|
14 |
+
|
15 |
+
<script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
|
16 |
+
<script src="https://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>
|
17 |
+
<script type="text/javascript">
|
18 |
+
|
19 |
+
function map_xxx(x,y,z,a)
|
20 |
+
{
|
21 |
+
|
22 |
+
var miles = 3;
|
23 |
+
var latitude = x; // parseFloat("26.850883100000000000");
|
24 |
+
var longitude = y; // parseFloat("75.824783600000040000");
|
25 |
+
var address = z; // "Rohini, New Delhi, Delhi, India";
|
26 |
+
var radius = a; // "Rohini, New Delhi, Delhi, India";
|
27 |
+
|
28 |
+
var latlngPos = new google.maps.LatLng(latitude,longitude);
|
29 |
+
|
30 |
+
// Set up options for the Google map
|
31 |
+
var map = new google.maps.Map(document.getElementById("map"), {
|
32 |
+
zoom: 14,
|
33 |
+
|
34 |
+
center: latlngPos,
|
35 |
+
mapTypeId: google.maps.MapTypeId.ROADMAP
|
36 |
+
});
|
37 |
+
// draw circle
|
38 |
+
|
39 |
+
var circle = new google.maps.Circle({
|
40 |
+
center: latlngPos,
|
41 |
+
radius: miles *radius,
|
42 |
+
fillColor: "#ff69b4",
|
43 |
+
fillOpacity: 0.2,
|
44 |
+
strokeOpacity: 0.0,
|
45 |
+
strokeWeight: 0,
|
46 |
+
map: map
|
47 |
+
});
|
48 |
+
|
49 |
+
} google.maps.event.addDomListener(window, 'load', initialize);
|
50 |
+
</script>
|
51 |
+
|
app/design/frontend/base/default/template/storelocator/copy index.phtml
ADDED
@@ -0,0 +1,162 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Store locator
|
2 |
+
|
3 |
+
<?php echo $enable=$this->getStorelocatorEnabled(); ?>
|
4 |
+
|
5 |
+
<?php echo $name=$this->getStorelocatorName(); ?>
|
6 |
+
<?php echo $address=$this->getStorelocatorAddress(); ?>
|
7 |
+
<?php echo $zipcode=$this->getStorelocatorZipcode(); ?>
|
8 |
+
<?php echo $city=$this->getStorelocatorCity(); ?>
|
9 |
+
<?php echo $country=$this->getStorelocatorCountry(); ?>
|
10 |
+
<?php echo $phone=$this->getStorelocatorPhone(); ?>
|
11 |
+
<?php echo $fax=$this->getStorelocatorFax(); ?>
|
12 |
+
<?php echo $description=$this->getStorelocatorDescription(); ?>
|
13 |
+
<?php echo $email=$this->getStorelocatorEmail(); ?>
|
14 |
+
<?php echo $tradinghours=$this->getStorelocatorTradinghours(); ?>
|
15 |
+
<?php echo $image=$this->getStorelocatorImage(); ?>
|
16 |
+
<?php echo $stireurl=$this->getStorelocatorStoreurl(); ?>
|
17 |
+
|
18 |
+
|
19 |
+
<?php $enable=$this->getStorelocatorEnabled(); ?>
|
20 |
+
<?php $name=$this->getStorelocatorName(); ?>
|
21 |
+
<?php $address=$this->getStorelocatorAddress(); ?>
|
22 |
+
<?php $zipcode=$this->getStorelocatorZipcode(); ?>
|
23 |
+
<?php $city=$this->getStorelocatorCity(); ?>
|
24 |
+
<?php $country=$this->getStorelocatorCountry(); ?>
|
25 |
+
<?php $phone=$this->getStorelocatorPhone(); ?>
|
26 |
+
<?php $fax=$this->getStorelocatorFax(); ?>
|
27 |
+
<?php $description=$this->getStorelocatorDescription(); ?>
|
28 |
+
<?php $email=$this->getStorelocatorEmail(); ?>
|
29 |
+
<?php $tradinghours=$this->getStorelocatorTradinghours(); ?>
|
30 |
+
<?php $image=$this->getStorelocatorImage(); ?>
|
31 |
+
<?php $stireurl=$this->getStorelocatorStoreurl(); ?>
|
32 |
+
|
33 |
+
|
34 |
+
|
35 |
+
|
36 |
+
<?php
|
37 |
+
$connection = Mage::getSingleton('core/resource')->getConnection('core_write');
|
38 |
+
$sql1 = $connection->query("select * from manvstorelocator order by id limit 1" );
|
39 |
+
$row1 = $sql1->fetch();
|
40 |
+
$latitudex = $row1['lat'];
|
41 |
+
$longitudex = $row1['longt'];
|
42 |
+
$addressx = $row1['address'];
|
43 |
+
$radius = $row1['radius'];
|
44 |
+
|
45 |
+
?>
|
46 |
+
|
47 |
+
<script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
|
48 |
+
<script src="https://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>
|
49 |
+
<script type="text/javascript">
|
50 |
+
|
51 |
+
function map_xxx(x,y,z,r)
|
52 |
+
{
|
53 |
+
|
54 |
+
var miles = 3;
|
55 |
+
var latitude = x; // parseFloat("26.850883100000000000");
|
56 |
+
var longitude = y; // parseFloat("75.824783600000040000");
|
57 |
+
var address = z; // "Rohini, New Delhi, Delhi, India";
|
58 |
+
var radius = r; // "Rohini, New Delhi, Delhi, India";
|
59 |
+
|
60 |
+
var latlngPos = new google.maps.LatLng(latitude,longitude);
|
61 |
+
|
62 |
+
// Set up options for the Google map
|
63 |
+
var map = new google.maps.Map(document.getElementById("map"), {
|
64 |
+
zoom: 14,
|
65 |
+
|
66 |
+
center: latlngPos,
|
67 |
+
mapTypeId: google.maps.MapTypeId.ROADMAP
|
68 |
+
});
|
69 |
+
// draw circle
|
70 |
+
|
71 |
+
var circle = new google.maps.Circle({
|
72 |
+
center: latlngPos,
|
73 |
+
radius: miles *radius,
|
74 |
+
fillColor: "#ff69b4",
|
75 |
+
fillOpacity: 0.2,
|
76 |
+
strokeOpacity: 0.0,
|
77 |
+
strokeWeight: 0,
|
78 |
+
map: map
|
79 |
+
});
|
80 |
+
|
81 |
+
} google.maps.event.addDomListener(window, 'load', initialize);
|
82 |
+
</script>
|
83 |
+
|
84 |
+
<body onload="map_xxx('<?php echo $latitudex ?>','<?php echo $longitudex; ?>','<?php echo $addressx; ?>','<?php echo $radius; ?>');">
|
85 |
+
|
86 |
+
<table id="map_xxx" style="width:900px; border:10px;">
|
87 |
+
<tr><td style="width:400px;">
|
88 |
+
<?php
|
89 |
+
$sql = $connection->query("select * from manvstorelocator" );
|
90 |
+
while($row = $sql->fetch())
|
91 |
+
{?>
|
92 |
+
<table id="store-table" class="store-table">
|
93 |
+
<?php if($image==1) { ?>
|
94 |
+
<tr>
|
95 |
+
<td rowspan="10" class="store-image">
|
96 |
+
<img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).$row['image']; ?>" width="100">
|
97 |
+
</td>
|
98 |
+
</tr>
|
99 |
+
<?php } ?>
|
100 |
+
<?php if($name==1) { ?>
|
101 |
+
<tr>
|
102 |
+
<td>
|
103 |
+
<h3 class="store_name" onclick="map_xxx('<?php echo $row['lat']; ?>','<?php echo $row['longt']; ?>','<?php echo $row['address']; ?>','<?php echo $row['radius']; ?>');"><?php echo $row['name']; ?></h3>
|
104 |
+
</td>
|
105 |
+
</tr>
|
106 |
+
<?php } ?>
|
107 |
+
<?php if($address==1) { ?>
|
108 |
+
<tr>
|
109 |
+
<td class="col-address"><?php echo $row['address']; ?></td>
|
110 |
+
</tr>
|
111 |
+
<?php } ?>
|
112 |
+
<?php if($city==1) { ?>
|
113 |
+
<tr>
|
114 |
+
<?php
|
115 |
+
$add = $row['city']." ".$row['zipcode'];
|
116 |
+
?>
|
117 |
+
<td class="col-address"><?php echo $add; ?></td>
|
118 |
+
</tr>
|
119 |
+
<?php } ?>
|
120 |
+
<?php if($country==1) { ?>
|
121 |
+
<tr>
|
122 |
+
<td class="col-address"><?php echo $row['country_id']; ?> </td>
|
123 |
+
</tr>
|
124 |
+
<?php } ?>
|
125 |
+
<?php if($stireurl==1) { ?>
|
126 |
+
<tr>
|
127 |
+
<td>Website : <a href="<?php echo $row['store_url']; ?>" target="_blank"><?php echo $row['store_url']; ?></a></td>
|
128 |
+
</tr>
|
129 |
+
<?php } ?>
|
130 |
+
<?php if($phone==1) { ?>
|
131 |
+
<tr>
|
132 |
+
<td> Phone :<?php echo $row['phone']; ?> </td>
|
133 |
+
</tr>
|
134 |
+
<?php } ?>
|
135 |
+
<?php if($email==1) { ?>
|
136 |
+
<tr>
|
137 |
+
<td> Email :
|
138 |
+
<a href="mailto:<?php echo $row['email']; ?>?Subject=Store%20Location" target="_top">
|
139 |
+
<?php echo $row['email']; ?></a>
|
140 |
+
</td>
|
141 |
+
</tr>
|
142 |
+
<?php } ?>
|
143 |
+
<?php if($tradinghours==1) { ?>
|
144 |
+
<tr>
|
145 |
+
<td> Trading Hours :<?php echo $row['tradinghours']; ?></td>
|
146 |
+
</tr>
|
147 |
+
<?php } ?>
|
148 |
+
<?php if($fax==1) { ?>
|
149 |
+
<tr>
|
150 |
+
<td> Fax :<?php echo $row['fax']; ?></td>
|
151 |
+
</tr>
|
152 |
+
<?php } ?>
|
153 |
+
|
154 |
+
</table>
|
155 |
+
<?php } ?>
|
156 |
+
|
157 |
+
</td>
|
158 |
+
|
159 |
+
<td style="width:500px;">
|
160 |
+
<div id="map" style="width:500px; height:500px;"></div>
|
161 |
+
</td></tr></table>
|
162 |
+
|
app/design/frontend/base/default/template/storelocator/index.phtml
CHANGED
@@ -1,101 +1,71 @@
|
|
1 |
-
<?php
|
2 |
-
$
|
3 |
-
$
|
4 |
-
$
|
5 |
-
$
|
6 |
-
$
|
7 |
-
$
|
8 |
-
$
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
-
?>
|
11 |
|
12 |
-
|
13 |
-
|
14 |
-
<script type="text/javascript">
|
15 |
-
|
16 |
-
function map_xxx(x,y,z,r)
|
17 |
-
{
|
18 |
-
|
19 |
-
var miles = 3;
|
20 |
-
var latitude = x; // parseFloat("26.850883100000000000");
|
21 |
-
var longitude = y; // parseFloat("75.824783600000040000");
|
22 |
-
var address = z; // "Rohini, New Delhi, Delhi, India";
|
23 |
-
var radius = r; // "Rohini, New Delhi, Delhi, India";
|
24 |
-
|
25 |
-
var latlngPos = new google.maps.LatLng(latitude,longitude);
|
26 |
-
|
27 |
-
// Set up options for the Google map
|
28 |
-
var map = new google.maps.Map(document.getElementById("map"), {
|
29 |
-
zoom: 14,
|
30 |
-
|
31 |
-
center: latlngPos,
|
32 |
-
mapTypeId: google.maps.MapTypeId.ROADMAP
|
33 |
-
});
|
34 |
-
// draw circle
|
35 |
-
|
36 |
-
var circle = new google.maps.Circle({
|
37 |
-
center: latlngPos,
|
38 |
-
radius: miles *radius,
|
39 |
-
fillColor: "#ff69b4",
|
40 |
-
fillOpacity: 0.2,
|
41 |
-
strokeOpacity: 0.0,
|
42 |
-
strokeWeight: 0,
|
43 |
-
map: map
|
44 |
-
});
|
45 |
-
|
46 |
-
} google.maps.event.addDomListener(window, 'load', initialize);
|
47 |
-
</script>
|
48 |
|
49 |
<body onload="map_xxx('<?php echo $latitudex ?>','<?php echo $longitudex; ?>','<?php echo $addressx; ?>','<?php echo $radius; ?>');">
|
50 |
-
|
51 |
<table id="map_xxx" style="width:900px; border:10px;">
|
52 |
-
<tr><td style="
|
53 |
-
<?php
|
54 |
-
$sql = $connection->query("select * from manvstorelocator" );
|
55 |
while($row = $sql->fetch())
|
56 |
{?>
|
57 |
-
<table id="store-table" class="store-table">
|
58 |
<tr>
|
59 |
-
|
60 |
-
<
|
|
|
61 |
</td>
|
62 |
-
|
|
|
|
|
63 |
<tr>
|
|
|
64 |
<td>
|
65 |
<h3 class="store_name" onclick="map_xxx('<?php echo $row['lat']; ?>','<?php echo $row['longt']; ?>','<?php echo $row['address']; ?>','<?php echo $row['radius']; ?>');"><?php echo $row['name']; ?></h3>
|
66 |
</td>
|
|
|
67 |
</tr>
|
68 |
-
|
69 |
-
<td class="col-address"><?php echo $row['address']; ?></td>
|
70 |
-
|
71 |
-
<tr>
|
72 |
-
<?php
|
73 |
-
|
74 |
-
?>
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
<a href="mailto:<?php echo $row['email']; ?>?Subject=Store%20Location" target="_top">
|
89 |
-
<?php echo $row['email']; ?></a>
|
90 |
</td>
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
<?php if($
|
96 |
-
<tr>
|
97 |
-
<td> Fax :<?php echo $row['fax']; ?></td>
|
98 |
-
</tr>
|
99 |
<?php } ?>
|
100 |
</table>
|
101 |
<?php } ?>
|
@@ -105,3 +75,7 @@ $add = $row['city']." ".$row['zipcode'];
|
|
105 |
<td style="width:500px;">
|
106 |
<div id="map" style="width:500px; height:500px;"></div>
|
107 |
</td></tr></table>
|
|
|
|
|
|
|
|
1 |
+
<?php $enable=$this->getStorelocatorEnabled(); ?>
|
2 |
+
<?php $name=$this->getStorelocatorName(); ?>
|
3 |
+
<?php $address=$this->getStorelocatorAddress(); ?>
|
4 |
+
<?php $zipcode=$this->getStorelocatorZipcode(); ?>
|
5 |
+
<?php $city=$this->getStorelocatorCity(); ?>
|
6 |
+
<?php $country=$this->getStorelocatorCountry(); ?>
|
7 |
+
<?php $phone=$this->getStorelocatorPhone(); ?>
|
8 |
+
<?php $fax=$this->getStorelocatorFax(); ?>
|
9 |
+
<?php $description=$this->getStorelocatorDescription(); ?>
|
10 |
+
<?php $email=$this->getStorelocatorEmail(); ?>
|
11 |
+
<?php $tradinghours=$this->getStorelocatorTradinghours(); ?>
|
12 |
+
<?php $image=$this->getStorelocatorImage(); ?>
|
13 |
+
<?php $stireurl=$this->getStorelocatorStoreurl(); ?>
|
14 |
|
|
|
15 |
|
16 |
+
<?php require_once 'app/design/frontend/base/default/template/storelocator/config.phtml'; ?>
|
17 |
+
<?php if($enable==1) { ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
<body onload="map_xxx('<?php echo $latitudex ?>','<?php echo $longitudex; ?>','<?php echo $addressx; ?>','<?php echo $radius; ?>');">
|
20 |
+
<?php $sql = $connection->query("select * from $tblname where status='0'" ); ?>
|
21 |
<table id="map_xxx" style="width:900px; border:10px;">
|
22 |
+
<tr><td style="height: 500px; overflow: auto; display:block;" >
|
23 |
+
<?php
|
|
|
24 |
while($row = $sql->fetch())
|
25 |
{?>
|
26 |
+
<table id="store-table" class="store-table" style="margin-bottom:10px;">
|
27 |
<tr>
|
28 |
+
<?php if($image==1) { ?>
|
29 |
+
<td class="left">
|
30 |
+
<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;">
|
31 |
</td>
|
32 |
+
<?php } ?>
|
33 |
+
<td class="right" style="width:250px;">
|
34 |
+
<table class="mintbl">
|
35 |
<tr>
|
36 |
+
<?php if($name==1) { ?>
|
37 |
<td>
|
38 |
<h3 class="store_name" onclick="map_xxx('<?php echo $row['lat']; ?>','<?php echo $row['longt']; ?>','<?php echo $row['address']; ?>','<?php echo $row['radius']; ?>');"><?php echo $row['name']; ?></h3>
|
39 |
</td>
|
40 |
+
<?php } ?>
|
41 |
</tr>
|
42 |
+
<?php if($address==1) { ?>
|
43 |
+
<tr><td class="col-address"><?php echo $row['address']; ?></td></tr>
|
44 |
+
<?php } ?>
|
45 |
+
<tr><td class="col-address">
|
46 |
+
<?php if($zipcode==1) { ?>
|
47 |
+
Zip Code : <?php echo $row['zipcode']; ?> ,
|
48 |
+
<?php } ?>
|
49 |
+
<?php if($city==1) { ?>
|
50 |
+
City : <?php echo $row['city']; ?>
|
51 |
+
<?php } ?>
|
52 |
+
</td></tr>
|
53 |
+
|
54 |
+
<tr><td class="col-address">
|
55 |
+
<?php if($country==1) { ?> Country : <?php echo $row['country_id']; ?> , <?php } ?>
|
56 |
+
<?php if($phone==1) { ?> Phone : <?php echo $row['phone']; ?> <?php } ?>
|
57 |
+
</td></tr>
|
58 |
+
<?php if($fax==1) { ?>
|
59 |
+
<tr><td>Fax :<?php echo $row['fax']; ?></td></tr>
|
60 |
+
<?php } ?>
|
61 |
+
</table>
|
|
|
|
|
62 |
</td>
|
63 |
+
</tr>
|
64 |
+
<?php if($stireurl==1) { ?>
|
65 |
+
<tr><td colspan="2"> Website : <a href="<?php echo $row['store_url']; ?>" target="_blank"><?php echo $row['store_url']; ?></a></td></tr>
|
66 |
+
<?php } ?>
|
67 |
+
<?php if($address==1) { ?>
|
68 |
+
<tr><td colspan="2"> <?php echo $row['description']; ?></td></tr>
|
|
|
|
|
69 |
<?php } ?>
|
70 |
</table>
|
71 |
<?php } ?>
|
75 |
<td style="width:500px;">
|
76 |
<div id="map" style="width:500px; height:500px;"></div>
|
77 |
</td></tr></table>
|
78 |
+
|
79 |
+
<?php } else { ?>
|
80 |
+
<div ><h1 style="color:red;">Please Enable responsive banner Slider from <br/> Syestem-> Configuration-> Manv StoreLocator -> Setting </h1></div>
|
81 |
+
<?php } ?>
|
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.5</version>
|
8 |
</Manv_Storelocator>
|
9 |
</modules>
|
10 |
</config>
|
media/storelocator/storelocator/14948.jpg
CHANGED
Binary file
|
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,7 +1,7 @@
|
|
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>
|
@@ -10,9 +10,9 @@
|
|
10 |
<description>Store Locator extension allows you to show store location. Store locator increses tour sales. Store locator. </description>
|
11 |
<notes>Store Locator extension allows you to show store location. Store locator increses tour sales. Store locator. </notes>
|
12 |
<authors><author><name>Manvendra Sharma</name><user>sharmamanvendra</user><email>sharmamanvendra6@gmail.com</email></author></authors>
|
13 |
-
<date>2014-03-
|
14 |
-
<time>
|
15 |
-
<contents><target name="magecommunity"><dir name="Manv"><dir name="Storelocator"><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="
|
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.5</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>OSL</license>
|
7 |
<channel>community</channel>
|
10 |
<description>Store Locator extension allows you to show store location. Store locator increses tour sales. Store locator. </description>
|
11 |
<notes>Store Locator extension allows you to show store location. Store locator increses tour sales. Store locator. </notes>
|
12 |
<authors><author><name>Manvendra Sharma</name><user>sharmamanvendra</user><email>sharmamanvendra6@gmail.com</email></author></authors>
|
13 |
+
<date>2014-03-25</date>
|
14 |
+
<time>06:36:23</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Manv"><dir name="Storelocator"><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="e88bd2d64a2cd37cbf87afec138f7829"/></dir><file name="Tabs.php" hash="69cab78ea0631d5248ca3a5a412846a4"/></dir><file name="Edit.php" hash="1c1812b4a0e11bc1344f7ec2b910100d"/><file name="Grid.php" hash="5ff7392321d54d15bf7fdaa14bb67422"/></dir><file name="Storelocator.php" hash="0a2ce63f7097ab8372707538a69842a7"/><file name="Storelocatorbackend.php" hash="325dc329365cad3c0612aae1b8afb7c2"/></dir><file name="Index.php" hash="797b96a0f52db552b5e56d9206e3a162"/></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"/><file name="StorelocatorbackendController.php" hash="3dc6f6b3715900c949ee070d217e2516"/></dir><file name="IndexController.php" hash="178ddafe05235e4dfdb170b6523616a5"/></dir><dir name="etc"><file name="adminhtml.xml" hash="49f58436b0c5e5d0ff6ed5b2f7eb0b8a"/><file name="config.xml" hash="8d1b63dcc0ced0e77f73104113e3b7a5"/><file name="system.xml" hash="fbeeb07e9a12d3f1d5f91f9ddc4c6154"/></dir><dir name="sql"><dir name="storelocator_setup"><file name="mysql4-install-1.1.5.php" hash="22824df31d2e25c369c40b327844d430"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Manv_Storelocator.xml" hash="c53d2f9df2e488626ad72dfe09463eaa"/></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></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="storelocator.xml" hash="6d894b77e9e4b06803c89dd5be69fca6"/></dir><dir name="template"><dir name="storelocator"><file name="config.phtml" hash="ac35816881ab2be61f82d8cf69bfd18a"/><file name="copy index.phtml" hash="43a6a14202610863c8be650f9ed3a523"/><file name="index.phtml" hash="fa7790ad5b88d595685000b19d17eb8d"/></dir></dir></dir></dir></dir></target><target name="magemedia"><dir name="storelocator"><dir name="storelocator"><file name="14948.jpg" hash="1eb6fd40945bab51d5cf32ccfc20b831"/><file name="apsara-non-dust.jpg" hash="643b2a73671d1e352265ff49412c8c72"/><file name="map1.jpg" hash="824830faf2ffb00a7fc2cdbab43b84e9"/><file name="map2.jpg" hash="3b5a2d8b24862f7163dff9953bae2647"/><file name="map3.jpg" hash="ba6797b1b214f35f1267f114acfc1d62"/></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>
|