Version Notes
Add New Feature :-
1. Module Configuration Setting (left menu)
2. Auto Data Load.
3. One Click Run Module
4. Radius Functionality.
5. user friendly admin.
Download this release
Release Info
Developer | mukesh kumar saini |
Extension | Mks_Storelocator |
Version | 8.1.1 |
Comparing to | |
See all releases |
Code changes from version 1.1.3 to 8.1.1
- app/code/community/Mks/Bannerslider/Block/Adminhtml/Bannersliderbackend.php +0 -5
- app/code/community/Mks/Bannerslider/Block/Adminhtml/Lightboxslider.php +0 -17
- app/code/community/Mks/Bannerslider/Block/Adminhtml/Lightboxslider/Edit.php +0 -44
- app/code/community/Mks/Bannerslider/Block/Adminhtml/Lightboxslider/Edit/Form.php +0 -17
- app/code/community/Mks/Bannerslider/Block/Adminhtml/Lightboxslider/Edit/Tab/Form.php +0 -48
- app/code/community/Mks/Bannerslider/Block/Adminhtml/Lightboxslider/Edit/Tabs.php +0 -21
- app/code/community/Mks/Bannerslider/Block/Adminhtml/Lightboxslider/Grid.php +0 -94
- app/code/community/Mks/Bannerslider/Block/Index.php +0 -8
- app/code/community/Mks/Bannerslider/Helper/Data.php +0 -5
- app/code/community/Mks/Bannerslider/Model/Lightboxslider.php +0 -12
- app/code/community/Mks/Bannerslider/Model/Mysql4/Lightboxslider.php +0 -8
- app/code/community/Mks/Bannerslider/Model/Mysql4/Lightboxslider/Collection.php +0 -12
- app/code/community/Mks/Bannerslider/controllers/Adminhtml/BannersliderbackendController.php +0 -10
- app/code/community/Mks/Bannerslider/controllers/Adminhtml/LightboxsliderController.php +0 -209
- app/code/community/Mks/Bannerslider/controllers/IndexController.php +0 -22
- app/code/community/Mks/Bannerslider/etc/config.xml +0 -134
- app/code/community/Mks/Bannerslider/sql/bannerslider_setup/mysql4-install-1.1.2.php +0 -19
- app/code/community/Mks/Responsivebannerslider/Block/Adminhtml/Bannerslider.php +0 -17
- app/code/community/Mks/Responsivebannerslider/Block/Adminhtml/Bannerslider/Edit.php +0 -44
- app/code/community/Mks/Responsivebannerslider/Block/Adminhtml/Bannerslider/Edit/Form.php +0 -17
- app/code/community/Mks/Responsivebannerslider/Block/Adminhtml/Bannerslider/Edit/Tab/Form.php +0 -43
- app/code/community/Mks/Responsivebannerslider/Block/Adminhtml/Bannerslider/Edit/Tabs.php +0 -21
- app/code/community/Mks/Responsivebannerslider/Block/Adminhtml/Bannerslider/Grid.php +0 -86
- app/code/community/Mks/Responsivebannerslider/Block/Adminhtml/Responsivebannersliderbackend.php +0 -5
- app/code/community/Mks/Responsivebannerslider/Block/Index.php +0 -8
- app/code/community/Mks/Responsivebannerslider/Helper/Data.php +0 -5
- app/code/community/Mks/Responsivebannerslider/Model/Bannerslider.php +0 -12
- app/code/community/Mks/Responsivebannerslider/Model/Mysql4/Bannerslider.php +0 -8
- app/code/community/Mks/Responsivebannerslider/Model/Mysql4/Bannerslider/Collection.php +0 -12
- app/code/community/Mks/Responsivebannerslider/controllers/Adminhtml/BannersliderController.php +0 -209
- app/code/community/Mks/Responsivebannerslider/controllers/Adminhtml/ResponsivebannersliderbackendController.php +0 -10
- app/code/community/Mks/Responsivebannerslider/controllers/IndexController.php +0 -22
- app/code/community/Mks/Responsivebannerslider/etc/config.xml +0 -134
- app/code/community/Mks/Responsivebannerslider/sql/responsivebannerslider_setup/mysql4-install-1.1.1.php +0 -18
- app/code/community/Mks/Storelocator/Block/Adminhtml/Storelocator/Edit/Tab/Form.php +29 -11
- app/code/community/Mks/Storelocator/Block/Adminhtml/Storelocator/Grid.php +20 -8
- app/code/community/Mks/Storelocator/Block/Index.php +53 -1
- app/code/community/Mks/Storelocator/controllers/Adminhtml/StorelocatorController.php +0 -44
- app/code/community/Mks/Storelocator/controllers/Adminhtml/StorelocatorbackendController.php +1 -1
- app/code/community/Mks/Storelocator/controllers/IndexController.php +4 -4
- app/code/community/Mks/Storelocator/etc/adminhtml.xml +23 -0
- app/code/community/Mks/Storelocator/etc/config.xml +3 -3
- app/code/community/Mks/Storelocator/etc/system.xml +159 -0
- app/code/community/Mks/Storelocator/sql/storelocator_setup/mysql4-install-1.1.1.php +0 -18
- app/code/community/Mks/Storelocator/sql/storelocator_setup/mysql4-install-8.1.1.php +21 -0
- app/design/adminhtml/default/default/template/storelocator/storelocatorbackend.phtml +0 -2
- app/design/frontend/base/default/layout/storelocator.xml +1 -1
- app/design/frontend/base/default/template/storelocator/config.phtml +6 -6
- app/design/frontend/base/default/template/storelocator/index.phtml +35 -4
- app/design/frontend/base/default/template/storelocator/new_index.phtml +143 -0
- app/etc/modules/Mks_Storelocator.xml +1 -1
- media/storelocator/storelocator/14948.jpg +0 -0
- media/storelocator/storelocator/apsara-non-dust.jpg +0 -0
- package.xml +10 -5
app/code/community/Mks/Bannerslider/Block/Adminhtml/Bannersliderbackend.php
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Mks_Bannerslider_Block_Adminhtml_Bannersliderbackend extends Mage_Adminhtml_Block_Template {
|
4 |
-
|
5 |
-
}
|
|
|
|
|
|
|
|
|
|
app/code/community/Mks/Bannerslider/Block/Adminhtml/Lightboxslider.php
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
class Mks_Bannerslider_Block_Adminhtml_Lightboxslider extends Mage_Adminhtml_Block_Widget_Grid_Container{
|
5 |
-
|
6 |
-
public function __construct()
|
7 |
-
{
|
8 |
-
|
9 |
-
$this->_controller = "adminhtml_lightboxslider";
|
10 |
-
$this->_blockGroup = "bannerslider";
|
11 |
-
$this->_headerText = Mage::helper("bannerslider")->__("Lightboxslider Manager");
|
12 |
-
$this->_addButtonLabel = Mage::helper("bannerslider")->__("Add New Item");
|
13 |
-
parent::__construct();
|
14 |
-
|
15 |
-
}
|
16 |
-
|
17 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Mks/Bannerslider/Block/Adminhtml/Lightboxslider/Edit.php
DELETED
@@ -1,44 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Mks_Bannerslider_Block_Adminhtml_Lightboxslider_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
|
4 |
-
{
|
5 |
-
public function __construct()
|
6 |
-
{
|
7 |
-
|
8 |
-
parent::__construct();
|
9 |
-
$this->_objectId = "id";
|
10 |
-
$this->_blockGroup = "bannerslider";
|
11 |
-
$this->_controller = "adminhtml_lightboxslider";
|
12 |
-
$this->_updateButton("save", "label", Mage::helper("bannerslider")->__("Save Item"));
|
13 |
-
$this->_updateButton("delete", "label", Mage::helper("bannerslider")->__("Delete Item"));
|
14 |
-
|
15 |
-
$this->_addButton("saveandcontinue", array(
|
16 |
-
"label" => Mage::helper("bannerslider")->__("Save And Continue Edit"),
|
17 |
-
"onclick" => "saveAndContinueEdit()",
|
18 |
-
"class" => "save",
|
19 |
-
), -100);
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
$this->_formScripts[] = "
|
24 |
-
|
25 |
-
function saveAndContinueEdit(){
|
26 |
-
editForm.submit($('edit_form').action+'back/edit/');
|
27 |
-
}
|
28 |
-
";
|
29 |
-
}
|
30 |
-
|
31 |
-
public function getHeaderText()
|
32 |
-
{
|
33 |
-
if( Mage::registry("lightboxslider_data") && Mage::registry("lightboxslider_data")->getId() ){
|
34 |
-
|
35 |
-
return Mage::helper("bannerslider")->__("Edit Item '%s'", $this->htmlEscape(Mage::registry("lightboxslider_data")->getId()));
|
36 |
-
|
37 |
-
}
|
38 |
-
else{
|
39 |
-
|
40 |
-
return Mage::helper("bannerslider")->__("Add Item");
|
41 |
-
|
42 |
-
}
|
43 |
-
}
|
44 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Mks/Bannerslider/Block/Adminhtml/Lightboxslider/Edit/Form.php
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Mks_Bannerslider_Block_Adminhtml_Lightboxslider_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
|
3 |
-
{
|
4 |
-
protected function _prepareForm()
|
5 |
-
{
|
6 |
-
$form = new Varien_Data_Form(array(
|
7 |
-
"id" => "edit_form",
|
8 |
-
"action" => $this->getUrl("*/*/save", array("id" => $this->getRequest()->getParam("id"))),
|
9 |
-
"method" => "post",
|
10 |
-
"enctype" =>"multipart/form-data",
|
11 |
-
)
|
12 |
-
);
|
13 |
-
$form->setUseContainer(true);
|
14 |
-
$this->setForm($form);
|
15 |
-
return parent::_prepareForm();
|
16 |
-
}
|
17 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Mks/Bannerslider/Block/Adminhtml/Lightboxslider/Edit/Tab/Form.php
DELETED
@@ -1,48 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Mks_Bannerslider_Block_Adminhtml_Lightboxslider_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
|
3 |
-
{
|
4 |
-
protected function _prepareForm()
|
5 |
-
{
|
6 |
-
|
7 |
-
$form = new Varien_Data_Form();
|
8 |
-
$this->setForm($form);
|
9 |
-
$fieldset = $form->addFieldset("bannerslider_form", array("legend"=>Mage::helper("bannerslider")->__("Item information")));
|
10 |
-
|
11 |
-
|
12 |
-
$fieldset->addField("title", "text", array(
|
13 |
-
"label" => Mage::helper("bannerslider")->__("Title"),
|
14 |
-
"name" => "title",
|
15 |
-
));
|
16 |
-
|
17 |
-
$fieldset->addField('image', 'image', array(
|
18 |
-
'label' => Mage::helper('bannerslider')->__('Image'),
|
19 |
-
'name' => 'image',
|
20 |
-
'note' => '(*.jpg, *.png, *.gif)',
|
21 |
-
));
|
22 |
-
$fieldset->addField("url", "text", array(
|
23 |
-
"label" => Mage::helper("bannerslider")->__("Url"),
|
24 |
-
"name" => "url",
|
25 |
-
));
|
26 |
-
|
27 |
-
$fieldset->addField("description", "text", array(
|
28 |
-
"label" => Mage::helper("bannerslider")->__("Description"),
|
29 |
-
"name" => "description",
|
30 |
-
));
|
31 |
-
|
32 |
-
$fieldset->addField('status', 'select', array(
|
33 |
-
'label' => Mage::helper('bannerslider')->__('Status'),
|
34 |
-
'values' => Mks_Bannerslider_Block_Adminhtml_Lightboxslider_Grid::getValueArray4(),
|
35 |
-
'name' => 'status',
|
36 |
-
));
|
37 |
-
|
38 |
-
if (Mage::getSingleton("adminhtml/session")->getLightboxsliderData())
|
39 |
-
{
|
40 |
-
$form->setValues(Mage::getSingleton("adminhtml/session")->getLightboxsliderData());
|
41 |
-
Mage::getSingleton("adminhtml/session")->setLightboxsliderData(null);
|
42 |
-
}
|
43 |
-
elseif(Mage::registry("lightboxslider_data")) {
|
44 |
-
$form->setValues(Mage::registry("lightboxslider_data")->getData());
|
45 |
-
}
|
46 |
-
return parent::_prepareForm();
|
47 |
-
}
|
48 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Mks/Bannerslider/Block/Adminhtml/Lightboxslider/Edit/Tabs.php
DELETED
@@ -1,21 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Mks_Bannerslider_Block_Adminhtml_Lightboxslider_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
|
3 |
-
{
|
4 |
-
public function __construct()
|
5 |
-
{
|
6 |
-
parent::__construct();
|
7 |
-
$this->setId("lightboxslider_tabs");
|
8 |
-
$this->setDestElementId("edit_form");
|
9 |
-
$this->setTitle(Mage::helper("bannerslider")->__("Item Information"));
|
10 |
-
}
|
11 |
-
protected function _beforeToHtml()
|
12 |
-
{
|
13 |
-
$this->addTab("form_section", array(
|
14 |
-
"label" => Mage::helper("bannerslider")->__("Item Information"),
|
15 |
-
"title" => Mage::helper("bannerslider")->__("Item Information"),
|
16 |
-
"content" => $this->getLayout()->createBlock("bannerslider/adminhtml_lightboxslider_edit_tab_form")->toHtml(),
|
17 |
-
));
|
18 |
-
return parent::_beforeToHtml();
|
19 |
-
}
|
20 |
-
|
21 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Mks/Bannerslider/Block/Adminhtml/Lightboxslider/Grid.php
DELETED
@@ -1,94 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Mks_Bannerslider_Block_Adminhtml_Lightboxslider_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
4 |
-
{
|
5 |
-
|
6 |
-
public function __construct()
|
7 |
-
{
|
8 |
-
parent::__construct();
|
9 |
-
$this->setId("lightboxsliderGrid");
|
10 |
-
$this->setDefaultSort("id");
|
11 |
-
$this->setDefaultDir("ASC");
|
12 |
-
$this->setSaveParametersInSession(true);
|
13 |
-
}
|
14 |
-
|
15 |
-
protected function _prepareCollection()
|
16 |
-
{
|
17 |
-
$collection = Mage::getModel("bannerslider/lightboxslider")->getCollection();
|
18 |
-
$this->setCollection($collection);
|
19 |
-
return parent::_prepareCollection();
|
20 |
-
}
|
21 |
-
protected function _prepareColumns()
|
22 |
-
{
|
23 |
-
$this->addColumn("id", array(
|
24 |
-
"header" => Mage::helper("bannerslider")->__("ID"),
|
25 |
-
"align" =>"right",
|
26 |
-
"width" => "50px",
|
27 |
-
"type" => "number",
|
28 |
-
"index" => "id",
|
29 |
-
));
|
30 |
-
|
31 |
-
$this->addColumn("title", array(
|
32 |
-
"header" => Mage::helper("bannerslider")->__("Title"),
|
33 |
-
"index" => "title",
|
34 |
-
));
|
35 |
-
$this->addColumn("url", array(
|
36 |
-
"header" => Mage::helper("bannerslider")->__("Url"),
|
37 |
-
"index" => "url",
|
38 |
-
));
|
39 |
-
$this->addColumn("description", array(
|
40 |
-
"header" => Mage::helper("bannerslider")->__("Description"),
|
41 |
-
"index" => "description",
|
42 |
-
));
|
43 |
-
$this->addColumn('status', array(
|
44 |
-
'header' => Mage::helper('bannerslider')->__('Status'),
|
45 |
-
'index' => 'status',
|
46 |
-
'type' => 'options',
|
47 |
-
'options'=>Mks_Bannerslider_Block_Adminhtml_Lightboxslider_Grid::getOptionArray4(),
|
48 |
-
));
|
49 |
-
|
50 |
-
$this->addExportType('*/*/exportCsv', Mage::helper('sales')->__('CSV'));
|
51 |
-
$this->addExportType('*/*/exportExcel', Mage::helper('sales')->__('Excel'));
|
52 |
-
|
53 |
-
return parent::_prepareColumns();
|
54 |
-
}
|
55 |
-
|
56 |
-
public function getRowUrl($row)
|
57 |
-
{
|
58 |
-
return $this->getUrl("*/*/edit", array("id" => $row->getId()));
|
59 |
-
}
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
protected function _prepareMassaction()
|
64 |
-
{
|
65 |
-
$this->setMassactionIdField('id');
|
66 |
-
$this->getMassactionBlock()->setFormFieldName('ids');
|
67 |
-
$this->getMassactionBlock()->setUseSelectAll(true);
|
68 |
-
$this->getMassactionBlock()->addItem('remove_lightboxslider', array(
|
69 |
-
'label'=> Mage::helper('bannerslider')->__('Remove Lightboxslider'),
|
70 |
-
'url' => $this->getUrl('*/adminhtml_lightboxslider/massRemove'),
|
71 |
-
'confirm' => Mage::helper('bannerslider')->__('Are you sure?')
|
72 |
-
));
|
73 |
-
return $this;
|
74 |
-
}
|
75 |
-
|
76 |
-
static public function getOptionArray4()
|
77 |
-
{
|
78 |
-
$data_array=array();
|
79 |
-
$data_array[0]='Yes';
|
80 |
-
$data_array[1]='No';
|
81 |
-
return($data_array);
|
82 |
-
}
|
83 |
-
static public function getValueArray4()
|
84 |
-
{
|
85 |
-
$data_array=array();
|
86 |
-
foreach(Mks_Bannerslider_Block_Adminhtml_Lightboxslider_Grid::getOptionArray4() as $k=>$v){
|
87 |
-
$data_array[]=array('value'=>$k,'label'=>$v);
|
88 |
-
}
|
89 |
-
return($data_array);
|
90 |
-
|
91 |
-
}
|
92 |
-
|
93 |
-
|
94 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Mks/Bannerslider/Block/Index.php
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Mks_Bannerslider_Block_Index extends Mage_Core_Block_Template{
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Mks/Bannerslider/Helper/Data.php
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Mks_Bannerslider_Helper_Data extends Mage_Core_Helper_Abstract
|
3 |
-
{
|
4 |
-
}
|
5 |
-
|
|
|
|
|
|
|
|
|
|
app/code/community/Mks/Bannerslider/Model/Lightboxslider.php
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Mks_Bannerslider_Model_Lightboxslider extends Mage_Core_Model_Abstract
|
4 |
-
{
|
5 |
-
protected function _construct(){
|
6 |
-
|
7 |
-
$this->_init("bannerslider/lightboxslider");
|
8 |
-
|
9 |
-
}
|
10 |
-
|
11 |
-
}
|
12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Mks/Bannerslider/Model/Mysql4/Lightboxslider.php
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Mks_Bannerslider_Model_Mysql4_Lightboxslider extends Mage_Core_Model_Mysql4_Abstract
|
3 |
-
{
|
4 |
-
protected function _construct()
|
5 |
-
{
|
6 |
-
$this->_init("bannerslider/lightboxslider", "id");
|
7 |
-
}
|
8 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Mks/Bannerslider/Model/Mysql4/Lightboxslider/Collection.php
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Mks_Bannerslider_Model_Mysql4_Lightboxslider_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
3 |
-
{
|
4 |
-
|
5 |
-
public function _construct(){
|
6 |
-
$this->_init("bannerslider/lightboxslider");
|
7 |
-
}
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
}
|
12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Mks/Bannerslider/controllers/Adminhtml/BannersliderbackendController.php
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Mks_Bannerslider_Adminhtml_BannersliderbackendController extends Mage_Adminhtml_Controller_Action
|
3 |
-
{
|
4 |
-
public function indexAction()
|
5 |
-
{
|
6 |
-
$this->loadLayout();
|
7 |
-
$this->_title($this->__("Backend Page Title"));
|
8 |
-
$this->renderLayout();
|
9 |
-
}
|
10 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Mks/Bannerslider/controllers/Adminhtml/LightboxsliderController.php
DELETED
@@ -1,209 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Mks_Bannerslider_Adminhtml_LightboxsliderController extends Mage_Adminhtml_Controller_Action
|
4 |
-
{
|
5 |
-
protected function _initAction()
|
6 |
-
{
|
7 |
-
$this->loadLayout()->_setActiveMenu("bannerslider/lightboxslider")->_addBreadcrumb(Mage::helper("adminhtml")->__("Lightboxslider Manager"),Mage::helper("adminhtml")->__("Lightboxslider Manager"));
|
8 |
-
return $this;
|
9 |
-
}
|
10 |
-
public function indexAction()
|
11 |
-
{
|
12 |
-
$this->_title($this->__("Bannerslider"));
|
13 |
-
$this->_title($this->__("Manager Lightboxslider"));
|
14 |
-
|
15 |
-
$this->_initAction();
|
16 |
-
$this->renderLayout();
|
17 |
-
}
|
18 |
-
public function editAction()
|
19 |
-
{
|
20 |
-
$this->_title($this->__("Bannerslider"));
|
21 |
-
$this->_title($this->__("Lightboxslider"));
|
22 |
-
$this->_title($this->__("Edit Item"));
|
23 |
-
|
24 |
-
$id = $this->getRequest()->getParam("id");
|
25 |
-
$model = Mage::getModel("bannerslider/lightboxslider")->load($id);
|
26 |
-
if ($model->getId()) {
|
27 |
-
Mage::register("lightboxslider_data", $model);
|
28 |
-
$this->loadLayout();
|
29 |
-
$this->_setActiveMenu("bannerslider/lightboxslider");
|
30 |
-
$this->_addBreadcrumb(Mage::helper("adminhtml")->__("Lightboxslider Manager"), Mage::helper("adminhtml")->__("Lightboxslider Manager"));
|
31 |
-
$this->_addBreadcrumb(Mage::helper("adminhtml")->__("Lightboxslider Description"), Mage::helper("adminhtml")->__("Lightboxslider Description"));
|
32 |
-
$this->getLayout()->getBlock("head")->setCanLoadExtJs(true);
|
33 |
-
$this->_addContent($this->getLayout()->createBlock("bannerslider/adminhtml_lightboxslider_edit"))->_addLeft($this->getLayout()->createBlock("bannerslider/adminhtml_lightboxslider_edit_tabs"));
|
34 |
-
$this->renderLayout();
|
35 |
-
}
|
36 |
-
else {
|
37 |
-
Mage::getSingleton("adminhtml/session")->addError(Mage::helper("bannerslider")->__("Item does not exist."));
|
38 |
-
$this->_redirect("*/*/");
|
39 |
-
}
|
40 |
-
}
|
41 |
-
|
42 |
-
public function newAction()
|
43 |
-
{
|
44 |
-
|
45 |
-
$this->_title($this->__("Bannerslider"));
|
46 |
-
$this->_title($this->__("Lightboxslider"));
|
47 |
-
$this->_title($this->__("New Item"));
|
48 |
-
|
49 |
-
$id = $this->getRequest()->getParam("id");
|
50 |
-
$model = Mage::getModel("bannerslider/lightboxslider")->load($id);
|
51 |
-
|
52 |
-
$data = Mage::getSingleton("adminhtml/session")->getFormData(true);
|
53 |
-
if (!empty($data)) {
|
54 |
-
$model->setData($data);
|
55 |
-
}
|
56 |
-
|
57 |
-
Mage::register("lightboxslider_data", $model);
|
58 |
-
|
59 |
-
$this->loadLayout();
|
60 |
-
$this->_setActiveMenu("bannerslider/lightboxslider");
|
61 |
-
|
62 |
-
$this->getLayout()->getBlock("head")->setCanLoadExtJs(true);
|
63 |
-
|
64 |
-
$this->_addBreadcrumb(Mage::helper("adminhtml")->__("Lightboxslider Manager"), Mage::helper("adminhtml")->__("Lightboxslider Manager"));
|
65 |
-
$this->_addBreadcrumb(Mage::helper("adminhtml")->__("Lightboxslider Description"), Mage::helper("adminhtml")->__("Lightboxslider Description"));
|
66 |
-
|
67 |
-
|
68 |
-
$this->_addContent($this->getLayout()->createBlock("bannerslider/adminhtml_lightboxslider_edit"))->_addLeft($this->getLayout()->createBlock("bannerslider/adminhtml_lightboxslider_edit_tabs"));
|
69 |
-
|
70 |
-
$this->renderLayout();
|
71 |
-
|
72 |
-
}
|
73 |
-
public function saveAction()
|
74 |
-
{
|
75 |
-
|
76 |
-
$post_data=$this->getRequest()->getPost();
|
77 |
-
|
78 |
-
|
79 |
-
if ($post_data) {
|
80 |
-
|
81 |
-
try {
|
82 |
-
|
83 |
-
|
84 |
-
//save image
|
85 |
-
try{
|
86 |
-
|
87 |
-
if((bool)$post_data['image']['delete']==1) {
|
88 |
-
|
89 |
-
$post_data['image']='';
|
90 |
-
|
91 |
-
}
|
92 |
-
else {
|
93 |
-
|
94 |
-
unset($post_data['image']);
|
95 |
-
|
96 |
-
if (isset($_FILES)){
|
97 |
-
|
98 |
-
if ($_FILES['image']['name']) {
|
99 |
-
|
100 |
-
if($this->getRequest()->getParam("id")){
|
101 |
-
$model = Mage::getModel("bannerslider/lightboxslider")->load($this->getRequest()->getParam("id"));
|
102 |
-
if($model->getData('image')){
|
103 |
-
$io = new Varien_Io_File();
|
104 |
-
$io->rm(Mage::getBaseDir('media').DS.implode(DS,explode('/',$model->getData('image'))));
|
105 |
-
}
|
106 |
-
}
|
107 |
-
$path = Mage::getBaseDir('media') . DS . 'bannerslider' . DS .'lightboxslider'.DS;
|
108 |
-
$uploader = new Varien_File_Uploader('image');
|
109 |
-
$uploader->setAllowedExtensions(array('jpg','png','gif'));
|
110 |
-
$uploader->setAllowRenameFiles(false);
|
111 |
-
$uploader->setFilesDispersion(false);
|
112 |
-
$destFile = $path.$_FILES['image']['name'];
|
113 |
-
$filename = $uploader->getNewFileName($destFile);
|
114 |
-
$uploader->save($path, $filename);
|
115 |
-
|
116 |
-
$post_data['image']='bannerslider/lightboxslider/'.$filename;
|
117 |
-
}
|
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 |
-
|
129 |
-
$model = Mage::getModel("bannerslider/lightboxslider")
|
130 |
-
->addData($post_data)
|
131 |
-
->setId($this->getRequest()->getParam("id"))
|
132 |
-
->save();
|
133 |
-
|
134 |
-
Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Lightboxslider was successfully saved"));
|
135 |
-
Mage::getSingleton("adminhtml/session")->setLightboxsliderData(false);
|
136 |
-
|
137 |
-
if ($this->getRequest()->getParam("back")) {
|
138 |
-
$this->_redirect("*/*/edit", array("id" => $model->getId()));
|
139 |
-
return;
|
140 |
-
}
|
141 |
-
$this->_redirect("*/*/");
|
142 |
-
return;
|
143 |
-
}
|
144 |
-
catch (Exception $e) {
|
145 |
-
Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
|
146 |
-
Mage::getSingleton("adminhtml/session")->setLightboxsliderData($this->getRequest()->getPost());
|
147 |
-
$this->_redirect("*/*/edit", array("id" => $this->getRequest()->getParam("id")));
|
148 |
-
return;
|
149 |
-
}
|
150 |
-
|
151 |
-
}
|
152 |
-
$this->_redirect("*/*/");
|
153 |
-
}
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
public function deleteAction()
|
158 |
-
{
|
159 |
-
if( $this->getRequest()->getParam("id") > 0 ) {
|
160 |
-
try {
|
161 |
-
$model = Mage::getModel("bannerslider/lightboxslider");
|
162 |
-
$model->setId($this->getRequest()->getParam("id"))->delete();
|
163 |
-
Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Item was successfully deleted"));
|
164 |
-
$this->_redirect("*/*/");
|
165 |
-
}
|
166 |
-
catch (Exception $e) {
|
167 |
-
Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
|
168 |
-
$this->_redirect("*/*/edit", array("id" => $this->getRequest()->getParam("id")));
|
169 |
-
}
|
170 |
-
}
|
171 |
-
$this->_redirect("*/*/");
|
172 |
-
}
|
173 |
-
|
174 |
-
|
175 |
-
public function massRemoveAction()
|
176 |
-
{
|
177 |
-
try {
|
178 |
-
$ids = $this->getRequest()->getPost('ids', array());
|
179 |
-
foreach ($ids as $id) {
|
180 |
-
$model = Mage::getModel("bannerslider/lightboxslider");
|
181 |
-
$model->setId($id)->delete();
|
182 |
-
}
|
183 |
-
Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Item(s) was successfully removed"));
|
184 |
-
}
|
185 |
-
catch (Exception $e) {
|
186 |
-
Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
|
187 |
-
}
|
188 |
-
$this->_redirect('*/*/');
|
189 |
-
}
|
190 |
-
|
191 |
-
/**
|
192 |
-
* Export order grid to CSV format
|
193 |
-
*/
|
194 |
-
public function exportCsvAction()
|
195 |
-
{
|
196 |
-
$fileName = 'lightboxslider.csv';
|
197 |
-
$grid = $this->getLayout()->createBlock('bannerslider/adminhtml_lightboxslider_grid');
|
198 |
-
$this->_prepareDownloadResponse($fileName, $grid->getCsvFile());
|
199 |
-
}
|
200 |
-
/**
|
201 |
-
* Export order grid to Excel XML format
|
202 |
-
*/
|
203 |
-
public function exportExcelAction()
|
204 |
-
{
|
205 |
-
$fileName = 'lightboxslider.xml';
|
206 |
-
$grid = $this->getLayout()->createBlock('bannerslider/adminhtml_lightboxslider_grid');
|
207 |
-
$this->_prepareDownloadResponse($fileName, $grid->getExcelFile($fileName));
|
208 |
-
}
|
209 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Mks/Bannerslider/controllers/IndexController.php
DELETED
@@ -1,22 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Mks_Bannerslider_IndexController extends Mage_Core_Controller_Front_Action{
|
3 |
-
public function IndexAction() {
|
4 |
-
|
5 |
-
$this->loadLayout();
|
6 |
-
$this->getLayout()->getBlock("head")->setTitle($this->__("Titlename"));
|
7 |
-
$breadcrumbs = $this->getLayout()->getBlock("breadcrumbs");
|
8 |
-
$breadcrumbs->addCrumb("home", array(
|
9 |
-
"label" => $this->__("Home Page"),
|
10 |
-
"title" => $this->__("Home Page"),
|
11 |
-
"link" => Mage::getBaseUrl()
|
12 |
-
));
|
13 |
-
|
14 |
-
$breadcrumbs->addCrumb("titlename", array(
|
15 |
-
"label" => $this->__("Titlename"),
|
16 |
-
"title" => $this->__("Titlename")
|
17 |
-
));
|
18 |
-
|
19 |
-
$this->renderLayout();
|
20 |
-
|
21 |
-
}
|
22 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Mks/Bannerslider/etc/config.xml
DELETED
@@ -1,134 +0,0 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<config>
|
3 |
-
<modules>
|
4 |
-
<Mks_Bannerslider>
|
5 |
-
<version>1.1.2</version>
|
6 |
-
</Mks_Bannerslider>
|
7 |
-
</modules>
|
8 |
-
<frontend>
|
9 |
-
<routers>
|
10 |
-
<bannerslider>
|
11 |
-
<use>standard</use>
|
12 |
-
<args>
|
13 |
-
<module>Mks_Bannerslider</module>
|
14 |
-
<frontName>bannerslider</frontName>
|
15 |
-
</args>
|
16 |
-
</bannerslider>
|
17 |
-
</routers>
|
18 |
-
<layout>
|
19 |
-
<updates>
|
20 |
-
<bannerslider>
|
21 |
-
<file>bannerslider.xml</file>
|
22 |
-
</bannerslider>
|
23 |
-
</updates>
|
24 |
-
</layout>
|
25 |
-
</frontend>
|
26 |
-
<global>
|
27 |
-
<helpers>
|
28 |
-
<bannerslider>
|
29 |
-
<class>Mks_Bannerslider_Helper</class>
|
30 |
-
</bannerslider>
|
31 |
-
</helpers>
|
32 |
-
<blocks>
|
33 |
-
<bannerslider>
|
34 |
-
<class>Mks_Bannerslider_Block</class>
|
35 |
-
</bannerslider>
|
36 |
-
</blocks>
|
37 |
-
<models>
|
38 |
-
<bannerslider>
|
39 |
-
<class>Mks_Bannerslider_Model</class>
|
40 |
-
<resourceModel>bannerslider_mysql4</resourceModel>
|
41 |
-
</bannerslider>
|
42 |
-
<bannerslider_mysql4>
|
43 |
-
<class>Mks_Bannerslider_Model_Mysql4</class>
|
44 |
-
<entities>
|
45 |
-
<lightboxslider>
|
46 |
-
<table>mkslightboxslider</table>
|
47 |
-
</lightboxslider>
|
48 |
-
</entities>
|
49 |
-
</bannerslider_mysql4>
|
50 |
-
</models>
|
51 |
-
<resources>
|
52 |
-
<bannerslider_setup>
|
53 |
-
<setup>
|
54 |
-
<module>Mks_Bannerslider</module>
|
55 |
-
</setup>
|
56 |
-
<connection>
|
57 |
-
<use>core_setup</use>
|
58 |
-
</connection>
|
59 |
-
</bannerslider_setup>
|
60 |
-
<bannerslider_write>
|
61 |
-
<connection>
|
62 |
-
<use>core_write</use>
|
63 |
-
</connection>
|
64 |
-
</bannerslider_write>
|
65 |
-
<bannerslider_read>
|
66 |
-
<connection>
|
67 |
-
<use>core_read</use>
|
68 |
-
</connection>
|
69 |
-
</bannerslider_read>
|
70 |
-
</resources>
|
71 |
-
</global>
|
72 |
-
<admin>
|
73 |
-
<routers>
|
74 |
-
<bannerslider>
|
75 |
-
<use>admin</use>
|
76 |
-
<args>
|
77 |
-
<module>Mks_Bannerslider</module>
|
78 |
-
<frontName>bannerslider</frontName>
|
79 |
-
</args>
|
80 |
-
</bannerslider>
|
81 |
-
</routers>
|
82 |
-
</admin>
|
83 |
-
<adminhtml>
|
84 |
-
<menu>
|
85 |
-
<bannerslider module="bannerslider">
|
86 |
-
<title>Bannerslider</title>
|
87 |
-
<sort_order>100</sort_order>
|
88 |
-
<children>
|
89 |
-
<bannersliderbackend module="bannerslider">
|
90 |
-
<title>Backend Page Title</title>
|
91 |
-
<sort_order>0</sort_order>
|
92 |
-
<action>bannerslider/adminhtml_bannersliderbackend</action>
|
93 |
-
</bannersliderbackend>
|
94 |
-
<lightboxslider module="bannerslider">
|
95 |
-
<title>Manage Lightboxslider</title>
|
96 |
-
<sort_order>0</sort_order>
|
97 |
-
<action>bannerslider/adminhtml_lightboxslider</action>
|
98 |
-
</lightboxslider>
|
99 |
-
</children>
|
100 |
-
</bannerslider>
|
101 |
-
</menu>
|
102 |
-
<acl>
|
103 |
-
<resources>
|
104 |
-
<all>
|
105 |
-
<title>Allow Everything</title>
|
106 |
-
</all>
|
107 |
-
<admin>
|
108 |
-
<children>
|
109 |
-
<bannerslider translate="title" module="bannerslider">
|
110 |
-
<title>Bannerslider</title>
|
111 |
-
<sort_order>1000</sort_order>
|
112 |
-
<children>
|
113 |
-
<bannersliderbackend translate="title">
|
114 |
-
<title>Backend Page Title</title>
|
115 |
-
</bannersliderbackend>
|
116 |
-
<lightboxslider translate="title">
|
117 |
-
<title>Manage Lightboxslider</title>
|
118 |
-
<sort_order>0</sort_order>
|
119 |
-
</lightboxslider>
|
120 |
-
</children>
|
121 |
-
</bannerslider>
|
122 |
-
</children>
|
123 |
-
</admin>
|
124 |
-
</resources>
|
125 |
-
</acl>
|
126 |
-
<layout>
|
127 |
-
<updates>
|
128 |
-
<bannerslider>
|
129 |
-
<file>bannerslider.xml</file>
|
130 |
-
</bannerslider>
|
131 |
-
</updates>
|
132 |
-
</layout>
|
133 |
-
</adminhtml>
|
134 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Mks/Bannerslider/sql/bannerslider_setup/mysql4-install-1.1.2.php
DELETED
@@ -1,19 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
$installer = $this;
|
3 |
-
$installer->startSetup();
|
4 |
-
$sql=<<<SQLTEXT
|
5 |
-
create table {$this->getTable('mkslightboxslider')}(id int not null auto_increment, title varchar(255), image varchar(255), url varchar(255), category varchar(100), description varchar(255),primary key(id));
|
6 |
-
|
7 |
-
INSERT INTO {$this->getTable('mkslightboxslider')} (`title`,`image`,`url`,`description`,`status`) VALUES
|
8 |
-
('Slider 1','responsivebannerslider/bannerslider/1.jpg','http://www.magentocommerce.com/magento-connect/developer/mukeshsaini','Banner 1','0'),
|
9 |
-
('Slider 2','responsivebannerslider/bannerslider/2.jpg','http://www.magentocommerce.com/magento-connect/developer/mukeshsaini','Banner 2','0'),
|
10 |
-
('Slider 3','responsivebannerslider/bannerslider/3.jpg','http://www.magentocommerce.com/magento-connect/developer/mukeshsaini','Banner 3','0');
|
11 |
-
|
12 |
-
SQLTEXT;
|
13 |
-
|
14 |
-
$installer->run($sql);
|
15 |
-
//demo
|
16 |
-
Mage::getModel('core/url_rewrite')->setId(null);
|
17 |
-
//demo
|
18 |
-
$installer->endSetup();
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Mks/Responsivebannerslider/Block/Adminhtml/Bannerslider.php
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
class Mks_Responsivebannerslider_Block_Adminhtml_Bannerslider extends Mage_Adminhtml_Block_Widget_Grid_Container{
|
5 |
-
|
6 |
-
public function __construct()
|
7 |
-
{
|
8 |
-
|
9 |
-
$this->_controller = "adminhtml_bannerslider";
|
10 |
-
$this->_blockGroup = "responsivebannerslider";
|
11 |
-
$this->_headerText = Mage::helper("responsivebannerslider")->__("Bannerslider Manager");
|
12 |
-
$this->_addButtonLabel = Mage::helper("responsivebannerslider")->__("Add New Item");
|
13 |
-
parent::__construct();
|
14 |
-
|
15 |
-
}
|
16 |
-
|
17 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Mks/Responsivebannerslider/Block/Adminhtml/Bannerslider/Edit.php
DELETED
@@ -1,44 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Mks_Responsivebannerslider_Block_Adminhtml_Bannerslider_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
|
4 |
-
{
|
5 |
-
public function __construct()
|
6 |
-
{
|
7 |
-
|
8 |
-
parent::__construct();
|
9 |
-
$this->_objectId = "id";
|
10 |
-
$this->_blockGroup = "responsivebannerslider";
|
11 |
-
$this->_controller = "adminhtml_bannerslider";
|
12 |
-
$this->_updateButton("save", "label", Mage::helper("responsivebannerslider")->__("Save Item"));
|
13 |
-
$this->_updateButton("delete", "label", Mage::helper("responsivebannerslider")->__("Delete Item"));
|
14 |
-
|
15 |
-
$this->_addButton("saveandcontinue", array(
|
16 |
-
"label" => Mage::helper("responsivebannerslider")->__("Save And Continue Edit"),
|
17 |
-
"onclick" => "saveAndContinueEdit()",
|
18 |
-
"class" => "save",
|
19 |
-
), -100);
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
$this->_formScripts[] = "
|
24 |
-
|
25 |
-
function saveAndContinueEdit(){
|
26 |
-
editForm.submit($('edit_form').action+'back/edit/');
|
27 |
-
}
|
28 |
-
";
|
29 |
-
}
|
30 |
-
|
31 |
-
public function getHeaderText()
|
32 |
-
{
|
33 |
-
if( Mage::registry("bannerslider_data") && Mage::registry("bannerslider_data")->getId() ){
|
34 |
-
|
35 |
-
return Mage::helper("responsivebannerslider")->__("Edit Item '%s'", $this->htmlEscape(Mage::registry("bannerslider_data")->getId()));
|
36 |
-
|
37 |
-
}
|
38 |
-
else{
|
39 |
-
|
40 |
-
return Mage::helper("responsivebannerslider")->__("Add Item");
|
41 |
-
|
42 |
-
}
|
43 |
-
}
|
44 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Mks/Responsivebannerslider/Block/Adminhtml/Bannerslider/Edit/Form.php
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Mks_Responsivebannerslider_Block_Adminhtml_Bannerslider_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
|
3 |
-
{
|
4 |
-
protected function _prepareForm()
|
5 |
-
{
|
6 |
-
$form = new Varien_Data_Form(array(
|
7 |
-
"id" => "edit_form",
|
8 |
-
"action" => $this->getUrl("*/*/save", array("id" => $this->getRequest()->getParam("id"))),
|
9 |
-
"method" => "post",
|
10 |
-
"enctype" =>"multipart/form-data",
|
11 |
-
)
|
12 |
-
);
|
13 |
-
$form->setUseContainer(true);
|
14 |
-
$this->setForm($form);
|
15 |
-
return parent::_prepareForm();
|
16 |
-
}
|
17 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Mks/Responsivebannerslider/Block/Adminhtml/Bannerslider/Edit/Tab/Form.php
DELETED
@@ -1,43 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Mks_Responsivebannerslider_Block_Adminhtml_Bannerslider_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
|
3 |
-
{
|
4 |
-
protected function _prepareForm()
|
5 |
-
{
|
6 |
-
|
7 |
-
$form = new Varien_Data_Form();
|
8 |
-
$this->setForm($form);
|
9 |
-
$fieldset = $form->addFieldset("responsivebannerslider_form", array("legend"=>Mage::helper("responsivebannerslider")->__("Item information")));
|
10 |
-
|
11 |
-
|
12 |
-
$fieldset->addField("title", "text", array(
|
13 |
-
"label" => Mage::helper("responsivebannerslider")->__("Title"),
|
14 |
-
"name" => "title",
|
15 |
-
));
|
16 |
-
|
17 |
-
$fieldset->addField('image', 'image', array(
|
18 |
-
'label' => Mage::helper('responsivebannerslider')->__('Image'),
|
19 |
-
'name' => 'image',
|
20 |
-
'note' => '(*.jpg, *.png, *.gif)',
|
21 |
-
));
|
22 |
-
$fieldset->addField("description", "textarea", array(
|
23 |
-
"label" => Mage::helper("responsivebannerslider")->__("Description"),
|
24 |
-
"name" => "description",
|
25 |
-
));
|
26 |
-
|
27 |
-
$fieldset->addField('status', 'select', array(
|
28 |
-
'label' => Mage::helper('responsivebannerslider')->__('Status'),
|
29 |
-
'values' => Mks_Responsivebannerslider_Block_Adminhtml_Bannerslider_Grid::getValueArray5(),
|
30 |
-
'name' => 'status',
|
31 |
-
));
|
32 |
-
|
33 |
-
if (Mage::getSingleton("adminhtml/session")->getBannersliderData())
|
34 |
-
{
|
35 |
-
$form->setValues(Mage::getSingleton("adminhtml/session")->getBannersliderData());
|
36 |
-
Mage::getSingleton("adminhtml/session")->setBannersliderData(null);
|
37 |
-
}
|
38 |
-
elseif(Mage::registry("bannerslider_data")) {
|
39 |
-
$form->setValues(Mage::registry("bannerslider_data")->getData());
|
40 |
-
}
|
41 |
-
return parent::_prepareForm();
|
42 |
-
}
|
43 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Mks/Responsivebannerslider/Block/Adminhtml/Bannerslider/Edit/Tabs.php
DELETED
@@ -1,21 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Mks_Responsivebannerslider_Block_Adminhtml_Bannerslider_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
|
3 |
-
{
|
4 |
-
public function __construct()
|
5 |
-
{
|
6 |
-
parent::__construct();
|
7 |
-
$this->setId("bannerslider_tabs");
|
8 |
-
$this->setDestElementId("edit_form");
|
9 |
-
$this->setTitle(Mage::helper("responsivebannerslider")->__("Item Information"));
|
10 |
-
}
|
11 |
-
protected function _beforeToHtml()
|
12 |
-
{
|
13 |
-
$this->addTab("form_section", array(
|
14 |
-
"label" => Mage::helper("responsivebannerslider")->__("Item Information"),
|
15 |
-
"title" => Mage::helper("responsivebannerslider")->__("Item Information"),
|
16 |
-
"content" => $this->getLayout()->createBlock("responsivebannerslider/adminhtml_bannerslider_edit_tab_form")->toHtml(),
|
17 |
-
));
|
18 |
-
return parent::_beforeToHtml();
|
19 |
-
}
|
20 |
-
|
21 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Mks/Responsivebannerslider/Block/Adminhtml/Bannerslider/Grid.php
DELETED
@@ -1,86 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Mks_Responsivebannerslider_Block_Adminhtml_Bannerslider_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
4 |
-
{
|
5 |
-
|
6 |
-
public function __construct()
|
7 |
-
{
|
8 |
-
parent::__construct();
|
9 |
-
$this->setId("bannersliderGrid");
|
10 |
-
$this->setDefaultSort("id");
|
11 |
-
$this->setDefaultDir("ASC");
|
12 |
-
$this->setSaveParametersInSession(true);
|
13 |
-
}
|
14 |
-
|
15 |
-
protected function _prepareCollection()
|
16 |
-
{
|
17 |
-
$collection = Mage::getModel("responsivebannerslider/bannerslider")->getCollection();
|
18 |
-
$this->setCollection($collection);
|
19 |
-
return parent::_prepareCollection();
|
20 |
-
}
|
21 |
-
protected function _prepareColumns()
|
22 |
-
{
|
23 |
-
$this->addColumn("id", array(
|
24 |
-
"header" => Mage::helper("responsivebannerslider")->__("ID"),
|
25 |
-
"align" =>"right",
|
26 |
-
"width" => "50px",
|
27 |
-
"type" => "number",
|
28 |
-
"index" => "id",
|
29 |
-
));
|
30 |
-
|
31 |
-
$this->addColumn("title", array(
|
32 |
-
"header" => Mage::helper("responsivebannerslider")->__("Title"),
|
33 |
-
"index" => "title",
|
34 |
-
));
|
35 |
-
$this->addColumn('status', array(
|
36 |
-
'header' => Mage::helper('responsivebannerslider')->__('Status'),
|
37 |
-
'index' => 'status',
|
38 |
-
'type' => 'options',
|
39 |
-
'options'=>Mks_Responsivebannerslider_Block_Adminhtml_Bannerslider_Grid::getOptionArray5(),
|
40 |
-
));
|
41 |
-
|
42 |
-
$this->addExportType('*/*/exportCsv', Mage::helper('sales')->__('CSV'));
|
43 |
-
$this->addExportType('*/*/exportExcel', Mage::helper('sales')->__('Excel'));
|
44 |
-
|
45 |
-
return parent::_prepareColumns();
|
46 |
-
}
|
47 |
-
|
48 |
-
public function getRowUrl($row)
|
49 |
-
{
|
50 |
-
return $this->getUrl("*/*/edit", array("id" => $row->getId()));
|
51 |
-
}
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
protected function _prepareMassaction()
|
56 |
-
{
|
57 |
-
$this->setMassactionIdField('id');
|
58 |
-
$this->getMassactionBlock()->setFormFieldName('ids');
|
59 |
-
$this->getMassactionBlock()->setUseSelectAll(true);
|
60 |
-
$this->getMassactionBlock()->addItem('remove_bannerslider', array(
|
61 |
-
'label'=> Mage::helper('responsivebannerslider')->__('Remove Bannerslider'),
|
62 |
-
'url' => $this->getUrl('*/adminhtml_bannerslider/massRemove'),
|
63 |
-
'confirm' => Mage::helper('responsivebannerslider')->__('Are you sure?')
|
64 |
-
));
|
65 |
-
return $this;
|
66 |
-
}
|
67 |
-
|
68 |
-
static public function getOptionArray5()
|
69 |
-
{
|
70 |
-
$data_array=array();
|
71 |
-
$data_array[0]='Yes';
|
72 |
-
$data_array[1]='No';
|
73 |
-
return($data_array);
|
74 |
-
}
|
75 |
-
static public function getValueArray5()
|
76 |
-
{
|
77 |
-
$data_array=array();
|
78 |
-
foreach(Mks_Responsivebannerslider_Block_Adminhtml_Bannerslider_Grid::getOptionArray5() as $k=>$v){
|
79 |
-
$data_array[]=array('value'=>$k,'label'=>$v);
|
80 |
-
}
|
81 |
-
return($data_array);
|
82 |
-
|
83 |
-
}
|
84 |
-
|
85 |
-
|
86 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Mks/Responsivebannerslider/Block/Adminhtml/Responsivebannersliderbackend.php
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Mks_Responsivebannerslider_Block_Adminhtml_Responsivebannersliderbackend extends Mage_Adminhtml_Block_Template {
|
4 |
-
|
5 |
-
}
|
|
|
|
|
|
|
|
|
|
app/code/community/Mks/Responsivebannerslider/Block/Index.php
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Mks_Responsivebannerslider_Block_Index extends Mage_Core_Block_Template{
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Mks/Responsivebannerslider/Helper/Data.php
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Mks_Responsivebannerslider_Helper_Data extends Mage_Core_Helper_Abstract
|
3 |
-
{
|
4 |
-
}
|
5 |
-
|
|
|
|
|
|
|
|
|
|
app/code/community/Mks/Responsivebannerslider/Model/Bannerslider.php
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Mks_Responsivebannerslider_Model_Bannerslider extends Mage_Core_Model_Abstract
|
4 |
-
{
|
5 |
-
protected function _construct(){
|
6 |
-
|
7 |
-
$this->_init("responsivebannerslider/bannerslider");
|
8 |
-
|
9 |
-
}
|
10 |
-
|
11 |
-
}
|
12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Mks/Responsivebannerslider/Model/Mysql4/Bannerslider.php
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Mks_Responsivebannerslider_Model_Mysql4_Bannerslider extends Mage_Core_Model_Mysql4_Abstract
|
3 |
-
{
|
4 |
-
protected function _construct()
|
5 |
-
{
|
6 |
-
$this->_init("responsivebannerslider/bannerslider", "id");
|
7 |
-
}
|
8 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Mks/Responsivebannerslider/Model/Mysql4/Bannerslider/Collection.php
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Mks_Responsivebannerslider_Model_Mysql4_Bannerslider_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
3 |
-
{
|
4 |
-
|
5 |
-
public function _construct(){
|
6 |
-
$this->_init("responsivebannerslider/bannerslider");
|
7 |
-
}
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
}
|
12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Mks/Responsivebannerslider/controllers/Adminhtml/BannersliderController.php
DELETED
@@ -1,209 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Mks_Responsivebannerslider_Adminhtml_BannersliderController extends Mage_Adminhtml_Controller_Action
|
4 |
-
{
|
5 |
-
protected function _initAction()
|
6 |
-
{
|
7 |
-
$this->loadLayout()->_setActiveMenu("responsivebannerslider/bannerslider")->_addBreadcrumb(Mage::helper("adminhtml")->__("Bannerslider Manager"),Mage::helper("adminhtml")->__("Bannerslider Manager"));
|
8 |
-
return $this;
|
9 |
-
}
|
10 |
-
public function indexAction()
|
11 |
-
{
|
12 |
-
$this->_title($this->__("Responsivebannerslider"));
|
13 |
-
$this->_title($this->__("Manager Bannerslider"));
|
14 |
-
|
15 |
-
$this->_initAction();
|
16 |
-
$this->renderLayout();
|
17 |
-
}
|
18 |
-
public function editAction()
|
19 |
-
{
|
20 |
-
$this->_title($this->__("Responsivebannerslider"));
|
21 |
-
$this->_title($this->__("Bannerslider"));
|
22 |
-
$this->_title($this->__("Edit Item"));
|
23 |
-
|
24 |
-
$id = $this->getRequest()->getParam("id");
|
25 |
-
$model = Mage::getModel("responsivebannerslider/bannerslider")->load($id);
|
26 |
-
if ($model->getId()) {
|
27 |
-
Mage::register("bannerslider_data", $model);
|
28 |
-
$this->loadLayout();
|
29 |
-
$this->_setActiveMenu("responsivebannerslider/bannerslider");
|
30 |
-
$this->_addBreadcrumb(Mage::helper("adminhtml")->__("Bannerslider Manager"), Mage::helper("adminhtml")->__("Bannerslider Manager"));
|
31 |
-
$this->_addBreadcrumb(Mage::helper("adminhtml")->__("Bannerslider Description"), Mage::helper("adminhtml")->__("Bannerslider Description"));
|
32 |
-
$this->getLayout()->getBlock("head")->setCanLoadExtJs(true);
|
33 |
-
$this->_addContent($this->getLayout()->createBlock("responsivebannerslider/adminhtml_bannerslider_edit"))->_addLeft($this->getLayout()->createBlock("responsivebannerslider/adminhtml_bannerslider_edit_tabs"));
|
34 |
-
$this->renderLayout();
|
35 |
-
}
|
36 |
-
else {
|
37 |
-
Mage::getSingleton("adminhtml/session")->addError(Mage::helper("responsivebannerslider")->__("Item does not exist."));
|
38 |
-
$this->_redirect("*/*/");
|
39 |
-
}
|
40 |
-
}
|
41 |
-
|
42 |
-
public function newAction()
|
43 |
-
{
|
44 |
-
|
45 |
-
$this->_title($this->__("Responsivebannerslider"));
|
46 |
-
$this->_title($this->__("Bannerslider"));
|
47 |
-
$this->_title($this->__("New Item"));
|
48 |
-
|
49 |
-
$id = $this->getRequest()->getParam("id");
|
50 |
-
$model = Mage::getModel("responsivebannerslider/bannerslider")->load($id);
|
51 |
-
|
52 |
-
$data = Mage::getSingleton("adminhtml/session")->getFormData(true);
|
53 |
-
if (!empty($data)) {
|
54 |
-
$model->setData($data);
|
55 |
-
}
|
56 |
-
|
57 |
-
Mage::register("bannerslider_data", $model);
|
58 |
-
|
59 |
-
$this->loadLayout();
|
60 |
-
$this->_setActiveMenu("responsivebannerslider/bannerslider");
|
61 |
-
|
62 |
-
$this->getLayout()->getBlock("head")->setCanLoadExtJs(true);
|
63 |
-
|
64 |
-
$this->_addBreadcrumb(Mage::helper("adminhtml")->__("Bannerslider Manager"), Mage::helper("adminhtml")->__("Bannerslider Manager"));
|
65 |
-
$this->_addBreadcrumb(Mage::helper("adminhtml")->__("Bannerslider Description"), Mage::helper("adminhtml")->__("Bannerslider Description"));
|
66 |
-
|
67 |
-
|
68 |
-
$this->_addContent($this->getLayout()->createBlock("responsivebannerslider/adminhtml_bannerslider_edit"))->_addLeft($this->getLayout()->createBlock("responsivebannerslider/adminhtml_bannerslider_edit_tabs"));
|
69 |
-
|
70 |
-
$this->renderLayout();
|
71 |
-
|
72 |
-
}
|
73 |
-
public function saveAction()
|
74 |
-
{
|
75 |
-
|
76 |
-
$post_data=$this->getRequest()->getPost();
|
77 |
-
|
78 |
-
|
79 |
-
if ($post_data) {
|
80 |
-
|
81 |
-
try {
|
82 |
-
|
83 |
-
|
84 |
-
//save image
|
85 |
-
try{
|
86 |
-
|
87 |
-
if((bool)$post_data['image']['delete']==1) {
|
88 |
-
|
89 |
-
$post_data['image']='';
|
90 |
-
|
91 |
-
}
|
92 |
-
else {
|
93 |
-
|
94 |
-
unset($post_data['image']);
|
95 |
-
|
96 |
-
if (isset($_FILES)){
|
97 |
-
|
98 |
-
if ($_FILES['image']['name']) {
|
99 |
-
|
100 |
-
if($this->getRequest()->getParam("id")){
|
101 |
-
$model = Mage::getModel("responsivebannerslider/bannerslider")->load($this->getRequest()->getParam("id"));
|
102 |
-
if($model->getData('image')){
|
103 |
-
$io = new Varien_Io_File();
|
104 |
-
$io->rm(Mage::getBaseDir('media').DS.implode(DS,explode('/',$model->getData('image'))));
|
105 |
-
}
|
106 |
-
}
|
107 |
-
$path = Mage::getBaseDir('media') . DS . 'responsivebannerslider' . DS .'bannerslider'.DS;
|
108 |
-
$uploader = new Varien_File_Uploader('image');
|
109 |
-
$uploader->setAllowedExtensions(array('jpg','png','gif'));
|
110 |
-
$uploader->setAllowRenameFiles(false);
|
111 |
-
$uploader->setFilesDispersion(false);
|
112 |
-
$destFile = $path.$_FILES['image']['name'];
|
113 |
-
$filename = $uploader->getNewFileName($destFile);
|
114 |
-
$uploader->save($path, $filename);
|
115 |
-
|
116 |
-
$post_data['image']='responsivebannerslider/bannerslider/'.$filename;
|
117 |
-
}
|
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 |
-
|
129 |
-
$model = Mage::getModel("responsivebannerslider/bannerslider")
|
130 |
-
->addData($post_data)
|
131 |
-
->setId($this->getRequest()->getParam("id"))
|
132 |
-
->save();
|
133 |
-
|
134 |
-
Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Bannerslider was successfully saved"));
|
135 |
-
Mage::getSingleton("adminhtml/session")->setBannersliderData(false);
|
136 |
-
|
137 |
-
if ($this->getRequest()->getParam("back")) {
|
138 |
-
$this->_redirect("*/*/edit", array("id" => $model->getId()));
|
139 |
-
return;
|
140 |
-
}
|
141 |
-
$this->_redirect("*/*/");
|
142 |
-
return;
|
143 |
-
}
|
144 |
-
catch (Exception $e) {
|
145 |
-
Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
|
146 |
-
Mage::getSingleton("adminhtml/session")->setBannersliderData($this->getRequest()->getPost());
|
147 |
-
$this->_redirect("*/*/edit", array("id" => $this->getRequest()->getParam("id")));
|
148 |
-
return;
|
149 |
-
}
|
150 |
-
|
151 |
-
}
|
152 |
-
$this->_redirect("*/*/");
|
153 |
-
}
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
public function deleteAction()
|
158 |
-
{
|
159 |
-
if( $this->getRequest()->getParam("id") > 0 ) {
|
160 |
-
try {
|
161 |
-
$model = Mage::getModel("responsivebannerslider/bannerslider");
|
162 |
-
$model->setId($this->getRequest()->getParam("id"))->delete();
|
163 |
-
Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Item was successfully deleted"));
|
164 |
-
$this->_redirect("*/*/");
|
165 |
-
}
|
166 |
-
catch (Exception $e) {
|
167 |
-
Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
|
168 |
-
$this->_redirect("*/*/edit", array("id" => $this->getRequest()->getParam("id")));
|
169 |
-
}
|
170 |
-
}
|
171 |
-
$this->_redirect("*/*/");
|
172 |
-
}
|
173 |
-
|
174 |
-
|
175 |
-
public function massRemoveAction()
|
176 |
-
{
|
177 |
-
try {
|
178 |
-
$ids = $this->getRequest()->getPost('ids', array());
|
179 |
-
foreach ($ids as $id) {
|
180 |
-
$model = Mage::getModel("responsivebannerslider/bannerslider");
|
181 |
-
$model->setId($id)->delete();
|
182 |
-
}
|
183 |
-
Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Item(s) was successfully removed"));
|
184 |
-
}
|
185 |
-
catch (Exception $e) {
|
186 |
-
Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
|
187 |
-
}
|
188 |
-
$this->_redirect('*/*/');
|
189 |
-
}
|
190 |
-
|
191 |
-
/**
|
192 |
-
* Export order grid to CSV format
|
193 |
-
*/
|
194 |
-
public function exportCsvAction()
|
195 |
-
{
|
196 |
-
$fileName = 'bannerslider.csv';
|
197 |
-
$grid = $this->getLayout()->createBlock('responsivebannerslider/adminhtml_bannerslider_grid');
|
198 |
-
$this->_prepareDownloadResponse($fileName, $grid->getCsvFile());
|
199 |
-
}
|
200 |
-
/**
|
201 |
-
* Export order grid to Excel XML format
|
202 |
-
*/
|
203 |
-
public function exportExcelAction()
|
204 |
-
{
|
205 |
-
$fileName = 'bannerslider.xml';
|
206 |
-
$grid = $this->getLayout()->createBlock('responsivebannerslider/adminhtml_bannerslider_grid');
|
207 |
-
$this->_prepareDownloadResponse($fileName, $grid->getExcelFile($fileName));
|
208 |
-
}
|
209 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Mks/Responsivebannerslider/controllers/Adminhtml/ResponsivebannersliderbackendController.php
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Mks_Responsivebannerslider_Adminhtml_ResponsivebannersliderbackendController 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/Mks/Responsivebannerslider/controllers/IndexController.php
DELETED
@@ -1,22 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Mks_Responsivebannerslider_IndexController extends Mage_Core_Controller_Front_Action{
|
3 |
-
public function IndexAction() {
|
4 |
-
|
5 |
-
$this->loadLayout();
|
6 |
-
$this->getLayout()->getBlock("head")->setTitle($this->__("banner slider"));
|
7 |
-
$breadcrumbs = $this->getLayout()->getBlock("breadcrumbs");
|
8 |
-
$breadcrumbs->addCrumb("home", array(
|
9 |
-
"label" => $this->__("Home Page"),
|
10 |
-
"title" => $this->__("Home Page"),
|
11 |
-
"link" => Mage::getBaseUrl()
|
12 |
-
));
|
13 |
-
|
14 |
-
$breadcrumbs->addCrumb("banner slider", array(
|
15 |
-
"label" => $this->__("banner slider"),
|
16 |
-
"title" => $this->__("banner slider")
|
17 |
-
));
|
18 |
-
|
19 |
-
$this->renderLayout();
|
20 |
-
|
21 |
-
}
|
22 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Mks/Responsivebannerslider/etc/config.xml
DELETED
@@ -1,134 +0,0 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<config>
|
3 |
-
<modules>
|
4 |
-
<Mks_Responsivebannerslider>
|
5 |
-
<version>1.1.1</version>
|
6 |
-
</Mks_Responsivebannerslider>
|
7 |
-
</modules>
|
8 |
-
<frontend>
|
9 |
-
<routers>
|
10 |
-
<responsivebannerslider>
|
11 |
-
<use>standard</use>
|
12 |
-
<args>
|
13 |
-
<module>Mks_Responsivebannerslider</module>
|
14 |
-
<frontName>responsivebannerslider</frontName>
|
15 |
-
</args>
|
16 |
-
</responsivebannerslider>
|
17 |
-
</routers>
|
18 |
-
<layout>
|
19 |
-
<updates>
|
20 |
-
<responsivebannerslider>
|
21 |
-
<file>responsivebannerslider.xml</file>
|
22 |
-
</responsivebannerslider>
|
23 |
-
</updates>
|
24 |
-
</layout>
|
25 |
-
</frontend>
|
26 |
-
<global>
|
27 |
-
<helpers>
|
28 |
-
<responsivebannerslider>
|
29 |
-
<class>Mks_Responsivebannerslider_Helper</class>
|
30 |
-
</responsivebannerslider>
|
31 |
-
</helpers>
|
32 |
-
<blocks>
|
33 |
-
<responsivebannerslider>
|
34 |
-
<class>Mks_Responsivebannerslider_Block</class>
|
35 |
-
</responsivebannerslider>
|
36 |
-
</blocks>
|
37 |
-
<models>
|
38 |
-
<responsivebannerslider>
|
39 |
-
<class>Mks_Responsivebannerslider_Model</class>
|
40 |
-
<resourceModel>responsivebannerslider_mysql4</resourceModel>
|
41 |
-
</responsivebannerslider>
|
42 |
-
<responsivebannerslider_mysql4>
|
43 |
-
<class>Mks_Responsivebannerslider_Model_Mysql4</class>
|
44 |
-
<entities>
|
45 |
-
<bannerslider>
|
46 |
-
<table>mksresponsivebannerslider</table>
|
47 |
-
</bannerslider>
|
48 |
-
</entities>
|
49 |
-
</responsivebannerslider_mysql4>
|
50 |
-
</models>
|
51 |
-
<resources>
|
52 |
-
<responsivebannerslider_setup>
|
53 |
-
<setup>
|
54 |
-
<module>Mks_Responsivebannerslider</module>
|
55 |
-
</setup>
|
56 |
-
<connection>
|
57 |
-
<use>core_setup</use>
|
58 |
-
</connection>
|
59 |
-
</responsivebannerslider_setup>
|
60 |
-
<responsivebannerslider_write>
|
61 |
-
<connection>
|
62 |
-
<use>core_write</use>
|
63 |
-
</connection>
|
64 |
-
</responsivebannerslider_write>
|
65 |
-
<responsivebannerslider_read>
|
66 |
-
<connection>
|
67 |
-
<use>core_read</use>
|
68 |
-
</connection>
|
69 |
-
</responsivebannerslider_read>
|
70 |
-
</resources>
|
71 |
-
</global>
|
72 |
-
<admin>
|
73 |
-
<routers>
|
74 |
-
<responsivebannerslider>
|
75 |
-
<use>admin</use>
|
76 |
-
<args>
|
77 |
-
<module>Mks_Responsivebannerslider</module>
|
78 |
-
<frontName>responsivebannerslider</frontName>
|
79 |
-
</args>
|
80 |
-
</responsivebannerslider>
|
81 |
-
</routers>
|
82 |
-
</admin>
|
83 |
-
<adminhtml>
|
84 |
-
<menu>
|
85 |
-
<responsivebannerslider module="responsivebannerslider">
|
86 |
-
<title>Responsivebannerslider</title>
|
87 |
-
<sort_order>100</sort_order>
|
88 |
-
<children>
|
89 |
-
<responsivebannersliderbackend module="responsivebannerslider">
|
90 |
-
<title>About Us</title>
|
91 |
-
<sort_order>0</sort_order>
|
92 |
-
<action>responsivebannerslider/adminhtml_responsivebannersliderbackend</action>
|
93 |
-
</responsivebannersliderbackend>
|
94 |
-
<bannerslider module="responsivebannerslider">
|
95 |
-
<title>Manage Bannerslider</title>
|
96 |
-
<sort_order>0</sort_order>
|
97 |
-
<action>responsivebannerslider/adminhtml_bannerslider</action>
|
98 |
-
</bannerslider>
|
99 |
-
</children>
|
100 |
-
</responsivebannerslider>
|
101 |
-
</menu>
|
102 |
-
<acl>
|
103 |
-
<resources>
|
104 |
-
<all>
|
105 |
-
<title>Allow Everything</title>
|
106 |
-
</all>
|
107 |
-
<admin>
|
108 |
-
<children>
|
109 |
-
<responsivebannerslider translate="title" module="responsivebannerslider">
|
110 |
-
<title>Responsivebannerslider</title>
|
111 |
-
<sort_order>1000</sort_order>
|
112 |
-
<children>
|
113 |
-
<responsivebannersliderbackend translate="title">
|
114 |
-
<title>About Us</title>
|
115 |
-
</responsivebannersliderbackend>
|
116 |
-
<bannerslider translate="title">
|
117 |
-
<title>Manage Bannerslider</title>
|
118 |
-
<sort_order>0</sort_order>
|
119 |
-
</bannerslider>
|
120 |
-
</children>
|
121 |
-
</responsivebannerslider>
|
122 |
-
</children>
|
123 |
-
</admin>
|
124 |
-
</resources>
|
125 |
-
</acl>
|
126 |
-
<layout>
|
127 |
-
<updates>
|
128 |
-
<responsivebannerslider>
|
129 |
-
<file>responsivebannerslider.xml</file>
|
130 |
-
</responsivebannerslider>
|
131 |
-
</updates>
|
132 |
-
</layout>
|
133 |
-
</adminhtml>
|
134 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Mks/Responsivebannerslider/sql/responsivebannerslider_setup/mysql4-install-1.1.1.php
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
$installer = $this;
|
3 |
-
$installer->startSetup();
|
4 |
-
$sql=<<<SQLTEXT
|
5 |
-
|
6 |
-
create table {$this->getTable('mksresponsivebannerslider')} (id int not null auto_increment, title varchar(255),image varchar(255),description varchar(255),status varchar(255), primary key(id));
|
7 |
-
|
8 |
-
INSERT INTO {$this->getTable('mksresponsivebannerslider')} (`title`,`image`,`description`,`status`) VALUES ('Responsive Banner Slider 1','responsivebannerslider/bannerslider/banner-1.jpg','Responsive Banner Slider 1','0'),('Responsive Banner Slider 2','responsivebannerslider/bannerslider/banner-2.jpg','Responsive Banner Slider 2','0'),
|
9 |
-
('Responsive Banner Slider 3','responsivebannerslider/bannerslider/banner-3.jpg','Responsive Banner Slider 3','0');
|
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/Mks/Storelocator/Block/Adminhtml/Storelocator/Edit/Tab/Form.php
CHANGED
@@ -10,7 +10,9 @@ class Mks_Storelocator_Block_Adminhtml_Storelocator_Edit_Tab_Form extends Mage_A
|
|
10 |
|
11 |
|
12 |
$fieldset->addField("name", "text", array(
|
13 |
-
"label" => Mage::helper("storelocator")->__("Name"),
|
|
|
|
|
14 |
"name" => "name",
|
15 |
));
|
16 |
|
@@ -30,7 +32,7 @@ class Mks_Storelocator_Block_Adminhtml_Storelocator_Edit_Tab_Form extends Mage_A
|
|
30 |
));
|
31 |
|
32 |
$fieldset->addField("country_id", "text", array(
|
33 |
-
"label" => Mage::helper("storelocator")->__("Country
|
34 |
"name" => "country_id",
|
35 |
));
|
36 |
|
@@ -53,30 +55,46 @@ class Mks_Storelocator_Block_Adminhtml_Storelocator_Edit_Tab_Form extends Mage_A
|
|
53 |
"label" => Mage::helper("storelocator")->__("Store Url"),
|
54 |
"name" => "store_url",
|
55 |
));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
|
57 |
$fieldset->addField('image', 'image', array(
|
58 |
-
'label' => Mage::helper('storelocator')->__('Image'),
|
59 |
'name' => 'image',
|
60 |
'note' => '(*.jpg, *.png, *.gif)',
|
61 |
-
));
|
62 |
-
$fieldset->addField('marker', 'image', array(
|
63 |
-
'label' => Mage::helper('storelocator')->__('Marker Image'),
|
64 |
-
'name' => 'marker',
|
65 |
-
'note' => '(*.jpg, *.png, *.gif)',
|
66 |
));
|
67 |
$fieldset->addField("lat", "text", array(
|
68 |
-
"label" => Mage::helper("storelocator")->__("Latitude"),
|
|
|
|
|
69 |
"name" => "lat",
|
70 |
));
|
71 |
|
72 |
$fieldset->addField("longt", "text", array(
|
73 |
-
"label" => Mage::helper("storelocator")->__("Longitude"),
|
|
|
|
|
74 |
"name" => "longt",
|
75 |
));
|
76 |
|
77 |
$fieldset->addField('status', 'select', array(
|
78 |
'label' => Mage::helper('storelocator')->__('Status'),
|
79 |
-
'values' => Mks_Storelocator_Block_Adminhtml_Storelocator_Grid::
|
80 |
'name' => 'status',
|
81 |
));
|
82 |
|
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 |
|
32 |
));
|
33 |
|
34 |
$fieldset->addField("country_id", "text", array(
|
35 |
+
"label" => Mage::helper("storelocator")->__("Country"),
|
36 |
"name" => "country_id",
|
37 |
));
|
38 |
|
55 |
"label" => Mage::helper("storelocator")->__("Store Url"),
|
56 |
"name" => "store_url",
|
57 |
));
|
58 |
+
|
59 |
+
$fieldset->addField("email", "text", array(
|
60 |
+
"label" => Mage::helper("storelocator")->__("Email"),
|
61 |
+
"name" => "email",
|
62 |
+
));
|
63 |
+
|
64 |
+
$fieldset->addField("tradinghours", "text", array(
|
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'),
|
78 |
'name' => '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 |
|
95 |
$fieldset->addField('status', 'select', array(
|
96 |
'label' => Mage::helper('storelocator')->__('Status'),
|
97 |
+
'values' => Mks_Storelocator_Block_Adminhtml_Storelocator_Grid::getValueArray15(),
|
98 |
'name' => 'status',
|
99 |
));
|
100 |
|
app/code/community/Mks/Storelocator/Block/Adminhtml/Storelocator/Grid.php
CHANGED
@@ -8,7 +8,7 @@ class Mks_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 |
|
@@ -41,7 +41,7 @@ class Mks_Storelocator_Block_Adminhtml_Storelocator_Grid extends Mage_Adminhtml_
|
|
41 |
"index" => "city",
|
42 |
));
|
43 |
$this->addColumn("country_id", array(
|
44 |
-
"header" => Mage::helper("storelocator")->__("Country
|
45 |
"index" => "country_id",
|
46 |
));
|
47 |
$this->addColumn("phone", array(
|
@@ -56,6 +56,18 @@ class Mks_Storelocator_Block_Adminhtml_Storelocator_Grid extends Mage_Adminhtml_
|
|
56 |
"header" => Mage::helper("storelocator")->__("Store Url"),
|
57 |
"index" => "store_url",
|
58 |
));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
$this->addColumn("lat", array(
|
60 |
"header" => Mage::helper("storelocator")->__("Latitude"),
|
61 |
"index" => "lat",
|
@@ -68,7 +80,7 @@ class Mks_Storelocator_Block_Adminhtml_Storelocator_Grid extends Mage_Adminhtml_
|
|
68 |
'header' => Mage::helper('storelocator')->__('Status'),
|
69 |
'index' => 'status',
|
70 |
'type' => 'options',
|
71 |
-
'options'=>Mks_Storelocator_Block_Adminhtml_Storelocator_Grid::
|
72 |
));
|
73 |
|
74 |
$this->addExportType('*/*/exportCsv', Mage::helper('sales')->__('CSV'));
|
@@ -97,17 +109,17 @@ class Mks_Storelocator_Block_Adminhtml_Storelocator_Grid extends Mage_Adminhtml_
|
|
97 |
return $this;
|
98 |
}
|
99 |
|
100 |
-
static public function
|
101 |
{
|
102 |
$data_array=array();
|
103 |
-
$data_array[0]='
|
104 |
-
$data_array[1]='
|
105 |
return($data_array);
|
106 |
}
|
107 |
-
static public function
|
108 |
{
|
109 |
$data_array=array();
|
110 |
-
foreach(Mks_Storelocator_Block_Adminhtml_Storelocator_Grid::
|
111 |
$data_array[]=array('value'=>$k,'label'=>$v);
|
112 |
}
|
113 |
return($data_array);
|
8 |
parent::__construct();
|
9 |
$this->setId("storelocatorGrid");
|
10 |
$this->setDefaultSort("id");
|
11 |
+
$this->setDefaultDir("DESC");
|
12 |
$this->setSaveParametersInSession(true);
|
13 |
}
|
14 |
|
41 |
"index" => "city",
|
42 |
));
|
43 |
$this->addColumn("country_id", array(
|
44 |
+
"header" => Mage::helper("storelocator")->__("Country"),
|
45 |
"index" => "country_id",
|
46 |
));
|
47 |
$this->addColumn("phone", array(
|
56 |
"header" => Mage::helper("storelocator")->__("Store Url"),
|
57 |
"index" => "store_url",
|
58 |
));
|
59 |
+
$this->addColumn("email", array(
|
60 |
+
"header" => Mage::helper("storelocator")->__("Email"),
|
61 |
+
"index" => "email",
|
62 |
+
));
|
63 |
+
$this->addColumn("tradinghours", 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",
|
80 |
'header' => Mage::helper('storelocator')->__('Status'),
|
81 |
'index' => 'status',
|
82 |
'type' => 'options',
|
83 |
+
'options'=>Mks_Storelocator_Block_Adminhtml_Storelocator_Grid::getOptionArray15(),
|
84 |
));
|
85 |
|
86 |
$this->addExportType('*/*/exportCsv', Mage::helper('sales')->__('CSV'));
|
109 |
return $this;
|
110 |
}
|
111 |
|
112 |
+
static public function getOptionArray15()
|
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()
|
120 |
{
|
121 |
$data_array=array();
|
122 |
+
foreach(Mks_Storelocator_Block_Adminhtml_Storelocator_Grid::getOptionArray15() as $k=>$v){
|
123 |
$data_array[]=array('value'=>$k,'label'=>$v);
|
124 |
}
|
125 |
return($data_array);
|
app/code/community/Mks/Storelocator/Block/Index.php
CHANGED
@@ -3,6 +3,58 @@ class Mks_Storelocator_Block_Index extends Mage_Core_Block_Template{
|
|
3 |
|
4 |
|
5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
|
8 |
-
}
|
3 |
|
4 |
|
5 |
|
6 |
+
public function getStorelocatorEnabled()
|
7 |
+
{
|
8 |
+
return Mage::getStoreConfig('storelocatorcode/storeloactorsetting/enable',Mage::app()->getStore());
|
9 |
+
}
|
10 |
+
public function getStorelocatorName()
|
11 |
+
{
|
12 |
+
return Mage::getStoreConfig('storelocatorcode/storeloactorfields/name',Mage::app()->getStore());
|
13 |
+
}
|
14 |
+
public function getStorelocatorAddress()
|
15 |
+
{
|
16 |
+
return Mage::getStoreConfig('storelocatorcode/storeloactorfields/address',Mage::app()->getStore());
|
17 |
+
}
|
18 |
+
public function getStorelocatorZipcode()
|
19 |
+
{
|
20 |
+
return Mage::getStoreConfig('storelocatorcode/storeloactorfields/zipcode',Mage::app()->getStore());
|
21 |
+
}
|
22 |
+
public function getStorelocatorCity()
|
23 |
+
{
|
24 |
+
return Mage::getStoreConfig('storelocatorcode/storeloactorfields/city',Mage::app()->getStore());
|
25 |
+
}
|
26 |
+
public function getStorelocatorCountry()
|
27 |
+
{
|
28 |
+
return Mage::getStoreConfig('storelocatorcode/storeloactorfields/Country',Mage::app()->getStore());
|
29 |
+
}
|
30 |
+
public function getStorelocatorPhone()
|
31 |
+
{
|
32 |
+
return Mage::getStoreConfig('storelocatorcode/storeloactorfields/phone',Mage::app()->getStore());
|
33 |
+
}
|
34 |
+
public function getStorelocatorFax()
|
35 |
+
{
|
36 |
+
return Mage::getStoreConfig('storelocatorcode/storeloactorfields/fax',Mage::app()->getStore());
|
37 |
+
}
|
38 |
+
public function getStorelocatorDescription()
|
39 |
+
{
|
40 |
+
return Mage::getStoreConfig('storelocatorcode/storeloactorfields/description',Mage::app()->getStore());
|
41 |
+
}
|
42 |
+
public function getStorelocatorStoreurl()
|
43 |
+
{
|
44 |
+
return Mage::getStoreConfig('storelocatorcode/storeloactorfields/storeurl',Mage::app()->getStore());
|
45 |
+
}
|
46 |
+
public function getStorelocatorEmail()
|
47 |
+
{
|
48 |
+
return Mage::getStoreConfig('storelocatorcode/storeloactorfields/email',Mage::app()->getStore());
|
49 |
+
}
|
50 |
+
public function getStorelocatorTradinghours()
|
51 |
+
{
|
52 |
+
return Mage::getStoreConfig('storelocatorcode/storeloactorfields/tradinghours',Mage::app()->getStore());
|
53 |
+
}
|
54 |
+
public function getStorelocatorImage()
|
55 |
+
{
|
56 |
+
return Mage::getStoreConfig('storelocatorcode/storeloactorfields/image',Mage::app()->getStore());
|
57 |
+
}
|
58 |
|
59 |
|
60 |
+
}
|
app/code/community/Mks/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/Mks/Storelocator/controllers/Adminhtml/StorelocatorbackendController.php
CHANGED
@@ -4,7 +4,7 @@ class Mks_Storelocator_Adminhtml_StorelocatorbackendController extends Mage_Admi
|
|
4 |
public function indexAction()
|
5 |
{
|
6 |
$this->loadLayout();
|
7 |
-
$this->_title($this->__("About
|
8 |
$this->renderLayout();
|
9 |
}
|
10 |
}
|
4 |
public function indexAction()
|
5 |
{
|
6 |
$this->loadLayout();
|
7 |
+
$this->_title($this->__("About Us"));
|
8 |
$this->renderLayout();
|
9 |
}
|
10 |
}
|
app/code/community/Mks/Storelocator/controllers/IndexController.php
CHANGED
@@ -3,7 +3,7 @@ class Mks_Storelocator_IndexController extends Mage_Core_Controller_Front_Action
|
|
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 Mks_Storelocator_IndexController extends Mage_Core_Controller_Front_Action
|
|
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/Mks/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/Mks/Storelocator/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Mks_Storelocator>
|
5 |
-
<version>
|
6 |
</Mks_Storelocator>
|
7 |
</modules>
|
8 |
<frontend>
|
@@ -87,7 +87,7 @@
|
|
87 |
<sort_order>100</sort_order>
|
88 |
<children>
|
89 |
<storelocatorbackend module="storelocator">
|
90 |
-
<title>About
|
91 |
<sort_order>0</sort_order>
|
92 |
<action>storelocator/adminhtml_storelocatorbackend</action>
|
93 |
</storelocatorbackend>
|
@@ -111,7 +111,7 @@
|
|
111 |
<sort_order>1000</sort_order>
|
112 |
<children>
|
113 |
<storelocatorbackend translate="title">
|
114 |
-
<title>About
|
115 |
</storelocatorbackend>
|
116 |
<storelocator translate="title">
|
117 |
<title>Manage Storelocator</title>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Mks_Storelocator>
|
5 |
+
<version>8.1.1</version>
|
6 |
</Mks_Storelocator>
|
7 |
</modules>
|
8 |
<frontend>
|
87 |
<sort_order>100</sort_order>
|
88 |
<children>
|
89 |
<storelocatorbackend module="storelocator">
|
90 |
+
<title>About Us</title>
|
91 |
<sort_order>0</sort_order>
|
92 |
<action>storelocator/adminhtml_storelocatorbackend</action>
|
93 |
</storelocatorbackend>
|
111 |
<sort_order>1000</sort_order>
|
112 |
<children>
|
113 |
<storelocatorbackend translate="title">
|
114 |
+
<title>About Us</title>
|
115 |
</storelocatorbackend>
|
116 |
<storelocator translate="title">
|
117 |
<title>Manage Storelocator</title>
|
app/code/community/Mks/Storelocator/etc/system.xml
ADDED
@@ -0,0 +1,159 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<tabs>
|
4 |
+
<storeloactortab translate="label" module="storelocator">
|
5 |
+
<label>Mks Store Locator</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 |
+
<sort_order>0</sort_order>
|
32 |
+
<show_in_default>1</show_in_default>
|
33 |
+
<show_in_website>1</show_in_website>
|
34 |
+
<show_in_store>1</show_in_store>
|
35 |
+
</name>
|
36 |
+
<address translate="label">
|
37 |
+
<label>Address</label>
|
38 |
+
<frontend_type>select</frontend_type>
|
39 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
40 |
+
<sort_order>1</sort_order>
|
41 |
+
<show_in_default>1</show_in_default>
|
42 |
+
<show_in_website>1</show_in_website>
|
43 |
+
<show_in_store>1</show_in_store>
|
44 |
+
</address>
|
45 |
+
<zipcode translate="label">
|
46 |
+
<label>Zipcode</label>
|
47 |
+
<frontend_type>select</frontend_type>
|
48 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
49 |
+
<sort_order>2</sort_order>
|
50 |
+
<show_in_default>1</show_in_default>
|
51 |
+
<show_in_website>1</show_in_website>
|
52 |
+
<show_in_store>1</show_in_store>
|
53 |
+
</zipcode>
|
54 |
+
<city translate="label">
|
55 |
+
<label>City</label>
|
56 |
+
<frontend_type>select</frontend_type>
|
57 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
58 |
+
<sort_order>3</sort_order>
|
59 |
+
<show_in_default>1</show_in_default>
|
60 |
+
<show_in_website>1</show_in_website>
|
61 |
+
<show_in_store>1</show_in_store>
|
62 |
+
</city>
|
63 |
+
<country translate="label">
|
64 |
+
<label>Country</label>
|
65 |
+
<frontend_type>select</frontend_type>
|
66 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
67 |
+
<sort_order>4</sort_order>
|
68 |
+
<show_in_default>1</show_in_default>
|
69 |
+
<show_in_website>1</show_in_website>
|
70 |
+
<show_in_store>1</show_in_store>
|
71 |
+
</country>
|
72 |
+
<phone translate="label">
|
73 |
+
<label>Phone</label>
|
74 |
+
<frontend_type>select</frontend_type>
|
75 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
76 |
+
<sort_order>5</sort_order>
|
77 |
+
<show_in_default>1</show_in_default>
|
78 |
+
<show_in_website>1</show_in_website>
|
79 |
+
<show_in_store>1</show_in_store>
|
80 |
+
</phone>
|
81 |
+
<fax translate="label">
|
82 |
+
<label>Fax</label>
|
83 |
+
<frontend_type>select</frontend_type>
|
84 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
85 |
+
<sort_order>6</sort_order>
|
86 |
+
<show_in_default>1</show_in_default>
|
87 |
+
<show_in_website>1</show_in_website>
|
88 |
+
<show_in_store>1</show_in_store>
|
89 |
+
</fax>
|
90 |
+
<description translate="label">
|
91 |
+
<label>Description</label>
|
92 |
+
<frontend_type>select</frontend_type>
|
93 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
94 |
+
<sort_order>7</sort_order>
|
95 |
+
<show_in_default>1</show_in_default>
|
96 |
+
<show_in_website>1</show_in_website>
|
97 |
+
<show_in_store>1</show_in_store>
|
98 |
+
</description>
|
99 |
+
<storeurl translate="label">
|
100 |
+
<label>Store URL</label>
|
101 |
+
<frontend_type>select</frontend_type>
|
102 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
103 |
+
<sort_order>8</sort_order>
|
104 |
+
<show_in_default>1</show_in_default>
|
105 |
+
<show_in_website>1</show_in_website>
|
106 |
+
<show_in_store>1</show_in_store>
|
107 |
+
</storeurl>
|
108 |
+
<email translate="label">
|
109 |
+
<label>Email</label>
|
110 |
+
<frontend_type>select</frontend_type>
|
111 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
112 |
+
<sort_order>9</sort_order>
|
113 |
+
<show_in_default>1</show_in_default>
|
114 |
+
<show_in_website>1</show_in_website>
|
115 |
+
<show_in_store>1</show_in_store>
|
116 |
+
</email>
|
117 |
+
<tradinghours translate="label">
|
118 |
+
<label>Trading Hours</label>
|
119 |
+
<frontend_type>select</frontend_type>
|
120 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
121 |
+
<sort_order>10</sort_order>
|
122 |
+
<show_in_default>1</show_in_default>
|
123 |
+
<show_in_website>1</show_in_website>
|
124 |
+
<show_in_store>1</show_in_store>
|
125 |
+
</tradinghours>
|
126 |
+
<image translate="label">
|
127 |
+
<label>Image</label>
|
128 |
+
<frontend_type>select</frontend_type>
|
129 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
130 |
+
<sort_order>11</sort_order>
|
131 |
+
<show_in_default>1</show_in_default>
|
132 |
+
<show_in_website>1</show_in_website>
|
133 |
+
<show_in_store>1</show_in_store>
|
134 |
+
</image>
|
135 |
+
</fields>
|
136 |
+
</storeloactorfields>
|
137 |
+
<storeloactorsetting translate="label">
|
138 |
+
<label>Setting </label>
|
139 |
+
<frontend_type>text</frontend_type>
|
140 |
+
<sort_order>0</sort_order>
|
141 |
+
<show_in_default>1</show_in_default>
|
142 |
+
<show_in_website>1</show_in_website>
|
143 |
+
<show_in_store>1</show_in_store>
|
144 |
+
<fields>
|
145 |
+
<enable translate="label">
|
146 |
+
<label>Staus</label>
|
147 |
+
<frontend_type>select</frontend_type>
|
148 |
+
<source_model>adminhtml/system_config_source_enabledisable</source_model>
|
149 |
+
<sort_order>0</sort_order>
|
150 |
+
<show_in_default>1</show_in_default>
|
151 |
+
<show_in_website>1</show_in_website>
|
152 |
+
<show_in_store>1</show_in_store>
|
153 |
+
</enable>
|
154 |
+
</fields>
|
155 |
+
</storeloactorsetting>
|
156 |
+
</groups>
|
157 |
+
</storelocatorcode>
|
158 |
+
</sections>
|
159 |
+
</config>
|
app/code/community/Mks/Storelocator/sql/storelocator_setup/mysql4-install-1.1.1.php
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
<?php
|
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 |
-
|
13 |
-
$installer->run($sql);
|
14 |
-
//demo
|
15 |
-
Mage::getModel('core/url_rewrite')->setId(null);
|
16 |
-
//demo
|
17 |
-
$installer->endSetup();
|
18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Mks/Storelocator/sql/storelocator_setup/mysql4-install-8.1.1.php
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
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),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 |
+
|
8 |
+
INSERT INTO {$this->getTable('mksstorelocator')} (`name`, `address`, `zipcode`, `city`, `country_id`, `phone`, `fax`, `description`, `store_url`, `image`, `tradinghours`, `radius`, `lat`, `longt`, `status`) VALUES
|
9 |
+
('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'),
|
10 |
+
('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'),
|
11 |
+
('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'),
|
12 |
+
('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');
|
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/template/storelocator/storelocatorbackend.phtml
CHANGED
@@ -1,3 +1 @@
|
|
1 |
-
|
2 |
<iframe src="http://www.magentocommerce.com/magento-connect/developer/mukeshsaini" width="100%" height="1000"></iframe>
|
3 |
-
|
|
|
1 |
<iframe src="http://www.magentocommerce.com/magento-connect/developer/mukeshsaini" width="100%" height="1000"></iframe>
|
|
app/design/frontend/base/default/layout/storelocator.xml
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
-
<layout version="
|
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="8.1.1">
|
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
CHANGED
@@ -8,20 +8,22 @@ $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 |
|
20 |
var miles = 3;
|
21 |
var latitude = x; // parseFloat("26.850883100000000000");
|
22 |
var longitude = y; // parseFloat("75.824783600000040000");
|
23 |
var address = z; // "Rohini, New Delhi, Delhi, India";
|
24 |
-
var radius =
|
25 |
|
26 |
var latlngPos = new google.maps.LatLng(latitude,longitude);
|
27 |
|
@@ -47,7 +49,5 @@ var miles = 3;
|
|
47 |
} google.maps.event.addDomListener(window, 'load', initialize);
|
48 |
</script>
|
49 |
|
50 |
-
<body onload="map_xxx('<?php echo $latitudex ?>','<?php echo $longitudex; ?>','<?php echo $addressx; ?>');">
|
51 |
-
<?php
|
52 |
-
$sql = $connection->query("select * from $tblname where status='0'" );
|
53 |
-
?>
|
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 |
|
49 |
} google.maps.event.addDomListener(window, 'load', initialize);
|
50 |
</script>
|
51 |
|
52 |
+
<body onload="map_xxx('<?php echo $latitudex ?>','<?php echo $longitudex; ?>','<?php echo $addressx; ?>','<?php echo $radius; ?>');">
|
53 |
+
<?php $sql = $connection->query("select * from $tblname where status='0'" ); ?>
|
|
|
|
app/design/frontend/base/default/template/storelocator/index.phtml
CHANGED
@@ -1,3 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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;" >
|
@@ -6,32 +21,48 @@ 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 |
|
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 |
<table id="map_xxx" style="width:900px; border:10px;">
|
18 |
<tr><td style="height: 500px; overflow: auto; display:block;" >
|
21 |
{?>
|
22 |
<table id="store-table" class="store-table" style="margin-bottom:10px;">
|
23 |
<tr>
|
24 |
+
<?php if($image==1) { ?>
|
25 |
<td class="left">
|
26 |
<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;">
|
27 |
</td>
|
28 |
+
<?php } ?>
|
29 |
<td class="right" style="width:250px;">
|
30 |
<table class="mintbl">
|
31 |
<tr>
|
32 |
+
<?php if($name==1) { ?>
|
33 |
<td>
|
34 |
+
<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>
|
35 |
</td>
|
36 |
+
<?php } ?>
|
37 |
</tr>
|
38 |
+
<?php if($address==1) { ?>
|
39 |
<tr><td class="col-address"><?php echo $row['address']; ?></td></tr>
|
40 |
+
<?php } ?>
|
41 |
<tr><td class="col-address">
|
42 |
+
<?php if($zipcode==1) { ?>
|
43 |
Zip Code : <?php echo $row['zipcode']; ?> ,
|
44 |
+
<?php } ?>
|
45 |
+
<?php if($city==1) { ?>
|
46 |
City : <?php echo $row['city']; ?>
|
47 |
+
<?php } ?>
|
48 |
</td></tr>
|
49 |
+
|
50 |
<tr><td class="col-address">
|
51 |
+
<?php if($country==1) { ?> Country : <?php echo $row['country_id']; ?> , <?php } ?>
|
52 |
+
<?php if($phone==1) { ?> Phone : <?php echo $row['phone']; ?> <?php } ?>
|
53 |
</td></tr>
|
54 |
+
<?php if($fax==1) { ?>
|
55 |
<tr><td>Fax :<?php echo $row['fax']; ?></td></tr>
|
56 |
+
<?php } ?>
|
57 |
</table>
|
58 |
</td>
|
59 |
</tr>
|
60 |
+
<?php if($stireurl==1) { ?>
|
61 |
<tr><td colspan="2"> Website : <a href="<?php echo $row['store_url']; ?>" target="_blank"><?php echo $row['store_url']; ?></a></td></tr>
|
62 |
+
<?php } ?>
|
63 |
+
<?php if($address==1) { ?>
|
64 |
<tr><td colspan="2"> <?php echo $row['description']; ?></td></tr>
|
65 |
+
<?php } ?>
|
66 |
</table>
|
67 |
<?php } ?>
|
68 |
|
app/design/frontend/base/default/template/storelocator/new_index.phtml
ADDED
@@ -0,0 +1,143 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
|
17 |
+
<?php
|
18 |
+
$connection = Mage::getSingleton('core/resource')->getConnection('core_write');
|
19 |
+
$sql1 = $connection->query("select * from mksstorelocator order by id limit 1" );
|
20 |
+
$row1 = $sql1->fetch();
|
21 |
+
$latitudex = $row1['lat'];
|
22 |
+
$longitudex = $row1['longt'];
|
23 |
+
$addressx = $row1['address'];
|
24 |
+
$radius = $row1['radius'];
|
25 |
+
|
26 |
+
?>
|
27 |
+
|
28 |
+
<script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
|
29 |
+
<script src="https://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>
|
30 |
+
<script type="text/javascript">
|
31 |
+
|
32 |
+
function map_xxx(x,y,z,r)
|
33 |
+
{
|
34 |
+
|
35 |
+
var miles = 3;
|
36 |
+
var latitude = x; // parseFloat("26.850883100000000000");
|
37 |
+
var longitude = y; // parseFloat("75.824783600000040000");
|
38 |
+
var address = z; // "Rohini, New Delhi, Delhi, India";
|
39 |
+
var radius = r; // "Rohini, New Delhi, Delhi, India";
|
40 |
+
|
41 |
+
var latlngPos = new google.maps.LatLng(latitude,longitude);
|
42 |
+
|
43 |
+
// Set up options for the Google map
|
44 |
+
var map = new google.maps.Map(document.getElementById("map"), {
|
45 |
+
zoom: 14,
|
46 |
+
|
47 |
+
center: latlngPos,
|
48 |
+
mapTypeId: google.maps.MapTypeId.ROADMAP
|
49 |
+
});
|
50 |
+
// draw circle
|
51 |
+
|
52 |
+
var circle = new google.maps.Circle({
|
53 |
+
center: latlngPos,
|
54 |
+
radius: miles *radius,
|
55 |
+
fillColor: "#ff69b4",
|
56 |
+
fillOpacity: 0.2,
|
57 |
+
strokeOpacity: 0.0,
|
58 |
+
strokeWeight: 0,
|
59 |
+
map: map
|
60 |
+
});
|
61 |
+
|
62 |
+
} google.maps.event.addDomListener(window, 'load', initialize);
|
63 |
+
</script>
|
64 |
+
|
65 |
+
<body onload="map_xxx('<?php echo $latitudex ?>','<?php echo $longitudex; ?>','<?php echo $addressx; ?>','<?php echo $radius; ?>');">
|
66 |
+
|
67 |
+
<table id="map_xxx" style="width:900px; border:10px;">
|
68 |
+
<tr><td style="width:400px;">
|
69 |
+
<?php
|
70 |
+
$sql = $connection->query("select * from mksstorelocator" );
|
71 |
+
while($row = $sql->fetch())
|
72 |
+
{?>
|
73 |
+
<table id="store-table" class="store-table">
|
74 |
+
<?php if($image==1) { ?>
|
75 |
+
<tr>
|
76 |
+
<td rowspan="10" class="store-image">
|
77 |
+
<img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).$row['image']; ?>" width="100">
|
78 |
+
</td>
|
79 |
+
</tr>
|
80 |
+
<?php } ?>
|
81 |
+
<?php if($name==1) { ?>
|
82 |
+
<tr>
|
83 |
+
<td>
|
84 |
+
<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>
|
85 |
+
</td>
|
86 |
+
</tr>
|
87 |
+
<?php } ?>
|
88 |
+
<?php if($address==1) { ?>
|
89 |
+
<tr>
|
90 |
+
<td class="col-address"><?php echo $row['address']; ?></td>
|
91 |
+
</tr>
|
92 |
+
<?php } ?>
|
93 |
+
<?php if($city==1) { ?>
|
94 |
+
<tr>
|
95 |
+
<?php
|
96 |
+
$add = $row['city']." ".$row['zipcode'];
|
97 |
+
?>
|
98 |
+
<td class="col-address"><?php echo $add; ?></td>
|
99 |
+
</tr>
|
100 |
+
<?php } ?>
|
101 |
+
<?php if($country==1) { ?>
|
102 |
+
<tr>
|
103 |
+
<td class="col-address"><?php echo $row['country_id']; ?> </td>
|
104 |
+
</tr>
|
105 |
+
<?php } ?>
|
106 |
+
<?php if($stireurl==1) { ?>
|
107 |
+
<tr>
|
108 |
+
<td>Website : <a href="<?php echo $row['store_url']; ?>" target="_blank"><?php echo $row['store_url']; ?></a></td>
|
109 |
+
</tr>
|
110 |
+
<?php } ?>
|
111 |
+
<?php if($phone==1) { ?>
|
112 |
+
<tr>
|
113 |
+
<td> Phone :<?php echo $row['phone']; ?> </td>
|
114 |
+
</tr>
|
115 |
+
<?php } ?>
|
116 |
+
<?php if($email==1) { ?>
|
117 |
+
<tr>
|
118 |
+
<td> Email :
|
119 |
+
<a href="mailto:<?php echo $row['email']; ?>?Subject=Store%20Location" target="_top">
|
120 |
+
<?php echo $row['email']; ?></a>
|
121 |
+
</td>
|
122 |
+
</tr>
|
123 |
+
<?php } ?>
|
124 |
+
<?php if($tradinghours==1) { ?>
|
125 |
+
<tr>
|
126 |
+
<td> Trading Hours :<?php echo $row['tradinghours']; ?></td>
|
127 |
+
</tr>
|
128 |
+
<?php } ?>
|
129 |
+
<?php if($fax==1) { ?>
|
130 |
+
<tr>
|
131 |
+
<td> Fax :<?php echo $row['fax']; ?></td>
|
132 |
+
</tr>
|
133 |
+
<?php } ?>
|
134 |
+
|
135 |
+
</table>
|
136 |
+
<?php } ?>
|
137 |
+
|
138 |
+
</td>
|
139 |
+
|
140 |
+
<td style="width:500px;">
|
141 |
+
<div id="map" style="width:500px; height:500px;"></div>
|
142 |
+
</td></tr></table>
|
143 |
+
|
app/etc/modules/Mks_Storelocator.xml
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
<Mks_Storelocator>
|
5 |
<active>true</active>
|
6 |
<codePool>community</codePool>
|
7 |
-
<version>
|
8 |
</Mks_Storelocator>
|
9 |
</modules>
|
10 |
</config>
|
4 |
<Mks_Storelocator>
|
5 |
<active>true</active>
|
6 |
<codePool>community</codePool>
|
7 |
+
<version>8.1.1</version>
|
8 |
</Mks_Storelocator>
|
9 |
</modules>
|
10 |
</config>
|
media/storelocator/storelocator/14948.jpg
ADDED
Binary file
|
media/storelocator/storelocator/apsara-non-dust.jpg
ADDED
Binary file
|
package.xml
CHANGED
@@ -1,18 +1,23 @@
|
|
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>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>
|
|
|
|
|
|
|
|
|
|
|
12 |
<authors><author><name>mukesh kumar saini</name><user>mukeshbagri</user><email>in.mukeshsaini@gmail.com</email></author></authors>
|
13 |
-
<date>2014-03-
|
14 |
-
<time>
|
15 |
-
<contents><target name="mageetc"><dir name="modules"><file name="Mks_Storelocator.xml" 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>Mks_Storelocator</name>
|
4 |
+
<version>8.1.1</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>Add New Feature :- 
|
12 |
+
1. Module Configuration Setting (left menu)
|
13 |
+
2. Auto Data Load.
|
14 |
+
3. One Click Run Module
|
15 |
+
4. Radius Functionality.
|
16 |
+
5. user friendly admin.</notes>
|
17 |
<authors><author><name>mukesh kumar saini</name><user>mukeshbagri</user><email>in.mukeshsaini@gmail.com</email></author></authors>
|
18 |
+
<date>2014-03-21</date>
|
19 |
+
<time>11:42:44</time>
|
20 |
+
<contents><target name="mageetc"><dir name="modules"><file name="Mks_Storelocator.xml" hash="5db52931092f06e184dc599fd0277229"/></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="da3f13dd930a591372ad0c14796c1e54"/></dir><file name="Tabs.php" hash="8819f35cd4af4b61d14bf377c58432b6"/></dir><file name="Edit.php" hash="9be35d036a69cfb545d2f1c1649cb6ba"/><file name="Grid.php" hash="da9a9f1d7359078f7f388440020b2c3e"/></dir><file name="Storelocator.php" hash="81770ec5e092a177c22e188b8db38d7e"/><file name="Storelocatorbackend.php" hash="d600cb8ff797f008c7c652a299305c8d"/></dir><file name="Index.php" hash="4a9374eced7efc8e0dc9aafb9ff3cef4"/></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="1c8564c74994999c3e5177450b64241b"/><file name="StorelocatorbackendController.php" hash="342691ea69bd91fed7db67032fa69e32"/></dir><file name="IndexController.php" hash="852566fcfe7bf18f80926d04af88821e"/></dir><dir name="etc"><file name="adminhtml.xml" hash="49f58436b0c5e5d0ff6ed5b2f7eb0b8a"/><file name="config.xml" hash="aa5b1df1e9cbf67ea541db01f5ccc23b"/><file name="system.xml" hash="e903fefb54e74e5db482baee62d46185"/></dir><dir name="sql"><dir name="storelocator_setup"><file name="mysql4-install-8.1.1.php" hash="a6c9e74024278161f3ed0653dfbc9eb0"/></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="df18a76ac5d10cd61c8cd0b9fa2ee247"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="storelocator.xml" hash="5f5622865dce575fa97450411d8ec442"/></dir><dir name="template"><dir name="storelocator"><file name="config.phtml" hash="06c55a32961c8fa4dfa5118803fe1f93"/><file name="index.phtml" hash="5f45649f707a68475ae8e4e513acd64e"/><file name="new_index.phtml" hash="29c6340d08453dffa1c599bad1aab994"/></dir></dir></dir></dir></dir></target><target name="magemedia"><dir name="storelocator"><dir name="storelocator"><file name="14948.jpg" hash="cf7b5d700a4d3ed77ddb842de67ac0bc"/><file name="apsara-non-dust.jpg" hash="643b2a73671d1e352265ff49412c8c72"/><file name="map1.jpg" hash="a27ada4df9c7106527e4db655c7d15ed"/><file name="map2.jpg" hash="d632084de7a0e99a8eeb4a3720be3066"/><file name="map3.jpg" hash="bd06793b455379880266505f5ea49b81"/></dir></dir></target></contents>
|
21 |
<compatible/>
|
22 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
23 |
</package>
|