Version Notes
This is stable version of this extension and has been tested on various version of community editions. In this particular version we are supporting it to run on PHP V 5.5.X.
Download this release
Release Info
Developer | Rave Infosys |
Extension | Raveinfosys_sitemap |
Version | 1.0.7 |
Comparing to | |
See all releases |
Code changes from version 1.0.6 to 1.0.7
- app/code/community/Raveinfosys/Showmap/Block/Adminhtml/Showmap.php +12 -9
- app/code/community/Raveinfosys/Showmap/Block/Adminhtml/Showmap/Edit.php +7 -5
- app/code/community/Raveinfosys/Showmap/Block/Adminhtml/Showmap/Edit/Config.php +18 -18
- app/code/community/Raveinfosys/Showmap/Block/Adminhtml/Showmap/Edit/Form.php +16 -14
- app/code/community/Raveinfosys/Showmap/Block/Adminhtml/Showmap/Edit/Tab/Config.php +123 -146
- app/code/community/Raveinfosys/Showmap/Block/Adminhtml/Showmap/Edit/Tab/Form.php +129 -129
- app/code/community/Raveinfosys/Showmap/Block/Adminhtml/Showmap/Edit/Tabs.php +19 -18
- app/code/community/Raveinfosys/Showmap/Block/Showmap.php +23 -19
- app/code/community/Raveinfosys/Showmap/Helper/Data.php +1 -1
- app/code/community/Raveinfosys/Showmap/Model/Config.php +12 -12
- app/code/community/Raveinfosys/Showmap/Model/Mysql4/Config.php +4 -2
- app/code/community/Raveinfosys/Showmap/Model/Mysql4/Config/Collection.php +3 -1
- app/code/community/Raveinfosys/Showmap/Model/Mysql4/Showmap.php +4 -2
- app/code/community/Raveinfosys/Showmap/Model/Mysql4/Showmap/Collection.php +3 -1
- app/code/community/Raveinfosys/Showmap/Model/Showmap.php +218 -239
- app/code/community/Raveinfosys/Showmap/controllers/Adminhtml/ShowmapController.php +54 -56
- app/code/community/Raveinfosys/Showmap/controllers/IndexController.php +9 -6
- app/code/community/Raveinfosys/Showmap/etc/config.xml +1 -1
- app/code/community/Raveinfosys/Showmap/sql/showmap_setup/mysql4-install-0.1.0.php +6 -6
- app/code/community/Raveinfosys/Showresponse/Block/Adminhtml/Showresponse.php +12 -9
- app/code/community/Raveinfosys/Showresponse/Block/Adminhtml/Showresponse/Description.php +8 -4
- app/code/community/Raveinfosys/Showresponse/Block/Adminhtml/Showresponse/Grid.php +73 -73
- app/code/community/Raveinfosys/Showresponse/Helper/Data.php +1 -1
- app/code/community/Raveinfosys/Showresponse/Model/Mysql4/Showresponse.php +4 -2
- app/code/community/Raveinfosys/Showresponse/Model/Mysql4/Showresponse/Collection.php +3 -1
- app/code/community/Raveinfosys/Showresponse/Model/Showresponse.php +11 -9
- app/code/community/Raveinfosys/Showresponse/controllers/Adminhtml/ShowresponseController.php +45 -52
- app/code/community/Raveinfosys/Showresponse/etc/config.xml +1 -1
- app/code/community/Raveinfosys/Showresponse/sql/showresponse_setup/mysql4-install-0.1.0.php +4 -4
- app/design/frontend/base/default/template/showmap/showmap.phtml +84 -87
- package.xml +8 -8
app/code/community/Raveinfosys/Showmap/Block/Adminhtml/Showmap.php
CHANGED
@@ -1,12 +1,15 @@
|
|
1 |
<?php
|
|
|
2 |
class Raveinfosys_Showmap_Block_Adminhtml_Showmap extends Mage_Adminhtml_Block_Widget_Grid_Container
|
3 |
{
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
}
|
|
|
|
1 |
<?php
|
2 |
+
|
3 |
class Raveinfosys_Showmap_Block_Adminhtml_Showmap extends Mage_Adminhtml_Block_Widget_Grid_Container
|
4 |
{
|
5 |
+
|
6 |
+
public function __construct()
|
7 |
+
{
|
8 |
+
$this->_controller = 'adminhtml_showmap';
|
9 |
+
$this->_blockGroup = 'showmap';
|
10 |
+
$this->_headerText = Mage::helper('showmap')->__('sitemap');
|
11 |
+
$this->_addButtonLabel = Mage::helper('showmap')->__('site map');
|
12 |
+
parent::__construct();
|
13 |
+
}
|
14 |
+
|
15 |
+
}
|
app/code/community/Raveinfosys/Showmap/Block/Adminhtml/Showmap/Edit.php
CHANGED
@@ -2,14 +2,15 @@
|
|
2 |
|
3 |
class Raveinfosys_Showmap_Block_Adminhtml_Showmap_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
|
4 |
{
|
|
|
5 |
public function __construct()
|
6 |
{
|
7 |
-
parent::__construct();
|
8 |
-
|
9 |
$this->_objectId = 'id';
|
10 |
$this->_blockGroup = 'showmap';
|
11 |
$this->_controller = 'adminhtml_showmap';
|
12 |
-
|
13 |
$this->_updateButton('save', 'label', Mage::helper('showmap')->__('Save'));
|
14 |
|
15 |
$this->_formScripts[] = "
|
@@ -29,10 +30,11 @@ class Raveinfosys_Showmap_Block_Adminhtml_Showmap_Edit extends Mage_Adminhtml_Bl
|
|
29 |
|
30 |
public function getHeaderText()
|
31 |
{
|
32 |
-
if(
|
33 |
return Mage::helper('showmap')->__("Edit Item '%s'", $this->htmlEscape(Mage::registry('showmap_data')->getTitle()));
|
34 |
} else {
|
35 |
return Mage::helper('showmap')->__('Site Map');
|
36 |
}
|
37 |
}
|
38 |
-
|
|
2 |
|
3 |
class Raveinfosys_Showmap_Block_Adminhtml_Showmap_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
|
4 |
{
|
5 |
+
|
6 |
public function __construct()
|
7 |
{
|
8 |
+
parent::__construct();
|
9 |
+
|
10 |
$this->_objectId = 'id';
|
11 |
$this->_blockGroup = 'showmap';
|
12 |
$this->_controller = 'adminhtml_showmap';
|
13 |
+
|
14 |
$this->_updateButton('save', 'label', Mage::helper('showmap')->__('Save'));
|
15 |
|
16 |
$this->_formScripts[] = "
|
30 |
|
31 |
public function getHeaderText()
|
32 |
{
|
33 |
+
if (Mage::registry('showmap_data') && Mage::registry('showmap_data')->getId()) {
|
34 |
return Mage::helper('showmap')->__("Edit Item '%s'", $this->htmlEscape(Mage::registry('showmap_data')->getTitle()));
|
35 |
} else {
|
36 |
return Mage::helper('showmap')->__('Site Map');
|
37 |
}
|
38 |
}
|
39 |
+
|
40 |
+
}
|
app/code/community/Raveinfosys/Showmap/Block/Adminhtml/Showmap/Edit/Config.php
CHANGED
@@ -3,22 +3,22 @@
|
|
3 |
class Raveinfosys_Showmap_Block_Adminhtml_Showmap_Edit_Config extends Mage_Adminhtml_Block_Widget_Tabs
|
4 |
{
|
5 |
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
}
|
3 |
class Raveinfosys_Showmap_Block_Adminhtml_Showmap_Edit_Config extends Mage_Adminhtml_Block_Widget_Tabs
|
4 |
{
|
5 |
|
6 |
+
public function __construct()
|
7 |
+
{
|
8 |
+
parent::__construct();
|
9 |
+
$this->setId('showmap_config');
|
10 |
+
$this->setDestElementId('config_form');
|
11 |
+
$this->setTitle(Mage::helper('showmap')->__('Configuration'));
|
12 |
+
}
|
13 |
|
14 |
+
protected function _beforeToHtml()
|
15 |
+
{
|
16 |
+
$this->addTab('form_section', array(
|
17 |
+
'label' => Mage::helper('showmap')->__('Configuration'),
|
18 |
+
'title' => Mage::helper('showmap')->__('Sitemap'),
|
19 |
+
));
|
20 |
+
|
21 |
+
return parent::_beforeToHtml();
|
22 |
+
}
|
23 |
+
|
24 |
+
}
|
app/code/community/Raveinfosys/Showmap/Block/Adminhtml/Showmap/Edit/Form.php
CHANGED
@@ -2,18 +2,20 @@
|
|
2 |
|
3 |
class Raveinfosys_Showmap_Block_Adminhtml_Showmap_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
|
4 |
{
|
5 |
-
protected function _prepareForm()
|
6 |
-
{
|
7 |
-
$form = new Varien_Data_Form(array(
|
8 |
-
'id' => 'edit_form',
|
9 |
-
'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
|
10 |
-
'method' => 'post',
|
11 |
-
'enctype' => 'multipart/form-data'
|
12 |
-
)
|
13 |
-
);
|
14 |
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
class Raveinfosys_Showmap_Block_Adminhtml_Showmap_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
|
4 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
+
protected function _prepareForm()
|
7 |
+
{
|
8 |
+
$form = new Varien_Data_Form(array(
|
9 |
+
'id' => 'edit_form',
|
10 |
+
'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
|
11 |
+
'method' => 'post',
|
12 |
+
'enctype' => 'multipart/form-data'
|
13 |
+
)
|
14 |
+
);
|
15 |
+
|
16 |
+
$form->setUseContainer(true);
|
17 |
+
$this->setForm($form);
|
18 |
+
return parent::_prepareForm();
|
19 |
+
}
|
20 |
+
|
21 |
+
}
|
app/code/community/Raveinfosys/Showmap/Block/Adminhtml/Showmap/Edit/Tab/Config.php
CHANGED
@@ -2,161 +2,138 @@
|
|
2 |
|
3 |
class Raveinfosys_Showmap_Block_Adminhtml_Showmap_Edit_Tab_Config extends Mage_Adminhtml_Block_Widget_Form
|
4 |
{
|
5 |
-
protected function _prepareForm()
|
6 |
-
{
|
7 |
-
|
8 |
-
$config = Mage::getModel('showmap/config');
|
9 |
-
$row = $config->getRow();
|
10 |
-
$category = $row['category'];
|
11 |
-
$form = new Varien_Data_Form(array(
|
12 |
-
'id' => 'config_form',
|
13 |
-
'action' => $this->getUrl('*/*/config', array('id' => $this->getRequest()->getParam('id'))),
|
14 |
-
'method' => 'post',
|
15 |
-
'enctype' => 'multipart/form-data'
|
16 |
-
));
|
17 |
-
$form->setUseContainer(true);
|
18 |
-
$this->setForm($form);
|
19 |
-
$fieldset = $form->addFieldset('showmap_form', array('legend'=>Mage::helper('showmap')->__('Configuration')));
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
if($row['category']=='yes')
|
24 |
-
{
|
25 |
-
$fieldset->addField('category', 'select', array(
|
26 |
-
'name' => 'category',
|
27 |
-
'label' => 'Show Categories',
|
28 |
-
'align' =>'left',
|
29 |
-
'values' => array(
|
30 |
-
array(
|
31 |
-
'value' => yes,
|
32 |
-
'label' => Mage::helper('showmap')->__('Yes'),),
|
33 |
|
34 |
-
|
35 |
-
|
36 |
-
'label' => Mage::helper('showmap')->__('No')))));
|
37 |
-
}
|
38 |
-
else
|
39 |
-
{
|
40 |
-
$fieldset->addField('category', 'select', array(
|
41 |
-
'name' => 'category',
|
42 |
-
'label' => 'Show Categories',
|
43 |
-
'align' =>'left',
|
44 |
-
'values' => array(
|
45 |
-
array(
|
46 |
-
'value' => no,
|
47 |
-
'label' => Mage::helper('showmap')->__('No'),),
|
48 |
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
array(
|
62 |
-
'value' => yes,
|
63 |
-
'label' => Mage::helper('showmap')->__('Yes'),),
|
64 |
|
65 |
-
array(
|
66 |
-
'value' => no,
|
67 |
-
'label' => Mage::helper('showmap')->__('No')))));
|
68 |
-
}
|
69 |
-
else
|
70 |
-
{
|
71 |
-
$fieldset->addField('product', 'select', array(
|
72 |
-
'name' => 'product',
|
73 |
-
'label' => 'Show Products',
|
74 |
-
'align' =>'left',
|
75 |
-
'values' => array(
|
76 |
-
array(
|
77 |
-
'value' => no,
|
78 |
-
'label' => Mage::helper('showmap')->__('No'),),
|
79 |
|
80 |
-
array(
|
81 |
-
'value' => yes,
|
82 |
-
'label' => Mage::helper('showmap')->__('Yes')))));
|
83 |
-
}
|
84 |
-
|
85 |
-
|
86 |
-
if($row['cms']=='yes')
|
87 |
-
{
|
88 |
-
$fieldset->addField('cms', 'select', array(
|
89 |
-
'name' => 'cms',
|
90 |
-
'label' => 'Show CMS Pages',
|
91 |
-
'align' =>'left',
|
92 |
-
'values' => array(
|
93 |
-
array(
|
94 |
-
'value' => yes,
|
95 |
-
'label' => Mage::helper('showmap')->__('Yes'),),
|
96 |
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
|
128 |
-
array(
|
129 |
-
'value' => no,
|
130 |
-
'label' => Mage::helper('showmap')->__('No')))));
|
131 |
-
}
|
132 |
-
else
|
133 |
-
{
|
134 |
-
$fieldset->addField('other', 'select', array(
|
135 |
-
'name' => 'other',
|
136 |
-
'label' => 'Show Header And Footer',
|
137 |
-
'align' =>'left',
|
138 |
-
'values' => array(
|
139 |
-
array(
|
140 |
-
'value' => no,
|
141 |
-
'label' => Mage::helper('showmap')->__('No'),),
|
142 |
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
font-style:normal; ',
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
return parent::_prepareForm();
|
156 |
-
}
|
157 |
|
|
|
|
|
158 |
|
159 |
}
|
160 |
-
|
161 |
-
|
162 |
-
|
2 |
|
3 |
class Raveinfosys_Showmap_Block_Adminhtml_Showmap_Edit_Tab_Config extends Mage_Adminhtml_Block_Widget_Form
|
4 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
+
protected function _prepareForm()
|
7 |
+
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
+
$config = Mage::getModel('showmap/config');
|
10 |
+
$row = $config->getRow();
|
11 |
+
$category = $row['category'];
|
12 |
+
$form = new Varien_Data_Form(array(
|
13 |
+
'id' => 'config_form',
|
14 |
+
'action' => $this->getUrl('*/*/config', array('id' => $this->getRequest()->getParam('id'))),
|
15 |
+
'method' => 'post',
|
16 |
+
'enctype' => 'multipart/form-data'
|
17 |
+
));
|
18 |
+
$form->setUseContainer(true);
|
19 |
+
$this->setForm($form);
|
20 |
+
$fieldset = $form->addFieldset('showmap_form', array('legend' => Mage::helper('showmap')->__('Configuration')));
|
|
|
|
|
|
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
+
if ($row['category'] == 'yes') {
|
25 |
+
$fieldset->addField('category', 'select', array(
|
26 |
+
'name' => 'category',
|
27 |
+
'label' => 'Show Categories',
|
28 |
+
'align' => 'left',
|
29 |
+
'values' => array(
|
30 |
+
array(
|
31 |
+
'value' => 'yes',
|
32 |
+
'label' => Mage::helper('showmap')->__('Yes'),),
|
33 |
+
array(
|
34 |
+
'value' => 'no',
|
35 |
+
'label' => Mage::helper('showmap')->__('No')))));
|
36 |
+
} else {
|
37 |
+
$fieldset->addField('category', 'select', array(
|
38 |
+
'name' => 'category',
|
39 |
+
'label' => 'Show Categories',
|
40 |
+
'align' => 'left',
|
41 |
+
'values' => array(
|
42 |
+
array(
|
43 |
+
'value' => 'no',
|
44 |
+
'label' => Mage::helper('showmap')->__('No'),),
|
45 |
+
array(
|
46 |
+
'value' => 'yes',
|
47 |
+
'label' => Mage::helper('showmap')->__('Yes')))));
|
48 |
+
}
|
49 |
|
50 |
+
if ($row['product'] == 'yes') {
|
51 |
+
$fieldset->addField('product', 'select', array(
|
52 |
+
'name' => 'product',
|
53 |
+
'label' => 'Show Products',
|
54 |
+
'align' => 'left',
|
55 |
+
'values' => array(
|
56 |
+
array(
|
57 |
+
'value' => 'yes',
|
58 |
+
'label' => Mage::helper('showmap')->__('Yes'),),
|
59 |
+
array(
|
60 |
+
'value' => 'no',
|
61 |
+
'label' => Mage::helper('showmap')->__('No')))));
|
62 |
+
} else {
|
63 |
+
$fieldset->addField('product', 'select', array(
|
64 |
+
'name' => 'product',
|
65 |
+
'label' => 'Show Products',
|
66 |
+
'align' => 'left',
|
67 |
+
'values' => array(
|
68 |
+
array(
|
69 |
+
'value' => 'no',
|
70 |
+
'label' => Mage::helper('showmap')->__('No'),),
|
71 |
+
array(
|
72 |
+
'value' => 'yes',
|
73 |
+
'label' => Mage::helper('showmap')->__('Yes')))));
|
74 |
+
}
|
75 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
|
77 |
+
if ($row['cms'] == 'yes') {
|
78 |
+
$fieldset->addField('cms', 'select', array(
|
79 |
+
'name' => 'cms',
|
80 |
+
'label' => 'Show CMS Pages',
|
81 |
+
'align' => 'left',
|
82 |
+
'values' => array(
|
83 |
+
array(
|
84 |
+
'value' => 'yes',
|
85 |
+
'label' => Mage::helper('showmap')->__('Yes'),),
|
86 |
+
array(
|
87 |
+
'value' => 'no',
|
88 |
+
'label' => Mage::helper('showmap')->__('No')))));
|
89 |
+
} else {
|
90 |
+
$fieldset->addField('cms', 'select', array(
|
91 |
+
'name' => 'cms',
|
92 |
+
'label' => 'Show CMS Pages',
|
93 |
+
'align' => 'left',
|
94 |
+
'values' => array(
|
95 |
+
array(
|
96 |
+
'value' => 'no',
|
97 |
+
'label' => Mage::helper('showmap')->__('No'),),
|
98 |
+
array(
|
99 |
+
'value' => 'yes',
|
100 |
+
'label' => Mage::helper('showmap')->__('Yes')))));
|
101 |
+
}
|
102 |
+
|
103 |
+
if ($row['other'] == 'yes') {
|
104 |
+
$fieldset->addField('other', 'select', array(
|
105 |
+
'name' => 'other',
|
106 |
+
'label' => 'Show Header And Footer',
|
107 |
+
'align' => 'left',
|
108 |
+
'values' => array(
|
109 |
+
array(
|
110 |
+
'value' => 'yes',
|
111 |
+
'label' => Mage::helper('showmap')->__('Yes'),),
|
112 |
+
array(
|
113 |
+
'value' => 'no',
|
114 |
+
'label' => Mage::helper('showmap')->__('No')))));
|
115 |
+
} else {
|
116 |
+
$fieldset->addField('other', 'select', array(
|
117 |
+
'name' => 'other',
|
118 |
+
'label' => 'Show Header And Footer',
|
119 |
+
'align' => 'left',
|
120 |
+
'values' => array(
|
121 |
+
array(
|
122 |
+
'value' => 'no',
|
123 |
+
'label' => Mage::helper('showmap')->__('No'),),
|
124 |
+
array(
|
125 |
+
'value' => 'yes',
|
126 |
+
'label' => Mage::helper('showmap')->__('Yes')))));
|
127 |
+
}
|
128 |
+
$fieldset->addField('submit', 'submit', array(
|
129 |
+
'value' => 'Save',
|
130 |
+
'after_element_html' => '<small></small>',
|
131 |
+
'style' => 'background-color:#FF6600; width:70px; color:white;font-family:Arial, Helvetica, sans-serif;
|
132 |
font-style:normal; ',
|
133 |
+
'tabindex' => 1
|
134 |
+
));
|
|
|
|
|
|
|
135 |
|
136 |
+
return parent::_prepareForm();
|
137 |
+
}
|
138 |
|
139 |
}
|
|
|
|
|
|
app/code/community/Raveinfosys/Showmap/Block/Adminhtml/Showmap/Edit/Tab/Form.php
CHANGED
@@ -2,138 +2,138 @@
|
|
2 |
|
3 |
class Raveinfosys_Showmap_Block_Adminhtml_Showmap_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
|
4 |
{
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
|
|
|
|
124 |
'after_element_html' => '<div id ="label" style=visibility:hidden;>Yahoo App Id</div>'));
|
125 |
-
|
126 |
-
|
127 |
'label' => Mage::helper('showmap')->__(''),
|
128 |
-
|
129 |
'name' => 'yahoo_id',
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
return parent::_prepareForm();
|
135 |
|
136 |
-
}
|
137 |
|
|
|
|
|
138 |
|
139 |
-
}
|
2 |
|
3 |
class Raveinfosys_Showmap_Block_Adminhtml_Showmap_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
|
4 |
{
|
5 |
+
|
6 |
+
protected function _prepareForm()
|
7 |
+
{
|
8 |
+
$showmap = Mage::getModel('showmap/showmap');
|
9 |
+
$row = $showmap->getRow();
|
10 |
+
|
11 |
+
$google = false;
|
12 |
+
$bing = false;
|
13 |
+
$window = false;
|
14 |
+
$yahoo = false;
|
15 |
+
|
16 |
+
if ($row['google'] == 'yes')
|
17 |
+
$google = true;
|
18 |
+
if ($row['bing'] == 'yes')
|
19 |
+
$bing = true;
|
20 |
+
if ($row['window'] == 'yes')
|
21 |
+
$window = true;
|
22 |
+
if ($row['yahoo'] == 'yes')
|
23 |
+
$yahoo = true;
|
24 |
+
|
25 |
+
$form = new Varien_Data_Form();
|
26 |
+
$this->setForm($form);
|
27 |
+
$fieldset = $form->addFieldset('showmap_form', array('legend' => Mage::helper('showmap')->__('Site Map')));
|
28 |
+
|
29 |
+
if ($row['ping_interval'] != '') {
|
30 |
+
$fieldset->addField('ping_interval', 'text', array(
|
31 |
+
'label' => Mage::helper('showmap')->__('Ping Interval'),
|
32 |
+
'class' => 'validate-greater-than-zero',
|
33 |
+
'required' => true,
|
34 |
+
'name' => 'ping_interval',
|
35 |
+
'value' => "" . $row['ping_interval'] . ""));
|
36 |
+
} else {
|
37 |
+
$fieldset->addField('ping_interval', 'text', array(
|
38 |
+
'label' => Mage::helper('showmap')->__('Ping Interval'),
|
39 |
+
'class' => 'validate-greater-than-zero',
|
40 |
+
'required' => true,
|
41 |
+
'name' => 'ping_interval',
|
42 |
+
'value' => '30'));
|
43 |
+
}
|
44 |
+
|
45 |
+
if ($row['format'] == 'hours') {
|
46 |
+
$fieldset->addField('format', 'select', array(
|
47 |
+
'name' => 'format',
|
48 |
+
'align' => 'left',
|
49 |
+
'values' => array(
|
50 |
+
array(
|
51 |
+
'value' => 'hours',
|
52 |
+
'label' => Mage::helper('showmap')->__('Hour(s)')),
|
53 |
+
array(
|
54 |
+
'value' => 'days',
|
55 |
+
'label' => Mage::helper('showmap')->__('Day(s)'),),
|
56 |
+
)));
|
57 |
+
} else {
|
58 |
+
$fieldset->addField('format', 'select', array(
|
59 |
+
'name' => 'format',
|
60 |
+
'align' => 'left',
|
61 |
+
'values' => array(
|
62 |
+
array(
|
63 |
+
'value' => 'days',
|
64 |
+
'label' => Mage::helper('showmap')->__('Day(s)'),),
|
65 |
+
array(
|
66 |
+
'value' => 'hours',
|
67 |
+
'label' => Mage::helper('showmap')->__('Hour(s)')))));
|
68 |
+
}
|
69 |
+
|
70 |
+
|
71 |
+
|
72 |
+
|
73 |
+
$fieldset->addField('google', 'checkbox', array(
|
74 |
+
'label' => Mage::helper('showmap')->__('Choose Channel'),
|
75 |
+
'name' => 'google',
|
76 |
+
'checked' => $google,
|
77 |
+
'onclick' => "",
|
78 |
+
'onchange' => "",
|
79 |
+
'value' => 'yes',
|
80 |
+
'disabled' => false,
|
81 |
+
'after_element_html' => '<large>Google</large>',
|
82 |
+
'tabindex' => 1
|
83 |
+
));
|
84 |
+
|
85 |
+
$fieldset->addField('bing', 'checkbox', array(
|
86 |
+
'name' => 'bing',
|
87 |
+
'checked' => $bing,
|
88 |
+
'onclick' => "",
|
89 |
+
'onchange' => "",
|
90 |
+
'value' => 'yes',
|
91 |
+
'disabled' => false,
|
92 |
+
'after_element_html' => '<large>Bing</large>',
|
93 |
+
'tabindex' => 1
|
94 |
+
));
|
95 |
+
|
96 |
+
$fieldset->addField('window', 'checkbox', array(
|
97 |
+
'name' => 'window',
|
98 |
+
'checked' => $window,
|
99 |
+
'onclick' => "",
|
100 |
+
'onchange' => "",
|
101 |
+
'value' => 'yes',
|
102 |
+
'disabled' => false,
|
103 |
+
'after_element_html' => '<large>Window Live</large>',
|
104 |
+
'tabindex' => 1
|
105 |
+
));
|
106 |
+
|
107 |
+
$fieldset->addField('yahoo', 'checkbox', array(
|
108 |
+
'name' => 'yahoo',
|
109 |
+
'checked' => $yahoo,
|
110 |
+
/* 'onclick' => "if(this.value=='yes'){if(this.checked==true){
|
111 |
+
document.getElementById('yahoo_appid').style.visibility='visible';
|
112 |
+
document.getElementById('label').style.visibility='visible';}
|
113 |
+
else{
|
114 |
+
document.getElementById('yahoo_appid').style.visibility='hidden';
|
115 |
+
document.getElementById('label').style.visibility='hidden';
|
116 |
+
}}", */
|
117 |
+
'onchange' => "",
|
118 |
+
'value' => 'yes',
|
119 |
+
'disabled' => false,
|
120 |
+
'after_element_html' => '<large>Yahoo</large>',
|
121 |
+
'tabindex' => 1
|
122 |
+
));
|
123 |
+
|
124 |
+
|
125 |
+
/* $fieldset->addField('label', 'label', array(
|
126 |
'after_element_html' => '<div id ="label" style=visibility:hidden;>Yahoo App Id</div>'));
|
127 |
+
|
128 |
+
$fieldset->addField('yahoo_appid', 'text', array(
|
129 |
'label' => Mage::helper('showmap')->__(''),
|
130 |
+
'label_style' => 'visibility: hidden;',
|
131 |
'name' => 'yahoo_id',
|
132 |
+
'value' => ''.$yahoo_id.'',
|
133 |
+
'style' => 'visibility: hidden;')); */
|
|
|
|
|
|
|
134 |
|
|
|
135 |
|
136 |
+
return parent::_prepareForm();
|
137 |
+
}
|
138 |
|
139 |
+
}
|
app/code/community/Raveinfosys/Showmap/Block/Adminhtml/Showmap/Edit/Tabs.php
CHANGED
@@ -3,22 +3,23 @@
|
|
3 |
class Raveinfosys_Showmap_Block_Adminhtml_Showmap_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
|
4 |
{
|
5 |
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
|
3 |
class Raveinfosys_Showmap_Block_Adminhtml_Showmap_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
|
4 |
{
|
5 |
|
6 |
+
public function __construct()
|
7 |
+
{
|
8 |
+
parent::__construct();
|
9 |
+
$this->setId('showmap_tabs');
|
10 |
+
$this->setDestElementId('edit_form');
|
11 |
+
$this->setTitle(Mage::helper('showmap')->__('Site Map'));
|
12 |
+
}
|
13 |
|
14 |
+
protected function _beforeToHtml()
|
15 |
+
{
|
16 |
+
$this->addTab('form_section', array(
|
17 |
+
'label' => Mage::helper('showmap')->__('Site Map'),
|
18 |
+
//'title' => Mage::helper('showmap')->__('Item Information'),
|
19 |
+
'content' => $this->getLayout()->createBlock('showmap/adminhtml_showmap_edit_tab_form')->toHtml(),
|
20 |
+
));
|
21 |
+
|
22 |
+
return parent::_beforeToHtml();
|
23 |
+
}
|
24 |
+
|
25 |
+
}
|
app/code/community/Raveinfosys/Showmap/Block/Showmap.php
CHANGED
@@ -1,26 +1,30 @@
|
|
1 |
<?php
|
|
|
2 |
class Raveinfosys_Showmap_Block_Showmap extends Mage_Core_Block_Template
|
3 |
{
|
4 |
-
|
|
|
5 |
{
|
6 |
-
|
7 |
}
|
8 |
-
|
9 |
-
|
10 |
-
|
|
|
11 |
$cats = Mage::getModel('catalog/category')->load(2)->getChildren();
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
}
|
26 |
-
|
|
1 |
<?php
|
2 |
+
|
3 |
class Raveinfosys_Showmap_Block_Showmap extends Mage_Core_Block_Template
|
4 |
{
|
5 |
+
|
6 |
+
public function _prepareLayout()
|
7 |
{
|
8 |
+
return parent::_prepareLayout();
|
9 |
}
|
10 |
+
|
11 |
+
public function getShowmap()
|
12 |
+
{
|
13 |
+
$storeId = Mage::app()->getStore()->getId();
|
14 |
$cats = Mage::getModel('catalog/category')->load(2)->getChildren();
|
15 |
+
$catIds = explode(',', $cats);
|
16 |
+
$this->setData('catIds', $catIds);
|
17 |
+
|
18 |
+
$product = Mage::getModel('catalog/product');
|
19 |
+
$products = $product->getCollection()->addStoreFilter($storeId)->getData();
|
20 |
+
$this->setData('products', $products);
|
21 |
+
|
22 |
+
$collection = Mage::getModel('cms/page')->getCollection()->addStoreFilter(Mage::app()->getStore()->getId());
|
23 |
+
$collection->getSelect()
|
24 |
+
->where('is_active = 1');
|
25 |
+
$this->setData('collection', $collection);
|
26 |
+
|
27 |
+
return Mage::getModel('showmap/config')->getRow();
|
28 |
}
|
29 |
+
|
30 |
+
}
|
app/code/community/Raveinfosys/Showmap/Helper/Data.php
CHANGED
@@ -3,4 +3,4 @@
|
|
3 |
class Raveinfosys_Showmap_Helper_Data extends Mage_Core_Helper_Abstract
|
4 |
{
|
5 |
|
6 |
-
}
|
3 |
class Raveinfosys_Showmap_Helper_Data extends Mage_Core_Helper_Abstract
|
4 |
{
|
5 |
|
6 |
+
}
|
app/code/community/Raveinfosys/Showmap/Model/Config.php
CHANGED
@@ -5,16 +5,16 @@ class Raveinfosys_Showmap_Model_Config extends Mage_Core_Model_Abstract
|
|
5 |
|
6 |
public function _construct()
|
7 |
{
|
8 |
-
parent::_construct();
|
9 |
$this->_init('showmap/config');
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
}
|
5 |
|
6 |
public function _construct()
|
7 |
{
|
8 |
+
parent::_construct();
|
9 |
$this->_init('showmap/config');
|
10 |
+
}
|
11 |
+
|
12 |
+
public function getRow()
|
13 |
+
{
|
14 |
+
$collection = $this->getCollection()
|
15 |
+
->setOrder('id', 'DESC');
|
16 |
+
$row = $collection->getFirstItem()->getData();
|
17 |
+
return $row;
|
18 |
+
}
|
19 |
+
|
20 |
+
}
|
app/code/community/Raveinfosys/Showmap/Model/Mysql4/Config.php
CHANGED
@@ -2,9 +2,11 @@
|
|
2 |
|
3 |
class Raveinfosys_Showmap_Model_Mysql4_Config extends Mage_Core_Model_Mysql4_Abstract
|
4 |
{
|
|
|
5 |
public function _construct()
|
6 |
-
{
|
7 |
// Note that the showmap_id refers to the key field in your database table.
|
8 |
$this->_init('showmap/config', 'id');
|
9 |
}
|
10 |
-
|
|
2 |
|
3 |
class Raveinfosys_Showmap_Model_Mysql4_Config extends Mage_Core_Model_Mysql4_Abstract
|
4 |
{
|
5 |
+
|
6 |
public function _construct()
|
7 |
+
{
|
8 |
// Note that the showmap_id refers to the key field in your database table.
|
9 |
$this->_init('showmap/config', 'id');
|
10 |
}
|
11 |
+
|
12 |
+
}
|
app/code/community/Raveinfosys/Showmap/Model/Mysql4/Config/Collection.php
CHANGED
@@ -2,9 +2,11 @@
|
|
2 |
|
3 |
class Raveinfosys_Showmap_Model_Mysql4_Config_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
4 |
{
|
|
|
5 |
public function _construct()
|
6 |
{
|
7 |
parent::_construct();
|
8 |
$this->_init('showmap/config');
|
9 |
}
|
10 |
-
|
|
2 |
|
3 |
class Raveinfosys_Showmap_Model_Mysql4_Config_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
4 |
{
|
5 |
+
|
6 |
public function _construct()
|
7 |
{
|
8 |
parent::_construct();
|
9 |
$this->_init('showmap/config');
|
10 |
}
|
11 |
+
|
12 |
+
}
|
app/code/community/Raveinfosys/Showmap/Model/Mysql4/Showmap.php
CHANGED
@@ -2,9 +2,11 @@
|
|
2 |
|
3 |
class Raveinfosys_Showmap_Model_Mysql4_Showmap extends Mage_Core_Model_Mysql4_Abstract
|
4 |
{
|
|
|
5 |
public function _construct()
|
6 |
-
{
|
7 |
// Note that the showmap_id refers to the key field in your database table.
|
8 |
$this->_init('showmap/showmap', 'showmap_id');
|
9 |
}
|
10 |
-
|
|
2 |
|
3 |
class Raveinfosys_Showmap_Model_Mysql4_Showmap extends Mage_Core_Model_Mysql4_Abstract
|
4 |
{
|
5 |
+
|
6 |
public function _construct()
|
7 |
+
{
|
8 |
// Note that the showmap_id refers to the key field in your database table.
|
9 |
$this->_init('showmap/showmap', 'showmap_id');
|
10 |
}
|
11 |
+
|
12 |
+
}
|
app/code/community/Raveinfosys/Showmap/Model/Mysql4/Showmap/Collection.php
CHANGED
@@ -2,9 +2,11 @@
|
|
2 |
|
3 |
class Raveinfosys_Showmap_Model_Mysql4_Showmap_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
4 |
{
|
|
|
5 |
public function _construct()
|
6 |
{
|
7 |
parent::_construct();
|
8 |
$this->_init('showmap/showmap');
|
9 |
}
|
10 |
-
|
|
2 |
|
3 |
class Raveinfosys_Showmap_Model_Mysql4_Showmap_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
4 |
{
|
5 |
+
|
6 |
public function _construct()
|
7 |
{
|
8 |
parent::_construct();
|
9 |
$this->_init('showmap/showmap');
|
10 |
}
|
11 |
+
|
12 |
+
}
|
app/code/community/Raveinfosys/Showmap/Model/Showmap.php
CHANGED
@@ -2,248 +2,227 @@
|
|
2 |
|
3 |
class Raveinfosys_Showmap_Model_Showmap extends Mage_Core_Model_Abstract
|
4 |
{
|
|
|
5 |
public $google_url = "http://www.google.com/webmasters/tools/ping?sitemap=";
|
6 |
-
public $yahoo_url =
|
7 |
-
public $bing_url =
|
8 |
public $window_url = "http://www.bing.com/webmaster/ping.aspx?siteMap=";
|
9 |
-
|
10 |
public function _construct()
|
11 |
{
|
12 |
-
parent::_construct();
|
13 |
$this->_init('showmap/showmap');
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
public function update()
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
}
|
229 |
-
|
230 |
-
public function changeInterval()
|
231 |
-
{
|
232 |
-
$obj = Mage::getModel('showmap/showmap');
|
233 |
-
$showmap = $obj->getRow();
|
234 |
-
if($showmap['format'] == 'days')
|
235 |
-
{
|
236 |
-
$ping_interval = $showmap['ping_interval'];
|
237 |
-
$cron = '0 0 */'.$ping_interval.' * *';
|
238 |
-
}
|
239 |
-
if($showmap['format'] == 'hours')
|
240 |
-
{
|
241 |
-
$ping_interval = $showmap['ping_interval'];
|
242 |
-
$cron = '0 */'.$ping_interval.' * * *';
|
243 |
-
}
|
244 |
-
$url = Mage::getBaseDir('code').'/community/Raveinfosys/Showmap/etc/config.xml';
|
245 |
-
$endreXML = simplexml_load_file($url);
|
246 |
-
$endreXML->crontab[0]->jobs[0]->Raveinfosys_Showmap[0]->schedule[0]->cron_expr = $cron;
|
247 |
-
file_put_contents($url, $endreXML->asXML());
|
248 |
-
}
|
249 |
-
}
|
2 |
|
3 |
class Raveinfosys_Showmap_Model_Showmap extends Mage_Core_Model_Abstract
|
4 |
{
|
5 |
+
|
6 |
public $google_url = "http://www.google.com/webmasters/tools/ping?sitemap=";
|
7 |
+
public $yahoo_url = "http://www.bing.com/webmaster/ping.aspx?siteMap=";
|
8 |
+
public $bing_url = "http://www.bing.com/webmaster/ping.aspx?siteMap=";
|
9 |
public $window_url = "http://www.bing.com/webmaster/ping.aspx?siteMap=";
|
10 |
+
|
11 |
public function _construct()
|
12 |
{
|
13 |
+
parent::_construct();
|
14 |
$this->_init('showmap/showmap');
|
15 |
+
}
|
16 |
+
|
17 |
+
public function getRow()
|
18 |
+
{
|
19 |
+
$collection = $this->getCollection()
|
20 |
+
->setOrder('showmap_id', 'DESC');
|
21 |
+
$row = $collection->getFirstItem()->getData();
|
22 |
+
return $row;
|
23 |
+
}
|
24 |
+
|
25 |
public function update()
|
26 |
+
{
|
27 |
+
$arr_row = $this->getRow();
|
28 |
+
$this->submitSitemap($arr_row);
|
29 |
+
}
|
30 |
+
|
31 |
+
public function submitSitemap($data)
|
32 |
+
{
|
33 |
+
$responses = array();
|
34 |
+
$responses['google_response'] = 'Not Configured';
|
35 |
+
$responses['yahoo_response'] = 'Not Configured';
|
36 |
+
$responses['bing_response'] = 'Not Configured';
|
37 |
+
$responses['window_response'] = 'Not Configured';
|
38 |
+
|
39 |
+
$base_url = $this->get_url() . "sitemap.xml";
|
40 |
+
$isCurl = function_exists('curl_init');
|
41 |
+
if ($isCurl) {
|
42 |
+
if ($data['google'] == 'yes') {
|
43 |
+
$url_google = $this->google_url . $base_url;
|
44 |
+
$string = $this->get_web_page($url_google);
|
45 |
+
|
46 |
+
$DOM = new DOMDocument;
|
47 |
+
@$DOM->loadHTML($string);
|
48 |
+
|
49 |
+
$items = $DOM->getElementsByTagName('body');
|
50 |
+
$array = array();
|
51 |
+
for ($i = 0; $i < $items->length; $i++)
|
52 |
+
$array = $items->item($i)->nodeValue;
|
53 |
+
$responses['google_response'] = substr($array, '0', 105);
|
54 |
+
}
|
55 |
+
|
56 |
+
if ($data['yahoo'] == 'yes') {
|
57 |
+
$url_yahoo = $this->yahoo_url . $base_url;
|
58 |
+
$responses['yahoo_response'] = strip_tags($this->get_web_page($url_yahoo));
|
59 |
+
}
|
60 |
+
|
61 |
+
if ($data['bing'] == 'yes') {
|
62 |
+
$url_bing = $this->bing_url . $base_url;
|
63 |
+
$responses['bing_response'] = strip_tags($this->get_web_page($url_bing));
|
64 |
+
}
|
65 |
+
|
66 |
+
if ($data['window'] == 'yes') {
|
67 |
+
$url_window = $this->window_url . $base_url;
|
68 |
+
$responses['window_response'] = strip_tags($this->get_web_page($url_window));
|
69 |
+
}
|
70 |
+
}
|
71 |
+
|
72 |
+
if ($data['google'] == 'yes' || $data['bing'] == 'yes' || $data['window'] == 'yes' || $data['yahoo'] == 'yes') {
|
73 |
+
$responses['date'] = date('Y-m-d h:i:s a', Mage::getModel('core/date')->timestamp(time()));
|
74 |
+
$showresponse = Mage::getModel('showresponse/showresponse')->setData($responses);
|
75 |
+
$showresponse->save();
|
76 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('showmap')->__('sitemap was successfully submitted'));
|
77 |
+
} else
|
78 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('showmap')->__('Please choose at least 1 channel'));
|
79 |
+
}
|
80 |
+
|
81 |
+
function get_web_page($url)
|
82 |
+
{
|
83 |
+
$options = array(
|
84 |
+
CURLOPT_RETURNTRANSFER => true, // return web page
|
85 |
+
CURLOPT_HEADER => false, // don't return headers
|
86 |
+
CURLOPT_FOLLOWLOCATION => true, // follow redirects
|
87 |
+
CURLOPT_ENCODING => "", // handle all encodings
|
88 |
+
CURLOPT_AUTOREFERER => true, // set referer on redirect
|
89 |
+
CURLOPT_CONNECTTIMEOUT => 120, // timeout on connect
|
90 |
+
CURLOPT_TIMEOUT => 120, // timeout on response
|
91 |
+
CURLOPT_MAXREDIRS => 10, // stop after 10 redirects
|
92 |
+
);
|
93 |
+
|
94 |
+
$ch = curl_init($url);
|
95 |
+
curl_setopt_array($ch, $options);
|
96 |
+
$content = curl_exec($ch);
|
97 |
+
$err = curl_errno($ch);
|
98 |
+
$errmsg = curl_error($ch);
|
99 |
+
$header = curl_getinfo($ch);
|
100 |
+
curl_close($ch);
|
101 |
+
$header['errno'] = $err;
|
102 |
+
$header['errmsg'] = $errmsg;
|
103 |
+
$header['content'] = $content;
|
104 |
+
return $content;
|
105 |
+
}
|
106 |
+
|
107 |
+
public function get_url()
|
108 |
+
{
|
109 |
+
$string = Mage::getBaseURL();
|
110 |
+
$string1 = str_replace("index.php/", "", $string);
|
111 |
+
$string2 = str_replace('/', '%2F', $string1);
|
112 |
+
$string3 = str_replace(':', '%3A', $string2);
|
113 |
+
return $string3;
|
114 |
+
}
|
115 |
+
|
116 |
+
public function generateSitemapXML()
|
117 |
+
{
|
118 |
+
$config = Mage::getModel('showmap/config');
|
119 |
+
$row = $config->getRow();
|
120 |
+
if ($row['configured'] == 0)
|
121 |
+
return false;
|
122 |
+
$content = @file_get_contents('sitemap/sitemap.xml');
|
123 |
+
$content = str_replace('</urlset>', '', $content);
|
124 |
+
$content .= '<?xml version="1.0" encoding="utf-8"?><urlset>';
|
125 |
+
$count = 0;
|
126 |
+
if ($row['category'] == 'yes') {
|
127 |
+
$cats = Mage::getModel('catalog/category')->load(2)->getChildren();
|
128 |
+
$catIds = explode(',', $cats);
|
129 |
+
foreach ($catIds as $catId) {
|
130 |
+
if ($catId != '') {
|
131 |
+
$category = Mage::getModel('catalog/category')->load($catId);
|
132 |
+
$subCats = Mage::getModel('catalog/category')->load($category->getId())->getChildren();
|
133 |
+
$subCatIds = explode(',', $subCats);
|
134 |
+
$url = $category->getUrl();
|
135 |
+
if (strpos($content, $url) === false) {
|
136 |
+
$content .= '<url><loc>' . $url . '</loc>';
|
137 |
+
$content .= '<lastmod>' . date('Y-m-d') . '</lastmod>';
|
138 |
+
$content .= '<changefreq>daily</changefreq>';
|
139 |
+
$content .= '<priority>0.50</priority>';
|
140 |
+
$content .= '</url>';
|
141 |
+
$count++;
|
142 |
+
}
|
143 |
+
if (count($subCatIds) > 1) {
|
144 |
+
foreach ($subCatIds as $subCat) {
|
145 |
+
$subCategory = Mage::getModel('catalog/category')->load($subCat);
|
146 |
+
$url = $subCategory->getUrl();
|
147 |
+
if (strpos($content, $url) === false) {
|
148 |
+
$content .= '<url><loc>' . $url . '</loc>';
|
149 |
+
$content .= '<lastmod>' . date('Y-m-d') . '</lastmod>';
|
150 |
+
$content .= '<changefreq>daily</changefreq>';
|
151 |
+
$content .= '<priority>0.50</priority>';
|
152 |
+
$content .= '</url>';
|
153 |
+
$count++;
|
154 |
+
}
|
155 |
+
}
|
156 |
+
}
|
157 |
+
}
|
158 |
+
}
|
159 |
+
}
|
160 |
+
|
161 |
+
if ($row['product'] == 'yes') {
|
162 |
+
$storeId = Mage::app()->getStore()->getId();
|
163 |
+
$product = Mage::getModel('catalog/product');
|
164 |
+
$products = $product->getCollection()->addStoreFilter($storeId)->getData();
|
165 |
+
foreach ($products as $pro) {
|
166 |
+
$Stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($pro['entity_id'])->getIsinStock();
|
167 |
+
if ($Stock) {
|
168 |
+
$_product = $product->load($pro['entity_id']);
|
169 |
+
$url = Mage::getUrl() . $_product->getUrlPath();
|
170 |
+
if (strpos($content, $url) === false && $_product->getStatus() != 2) {
|
171 |
+
$content .= '<url><loc>' . $url . '</loc>';
|
172 |
+
$content .= '<lastmod>' . date('Y-m-d') . '</lastmod>';
|
173 |
+
$content .= '<changefreq>daily</changefreq>';
|
174 |
+
$content .= '<priority>0.50</priority>';
|
175 |
+
$content .= '</url>';
|
176 |
+
$count++;
|
177 |
+
}
|
178 |
+
}
|
179 |
+
}
|
180 |
+
}
|
181 |
+
|
182 |
+
if ($row['cms'] == 'yes') {
|
183 |
+
$collection = Mage::getModel('cms/page')->getCollection()->addStoreFilter(Mage::app()->getStore()->getId());
|
184 |
+
$collection->getSelect()
|
185 |
+
->where('is_active = 1');
|
186 |
+
foreach ($collection as $page) {
|
187 |
+
$PageData = $page->getData();
|
188 |
+
if ($PageData['identifier'] != 'no-route' && $PageData['identifier'] != 'enable-cookies') {
|
189 |
+
$url = Mage::getUrl() . $PageData['identifier'];
|
190 |
+
if (strpos($content, $url) === false) {
|
191 |
+
$content .= '<url><loc>' . $url . '</loc>';
|
192 |
+
$content .= '<lastmod>' . date('Y-m-d') . '</lastmod>';
|
193 |
+
$content .= '<changefreq>daily</changefreq>';
|
194 |
+
$content .= '<priority>0.50</priority>';
|
195 |
+
$content .= '</url>';
|
196 |
+
$count++;
|
197 |
+
}
|
198 |
+
}
|
199 |
+
}
|
200 |
+
}
|
201 |
+
|
202 |
+
$content .= '</urlset>';
|
203 |
+
$url_dir = Mage::getBaseDir() . "/sitemap.xml";
|
204 |
+
$file_handle = fopen($url_dir, 'w');
|
205 |
+
fwrite($file_handle, $content);
|
206 |
+
fclose($file_handle);
|
207 |
+
return true;
|
208 |
+
}
|
209 |
+
|
210 |
+
public function changeInterval()
|
211 |
+
{
|
212 |
+
$obj = Mage::getModel('showmap/showmap');
|
213 |
+
$showmap = $obj->getRow();
|
214 |
+
if ($showmap['format'] == 'days') {
|
215 |
+
$ping_interval = $showmap['ping_interval'];
|
216 |
+
$cron = '0 0 */' . $ping_interval . ' * *';
|
217 |
+
}
|
218 |
+
if ($showmap['format'] == 'hours') {
|
219 |
+
$ping_interval = $showmap['ping_interval'];
|
220 |
+
$cron = '0 */' . $ping_interval . ' * * *';
|
221 |
+
}
|
222 |
+
$url = Mage::getBaseDir('code') . '/community/Raveinfosys/Showmap/etc/config.xml';
|
223 |
+
$endreXML = simplexml_load_file($url);
|
224 |
+
$endreXML->crontab[0]->jobs[0]->Raveinfosys_Showmap[0]->schedule[0]->cron_expr = $cron;
|
225 |
+
file_put_contents($url, $endreXML->asXML());
|
226 |
+
}
|
227 |
+
|
228 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Raveinfosys/Showmap/controllers/Adminhtml/ShowmapController.php
CHANGED
@@ -3,59 +3,57 @@
|
|
3 |
class Raveinfosys_Showmap_Adminhtml_ShowmapController extends Mage_Adminhtml_Controller_Action
|
4 |
{
|
5 |
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
}
|
3 |
class Raveinfosys_Showmap_Adminhtml_ShowmapController extends Mage_Adminhtml_Controller_Action
|
4 |
{
|
5 |
|
6 |
+
public function indexAction()
|
7 |
+
{
|
8 |
+
if (Mage::getModel('showmap/showmap')->generateSitemapXML())
|
9 |
+
$this->_forward('edit');
|
10 |
+
else
|
11 |
+
$this->_redirect('*/*/config');
|
12 |
+
}
|
13 |
+
|
14 |
+
public function editAction()
|
15 |
+
{
|
16 |
+
$this->loadLayout();
|
17 |
+
$this->_setActiveMenu('showmap/items');
|
18 |
+
|
19 |
+
$this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
|
20 |
+
$this->_addContent($this->getLayout()->createBlock('showmap/adminhtml_showmap_edit'))
|
21 |
+
->_addLeft($this->getLayout()->createBlock('showmap/adminhtml_showmap_edit_tabs'));
|
22 |
+
|
23 |
+
$this->renderLayout();
|
24 |
+
}
|
25 |
+
|
26 |
+
public function saveAction()
|
27 |
+
{
|
28 |
+
if ($data = $this->getRequest()->getPost()) {
|
29 |
+
$model = Mage::getModel('showmap/showmap');
|
30 |
+
$model->submitSitemap($data);
|
31 |
+
$model->setData($data)
|
32 |
+
->save();
|
33 |
+
|
34 |
+
$model->changeInterval();
|
35 |
+
}
|
36 |
+
$this->_redirect('*/*/');
|
37 |
+
}
|
38 |
+
|
39 |
+
public function configAction()
|
40 |
+
{
|
41 |
+
$this->loadLayout();
|
42 |
+
$this->_setActiveMenu('showmap/items');
|
43 |
+
|
44 |
+
$this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
|
45 |
+
|
46 |
+
$this->_addLeft($this->getLayout()->createBlock('showmap/adminhtml_showmap_edit_config'));
|
47 |
+
|
48 |
+
if ($data = $this->getRequest()->getPost()) {
|
49 |
+
$model = Mage::getModel('showmap/config');
|
50 |
+
$data['configured'] = 1;
|
51 |
+
$model->setData($data)
|
52 |
+
->save();
|
53 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('showmap')->__('Sitemap was successfully configured'));
|
54 |
+
$this->_redirect('*/*/config');
|
55 |
+
}
|
56 |
+
$this->renderLayout();
|
57 |
+
}
|
58 |
+
|
59 |
+
}
|
|
|
|
app/code/community/Raveinfosys/Showmap/controllers/IndexController.php
CHANGED
@@ -1,9 +1,12 @@
|
|
1 |
<?php
|
|
|
2 |
class Raveinfosys_Showmap_IndexController extends Mage_Core_Controller_Front_Action
|
3 |
{
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
}
|
|
|
|
1 |
<?php
|
2 |
+
|
3 |
class Raveinfosys_Showmap_IndexController extends Mage_Core_Controller_Front_Action
|
4 |
{
|
5 |
+
|
6 |
+
public function indexAction()
|
7 |
+
{
|
8 |
+
$this->loadLayout();
|
9 |
+
$this->renderLayout();
|
10 |
+
}
|
11 |
+
|
12 |
+
}
|
app/code/community/Raveinfosys/Showmap/etc/config.xml
CHANGED
@@ -138,7 +138,7 @@
|
|
138 |
<jobs>
|
139 |
<Raveinfosys_Showmap>
|
140 |
<schedule>
|
141 |
-
<cron_expr>0 */
|
142 |
</schedule>
|
143 |
<run>
|
144 |
<model>showmap/showmap::update</model>
|
138 |
<jobs>
|
139 |
<Raveinfosys_Showmap>
|
140 |
<schedule>
|
141 |
+
<cron_expr>0 */4444 * * *</cron_expr>
|
142 |
</schedule>
|
143 |
<run>
|
144 |
<model>showmap/showmap::update</model>
|
app/code/community/Raveinfosys/Showmap/sql/showmap_setup/mysql4-install-0.1.0.php
CHANGED
@@ -6,10 +6,10 @@ $installer->startSetup();
|
|
6 |
$setup = new Mage_Eav_Model_Entity_Setup('core_setup');
|
7 |
|
8 |
$installer->run("
|
9 |
-
|
10 |
-
-- DROP TABLE IF EXISTS {$this->getTable('showmap')};
|
11 |
CREATE TABLE {$this->getTable('showmap')} (
|
12 |
-
`showmap_id` int(11) NOT NULL auto_increment,
|
13 |
`ping_interval` int(12),
|
14 |
`format` varchar(20),
|
15 |
`google` varchar(20) NOT NULL default 'no',
|
@@ -21,10 +21,10 @@ $installer->run("
|
|
21 |
|
22 |
|
23 |
|
24 |
-
-- DROP TABLE IF EXISTS {$this->getTable('showmap_config')};
|
25 |
CREATE TABLE {$this->getTable('showmap_config')} (
|
26 |
`id` int(11) NOT NULL auto_increment,
|
27 |
-
`product` varchar(20),
|
28 |
`category` varchar(20),
|
29 |
`cms` varchar(20),
|
30 |
`other` varchar(20),
|
@@ -33,4 +33,4 @@ $installer->run("
|
|
33 |
)ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
34 |
");
|
35 |
|
36 |
-
$installer->endSetup();
|
6 |
$setup = new Mage_Eav_Model_Entity_Setup('core_setup');
|
7 |
|
8 |
$installer->run("
|
9 |
+
|
10 |
+
-- DROP TABLE IF EXISTS {$this->getTable('showmap')};
|
11 |
CREATE TABLE {$this->getTable('showmap')} (
|
12 |
+
`showmap_id` int(11) NOT NULL auto_increment,
|
13 |
`ping_interval` int(12),
|
14 |
`format` varchar(20),
|
15 |
`google` varchar(20) NOT NULL default 'no',
|
21 |
|
22 |
|
23 |
|
24 |
+
-- DROP TABLE IF EXISTS {$this->getTable('showmap_config')};
|
25 |
CREATE TABLE {$this->getTable('showmap_config')} (
|
26 |
`id` int(11) NOT NULL auto_increment,
|
27 |
+
`product` varchar(20),
|
28 |
`category` varchar(20),
|
29 |
`cms` varchar(20),
|
30 |
`other` varchar(20),
|
33 |
)ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
34 |
");
|
35 |
|
36 |
+
$installer->endSetup();
|
app/code/community/Raveinfosys/Showresponse/Block/Adminhtml/Showresponse.php
CHANGED
@@ -1,12 +1,15 @@
|
|
1 |
<?php
|
|
|
2 |
class Raveinfosys_Showresponse_Block_Adminhtml_Showresponse extends Mage_Adminhtml_Block_Widget_Grid_Container
|
3 |
{
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
}
|
|
|
|
1 |
<?php
|
2 |
+
|
3 |
class Raveinfosys_Showresponse_Block_Adminhtml_Showresponse extends Mage_Adminhtml_Block_Widget_Grid_Container
|
4 |
{
|
5 |
+
|
6 |
+
public function __construct()
|
7 |
+
{
|
8 |
+
$this->_controller = 'adminhtml_showresponse';
|
9 |
+
$this->_blockGroup = 'showresponse';
|
10 |
+
$this->_headerText = Mage::helper('showresponse')->__('View Responses');
|
11 |
+
parent::__construct();
|
12 |
+
$this->removeButton('add');
|
13 |
+
}
|
14 |
+
|
15 |
+
}
|
app/code/community/Raveinfosys/Showresponse/Block/Adminhtml/Showresponse/Description.php
CHANGED
@@ -1,13 +1,17 @@
|
|
1 |
<?php
|
|
|
2 |
class Raveinfosys_Showresponse_Block_Adminhtml_Showresponse_Description extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Text
|
3 |
{
|
|
|
4 |
public function render(Varien_Object $row)
|
5 |
{
|
6 |
$html = parent::render($row);
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
}
|
|
|
12 |
}
|
|
|
13 |
?>
|
1 |
<?php
|
2 |
+
|
3 |
class Raveinfosys_Showresponse_Block_Adminhtml_Showresponse_Description extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Text
|
4 |
{
|
5 |
+
|
6 |
public function render(Varien_Object $row)
|
7 |
{
|
8 |
$html = parent::render($row);
|
9 |
+
if (strlen($html) > 250)
|
10 |
+
return substr($html, 0, 250) . '...';
|
11 |
+
else
|
12 |
+
return $html;
|
13 |
}
|
14 |
+
|
15 |
}
|
16 |
+
|
17 |
?>
|
app/code/community/Raveinfosys/Showresponse/Block/Adminhtml/Showresponse/Grid.php
CHANGED
@@ -2,69 +2,70 @@
|
|
2 |
|
3 |
class Raveinfosys_Showresponse_Block_Adminhtml_Showresponse_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
4 |
{
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
|
|
68 |
|
69 |
protected function _prepareMassaction()
|
70 |
{
|
@@ -72,19 +73,18 @@ class Raveinfosys_Showresponse_Block_Adminhtml_Showresponse_Grid extends Mage_Ad
|
|
72 |
$this->getMassactionBlock()->setFormFieldName('showresponse');
|
73 |
|
74 |
$this->getMassactionBlock()->addItem('delete', array(
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
));
|
79 |
|
80 |
-
|
81 |
return $this;
|
82 |
}
|
83 |
-
|
84 |
-
public function getRowUrl($row)
|
85 |
-
{
|
86 |
-
// return $this->getUrl('*/*/edit', array('id' => $row->getId()));
|
87 |
-
}
|
88 |
|
|
|
|
|
|
|
|
|
89 |
|
90 |
-
}
|
2 |
|
3 |
class Raveinfosys_Showresponse_Block_Adminhtml_Showresponse_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
4 |
{
|
5 |
+
|
6 |
+
public function __construct()
|
7 |
+
{
|
8 |
+
parent::__construct();
|
9 |
+
$this->setId('showresponseGrid');
|
10 |
+
$this->setDefaultSort('showresponse_id');
|
11 |
+
$this->setDefaultDir('ASC');
|
12 |
+
$this->setSaveParametersInSession(true);
|
13 |
+
}
|
14 |
+
|
15 |
+
protected function _prepareCollection()
|
16 |
+
{
|
17 |
+
$collection = Mage::getModel('showresponse/showresponse')->getCollection();
|
18 |
+
$this->setCollection($collection);
|
19 |
+
return parent::_prepareCollection();
|
20 |
+
}
|
21 |
+
|
22 |
+
protected function _prepareColumns()
|
23 |
+
{
|
24 |
+
$this->addColumn('showresponse_id', array(
|
25 |
+
'header' => Mage::helper('showresponse')->__('ID'),
|
26 |
+
'align' => 'right',
|
27 |
+
'width' => '10px',
|
28 |
+
'index' => 'showresponse_id',
|
29 |
+
));
|
30 |
+
|
31 |
+
$this->addColumn('google_response', array(
|
32 |
+
'header' => Mage::helper('showresponse')->__('Google Response'),
|
33 |
+
'align' => 'left',
|
34 |
+
'index' => 'google_response',
|
35 |
+
'renderer' => 'showresponse/adminhtml_showresponse_description'
|
36 |
+
));
|
37 |
+
|
38 |
+
$this->addColumn('yahoo_response', array(
|
39 |
+
'header' => Mage::helper('showresponse')->__('Yahoo Response'),
|
40 |
+
'align' => 'left',
|
41 |
+
'index' => 'yahoo_response',
|
42 |
+
'renderer' => 'showresponse/adminhtml_showresponse_description'
|
43 |
+
));
|
44 |
+
|
45 |
+
$this->addColumn('bing_response', array(
|
46 |
+
'header' => Mage::helper('showresponse')->__('Bing Response'),
|
47 |
+
'align' => 'left',
|
48 |
+
'index' => 'bing_response',
|
49 |
+
'renderer' => 'showresponse/adminhtml_showresponse_description'
|
50 |
+
));
|
51 |
+
|
52 |
+
$this->addColumn('window_response', array(
|
53 |
+
'header' => Mage::helper('showresponse')->__('Window Live Response'),
|
54 |
+
'align' => 'left',
|
55 |
+
'index' => 'window_response',
|
56 |
+
'renderer' => 'showresponse/adminhtml_showresponse_description'
|
57 |
+
));
|
58 |
+
|
59 |
+
$this->addColumn('date', array(
|
60 |
+
'header' => Mage::helper('showresponse')->__('Date'),
|
61 |
+
'align' => 'left',
|
62 |
+
'index' => 'date',
|
63 |
+
));
|
64 |
+
|
65 |
+
|
66 |
+
|
67 |
+
return parent::_prepareColumns();
|
68 |
+
}
|
69 |
|
70 |
protected function _prepareMassaction()
|
71 |
{
|
73 |
$this->getMassactionBlock()->setFormFieldName('showresponse');
|
74 |
|
75 |
$this->getMassactionBlock()->addItem('delete', array(
|
76 |
+
'label' => Mage::helper('showresponse')->__('Delete'),
|
77 |
+
'url' => $this->getUrl('*/*/massDelete'),
|
78 |
+
'confirm' => Mage::helper('showresponse')->__('Are you sure?')
|
79 |
));
|
80 |
|
81 |
+
|
82 |
return $this;
|
83 |
}
|
|
|
|
|
|
|
|
|
|
|
84 |
|
85 |
+
public function getRowUrl($row)
|
86 |
+
{
|
87 |
+
// return $this->getUrl('*/*/edit', array('id' => $row->getId()));
|
88 |
+
}
|
89 |
|
90 |
+
}
|
app/code/community/Raveinfosys/Showresponse/Helper/Data.php
CHANGED
@@ -3,4 +3,4 @@
|
|
3 |
class Raveinfosys_Showresponse_Helper_Data extends Mage_Core_Helper_Abstract
|
4 |
{
|
5 |
|
6 |
-
}
|
3 |
class Raveinfosys_Showresponse_Helper_Data extends Mage_Core_Helper_Abstract
|
4 |
{
|
5 |
|
6 |
+
}
|
app/code/community/Raveinfosys/Showresponse/Model/Mysql4/Showresponse.php
CHANGED
@@ -2,9 +2,11 @@
|
|
2 |
|
3 |
class Raveinfosys_Showresponse_Model_Mysql4_Showresponse extends Mage_Core_Model_Mysql4_Abstract
|
4 |
{
|
|
|
5 |
public function _construct()
|
6 |
-
{
|
7 |
// Note that the showresponse_id refers to the key field in your database table.
|
8 |
$this->_init('showresponse/showresponse', 'showresponse_id');
|
9 |
}
|
10 |
-
|
|
2 |
|
3 |
class Raveinfosys_Showresponse_Model_Mysql4_Showresponse extends Mage_Core_Model_Mysql4_Abstract
|
4 |
{
|
5 |
+
|
6 |
public function _construct()
|
7 |
+
{
|
8 |
// Note that the showresponse_id refers to the key field in your database table.
|
9 |
$this->_init('showresponse/showresponse', 'showresponse_id');
|
10 |
}
|
11 |
+
|
12 |
+
}
|
app/code/community/Raveinfosys/Showresponse/Model/Mysql4/Showresponse/Collection.php
CHANGED
@@ -2,9 +2,11 @@
|
|
2 |
|
3 |
class Raveinfosys_Showresponse_Model_Mysql4_Showresponse_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
4 |
{
|
|
|
5 |
public function _construct()
|
6 |
{
|
7 |
parent::_construct();
|
8 |
$this->_init('showresponse/showresponse');
|
9 |
}
|
10 |
-
|
|
2 |
|
3 |
class Raveinfosys_Showresponse_Model_Mysql4_Showresponse_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
4 |
{
|
5 |
+
|
6 |
public function _construct()
|
7 |
{
|
8 |
parent::_construct();
|
9 |
$this->_init('showresponse/showresponse');
|
10 |
}
|
11 |
+
|
12 |
+
}
|
app/code/community/Raveinfosys/Showresponse/Model/Showresponse.php
CHANGED
@@ -2,17 +2,19 @@
|
|
2 |
|
3 |
class Raveinfosys_Showresponse_Model_Showresponse extends Mage_Core_Model_Abstract
|
4 |
{
|
|
|
5 |
public function _construct()
|
6 |
{
|
7 |
parent::_construct();
|
8 |
$this->_init('showresponse/showresponse');
|
9 |
}
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
|
2 |
|
3 |
class Raveinfosys_Showresponse_Model_Showresponse extends Mage_Core_Model_Abstract
|
4 |
{
|
5 |
+
|
6 |
public function _construct()
|
7 |
{
|
8 |
parent::_construct();
|
9 |
$this->_init('showresponse/showresponse');
|
10 |
}
|
11 |
+
|
12 |
+
public function getRow()
|
13 |
+
{
|
14 |
+
$collection = $this->getCollection()
|
15 |
+
->setOrder('showresponse_id', 'DESC');
|
16 |
+
$row = $collection->getFirstItem()->getData();
|
17 |
+
return $row;
|
18 |
+
}
|
19 |
+
|
20 |
+
}
|
app/code/community/Raveinfosys/Showresponse/controllers/Adminhtml/ShowresponseController.php
CHANGED
@@ -3,67 +3,60 @@
|
|
3 |
class Raveinfosys_Showresponse_Adminhtml_ShowresponseController extends Mage_Adminhtml_Controller_Action
|
4 |
{
|
5 |
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
return $this;
|
12 |
-
}
|
13 |
-
|
14 |
-
public function indexAction()
|
15 |
-
{
|
16 |
-
$config = Mage::getModel('showmap/config');
|
17 |
-
$row = $config->getRow();
|
18 |
-
if($row['configured'] == 0)$this->_redirect('showmap/adminhtml_showmap/config');
|
19 |
-
$this->_initAction()
|
20 |
-
->renderLayout();
|
21 |
-
}
|
22 |
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
|
44 |
-
public function massDeleteAction()
|
45 |
-
|
46 |
$showresponseIds = $this->getRequest()->getParam('showresponse');
|
47 |
-
if(!is_array($showresponseIds))
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
{
|
53 |
-
try
|
54 |
-
{
|
55 |
-
foreach ($showresponseIds as $showresponseId)
|
56 |
-
{
|
57 |
$showresponse = Mage::getModel('showresponse/showresponse')->load($showresponseId);
|
58 |
$showresponse->delete();
|
59 |
}
|
60 |
Mage::getSingleton('adminhtml/session')->addSuccess(
|
61 |
-
|
62 |
-
}
|
63 |
-
catch (Exception $e){
|
64 |
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
65 |
}
|
66 |
}
|
67 |
$this->_redirect('*/*/index');
|
68 |
}
|
69 |
-
|
|
3 |
class Raveinfosys_Showresponse_Adminhtml_ShowresponseController extends Mage_Adminhtml_Controller_Action
|
4 |
{
|
5 |
|
6 |
+
protected function _initAction()
|
7 |
+
{
|
8 |
+
$this->loadLayout()
|
9 |
+
->_setActiveMenu('showmap/items');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
|
11 |
+
return $this;
|
12 |
+
}
|
13 |
+
|
14 |
+
public function indexAction()
|
15 |
+
{
|
16 |
+
$config = Mage::getModel('showmap/config');
|
17 |
+
$row = $config->getRow();
|
18 |
+
if ($row['configured'] == 0)
|
19 |
+
$this->_redirect('showmap/adminhtml_showmap/config');
|
20 |
+
$this->_initAction()
|
21 |
+
->renderLayout();
|
22 |
+
}
|
23 |
+
|
24 |
+
public function deleteAction()
|
25 |
+
{
|
26 |
+
if ($this->getRequest()->getParam('id') > 0) {
|
27 |
+
try {
|
28 |
+
$model = Mage::getModel('showresponse/showresponse');
|
29 |
+
$model->setId($this->getRequest()->getParam('id'))
|
30 |
+
->delete();
|
31 |
+
|
32 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Item was successfully deleted'));
|
33 |
+
$this->_redirect('*/*/');
|
34 |
+
} catch (Exception $e) {
|
35 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
36 |
+
$this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
|
37 |
+
}
|
38 |
+
}
|
39 |
+
$this->_redirect('*/*/');
|
40 |
+
}
|
41 |
|
42 |
+
public function massDeleteAction()
|
43 |
+
{
|
44 |
$showresponseIds = $this->getRequest()->getParam('showresponse');
|
45 |
+
if (!is_array($showresponseIds)) {
|
46 |
+
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select item(s)'));
|
47 |
+
} else {
|
48 |
+
try {
|
49 |
+
foreach ($showresponseIds as $showresponseId) {
|
|
|
|
|
|
|
|
|
|
|
50 |
$showresponse = Mage::getModel('showresponse/showresponse')->load($showresponseId);
|
51 |
$showresponse->delete();
|
52 |
}
|
53 |
Mage::getSingleton('adminhtml/session')->addSuccess(
|
54 |
+
Mage::helper('adminhtml')->__('Total of %d record(s) were successfully deleted', count($showresponseIds)));
|
55 |
+
} catch (Exception $e) {
|
|
|
56 |
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
57 |
}
|
58 |
}
|
59 |
$this->_redirect('*/*/index');
|
60 |
}
|
61 |
+
|
62 |
+
}
|
app/code/community/Raveinfosys/Showresponse/etc/config.xml
CHANGED
@@ -25,7 +25,7 @@
|
|
25 |
</frontend>
|
26 |
<admin>
|
27 |
<routers>
|
28 |
-
|
29 |
<use>admin</use>
|
30 |
<args>
|
31 |
<module>Raveinfosys_Showresponse</module>
|
25 |
</frontend>
|
26 |
<admin>
|
27 |
<routers>
|
28 |
+
<showresponse>
|
29 |
<use>admin</use>
|
30 |
<args>
|
31 |
<module>Raveinfosys_Showresponse</module>
|
app/code/community/Raveinfosys/Showresponse/sql/showresponse_setup/mysql4-install-0.1.0.php
CHANGED
@@ -5,12 +5,12 @@ $installer = $this;
|
|
5 |
$installer->startSetup();
|
6 |
|
7 |
$installer->run("
|
8 |
-
|
9 |
-
-- DROP TABLE IF EXISTS {$this->getTable('showresponse')};
|
10 |
CREATE TABLE {$this->getTable('showresponse')} (
|
11 |
`showresponse_id` int(11) NOT NULL auto_increment,
|
12 |
`google_response` text,
|
13 |
-
`yahoo_response` text,
|
14 |
`bing_response` text,
|
15 |
`window_response` text,
|
16 |
`date` timestamp,
|
@@ -18,4 +18,4 @@ $installer->run("
|
|
18 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
19 |
");
|
20 |
|
21 |
-
$installer->endSetup();
|
5 |
$installer->startSetup();
|
6 |
|
7 |
$installer->run("
|
8 |
+
|
9 |
+
-- DROP TABLE IF EXISTS {$this->getTable('showresponse')};
|
10 |
CREATE TABLE {$this->getTable('showresponse')} (
|
11 |
`showresponse_id` int(11) NOT NULL auto_increment,
|
12 |
`google_response` text,
|
13 |
+
`yahoo_response` text,
|
14 |
`bing_response` text,
|
15 |
`window_response` text,
|
16 |
`date` timestamp,
|
18 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
19 |
");
|
20 |
|
21 |
+
$installer->endSetup();
|
app/design/frontend/base/default/template/showmap/showmap.phtml
CHANGED
@@ -1,100 +1,97 @@
|
|
1 |
-
<?php $row = $this->getShowmap()
|
2 |
|
3 |
<h4><?php echo $this->__('Sitemap') ?></h4>
|
4 |
|
5 |
-
<?php if($row['category'] == 'yes') {?>
|
6 |
-
|
7 |
-
|
8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
</div>
|
10 |
-
|
11 |
-
<ul>
|
12 |
-
<?php foreach($this->getData('catIds') as $catId): ?>
|
13 |
-
<li>
|
14 |
-
<?php $category = Mage::getModel('catalog/category')->load($catId);?>
|
15 |
-
<a href="<?php echo $category->getUrl();?>" style="font:bold;font-size:13px;"><?php echo $category->getName();?></a>
|
16 |
-
<?php
|
17 |
-
$subCats = Mage::getModel('catalog/category')->load($category->getId())->getChildren();
|
18 |
-
$subCatIds = explode(',',$subCats);
|
19 |
-
?>
|
20 |
-
<?php if(count($subCatIds) > 1):?>
|
21 |
-
<ul>
|
22 |
-
<?php foreach($subCatIds as $subCat) :?>
|
23 |
-
<li>
|
24 |
-
<?php $subCategory = Mage::getModel('catalog/category')->load($subCat);?>
|
25 |
-
<a href="<?php echo $subCategory->getUrl();?>" style="font:bold;font-size:11px;"><?php echo $subCategory->getName();?></a>
|
26 |
-
</li>
|
27 |
-
<?php endforeach;?>
|
28 |
-
</ul>
|
29 |
-
<?php endif; ?>
|
30 |
-
</li>
|
31 |
-
<?php endforeach; ?>
|
32 |
-
</ul>
|
33 |
-
</div>
|
34 |
-
</div>
|
35 |
-
<?php }?>
|
36 |
-
|
37 |
-
|
38 |
|
39 |
-
|
40 |
-
|
41 |
-
<div class="block
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
|
|
|
|
|
|
59 |
</div>
|
60 |
-
</div>
|
61 |
|
62 |
-
<?php }?>
|
63 |
|
64 |
-
<?php if($row['cms'] == 'yes') {?>
|
65 |
-
<div class="block block-reviews">
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
<?php endforeach; ?>
|
78 |
-
</div>
|
79 |
-
<?php }?>
|
80 |
-
|
81 |
-
|
82 |
-
<?php if($row['other'] == 'yes') {?>
|
83 |
-
<div class="block block-reviews">
|
84 |
-
<div class="block-title">
|
85 |
-
<strong><span>Other</span></strong>
|
86 |
</div>
|
87 |
-
|
88 |
-
|
89 |
-
<li><a href="<?php echo Mage::getUrl(). "customer/account";?>" style="font:bold;font-size:13px;">My Account</a></li>
|
90 |
-
<li><a href="<?php echo Mage::getUrl(). "wishlist";?>" style="font:bold;font-size:13px;">My Wishlist</a></li>
|
91 |
-
<li><a href="<?php echo Mage::getUrl(). "checkout/cart";?>" style="font:bold;font-size:13px;">My Cart</a></li>
|
92 |
-
<li><a href="<?php echo Mage::getUrl(). "checkout/";?>" style="font:bold;font-size:13px;">Checkout</a></li>
|
93 |
-
<li><a href="<?php echo Mage::getUrl(). "catalogsearch/advanced";?>" style="font:bold;font-size:13px;">Advanced Search</a></li>
|
94 |
-
<li><a href="<?php echo Mage::getUrl(). "customer/account";?>" style="font:bold;font-size:13px;">Login</a></li>
|
95 |
-
|
96 |
-
</div>
|
97 |
-
<?php }?>
|
98 |
|
99 |
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php $row = $this->getShowmap(); ?>
|
2 |
|
3 |
<h4><?php echo $this->__('Sitemap') ?></h4>
|
4 |
|
5 |
+
<?php if ($row['category'] == 'yes') { ?>
|
6 |
+
<div class="block block-reviews">
|
7 |
+
<div class="block-title">
|
8 |
+
<strong><span>Categories</span></strong>
|
9 |
+
</div>
|
10 |
+
<div class="block-content">
|
11 |
+
<ul>
|
12 |
+
<?php foreach ($this->getData('catIds') as $catId): ?>
|
13 |
+
<li>
|
14 |
+
<?php $category = Mage::getModel('catalog/category')->load($catId); ?>
|
15 |
+
<a href="<?php echo $category->getUrl(); ?>" style="font:bold;font-size:13px;"><?php echo $category->getName(); ?></a>
|
16 |
+
<?php
|
17 |
+
$subCats = Mage::getModel('catalog/category')->load($category->getId())->getChildren();
|
18 |
+
$subCatIds = explode(',', $subCats);
|
19 |
+
?>
|
20 |
+
<?php if (count($subCatIds) > 1): ?>
|
21 |
+
<ul>
|
22 |
+
<?php foreach ($subCatIds as $subCat) : ?>
|
23 |
+
<li>
|
24 |
+
<?php $subCategory = Mage::getModel('catalog/category')->load($subCat); ?>
|
25 |
+
<a href="<?php echo $subCategory->getUrl(); ?>" style="font:bold;font-size:11px;"><?php echo $subCategory->getName(); ?></a>
|
26 |
+
</li>
|
27 |
+
<?php endforeach; ?>
|
28 |
+
</ul>
|
29 |
+
<?php endif; ?>
|
30 |
+
</li>
|
31 |
+
<?php endforeach; ?>
|
32 |
+
</ul>
|
33 |
+
</div>
|
34 |
</div>
|
35 |
+
<?php } ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
|
37 |
+
<?php if ($row['product'] == 'yes') { ?>
|
38 |
+
<div class="block block-reviews">
|
39 |
+
<div class="block-title">
|
40 |
+
<strong><span>Products</span></strong>
|
41 |
+
</div>
|
42 |
+
<div class="block-content"><ul>
|
43 |
+
<?php
|
44 |
+
$storeId = Mage::app()->getStore()->getId();
|
45 |
+
$product = Mage::getModel('catalog/product');
|
46 |
+
foreach ($this->getData('products') as $pro) { //loop for getting products
|
47 |
+
$Stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($pro['entity_id'])->getIsinStock();
|
48 |
+
if ($Stock) {
|
49 |
+
$_product = $product->load($pro['entity_id']);
|
50 |
+
?>
|
51 |
+
<?php if ($_product->getStatus() != 2) { ?>
|
52 |
+
<li><a href="<?php echo $_product->getUrlPath() ?>" style="font:bold;font-size:13px;"><?php
|
53 |
+
echo $_product->getName();
|
54 |
+
}
|
55 |
+
?></a></li>
|
56 |
+
<?php } ?>
|
57 |
+
<?php } ?>
|
58 |
+
</ul>
|
59 |
+
</div>
|
60 |
</div>
|
|
|
61 |
|
62 |
+
<?php } ?>
|
63 |
|
64 |
+
<?php if ($row['cms'] == 'yes') { ?>
|
65 |
+
<div class="block block-reviews">
|
66 |
+
<div class="block-title">
|
67 |
+
<strong><span>CMS</span></strong>
|
68 |
+
</div>
|
69 |
+
<ul>
|
70 |
+
<?php foreach ($this->getData('collection') as $page): ?>
|
71 |
+
<?php $PageData = $page->getData(); ?>
|
72 |
+
<?php if ($PageData['identifier'] != 'no-route' && $PageData['identifier'] != 'enable-cookies') { ?>
|
73 |
+
<li>
|
74 |
+
<a href="<?php echo $PageData['identifier'] ?>" style="font:bold;font-size:13px;"><?php echo $PageData['title'] ?></a>
|
75 |
+
</li>
|
76 |
+
<?php } ?>
|
77 |
<?php endforeach; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
</div>
|
79 |
+
<?php } ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
|
81 |
|
82 |
+
<?php if ($row['other'] == 'yes') { ?>
|
83 |
+
<div class="block block-reviews">
|
84 |
+
<div class="block-title">
|
85 |
+
<strong><span>Other</span></strong>
|
86 |
+
</div>
|
87 |
+
<ul>
|
88 |
|
89 |
+
<li><a href="<?php echo Mage::getUrl() . "customer/account"; ?>" style="font:bold;font-size:13px;">My Account</a></li>
|
90 |
+
<li><a href="<?php echo Mage::getUrl() . "wishlist"; ?>" style="font:bold;font-size:13px;">My Wishlist</a></li>
|
91 |
+
<li><a href="<?php echo Mage::getUrl() . "checkout/cart"; ?>" style="font:bold;font-size:13px;">My Cart</a></li>
|
92 |
+
<li><a href="<?php echo Mage::getUrl() . "checkout/"; ?>" style="font:bold;font-size:13px;">Checkout</a></li>
|
93 |
+
<li><a href="<?php echo Mage::getUrl() . "catalogsearch/advanced"; ?>" style="font:bold;font-size:13px;">Advanced Search</a></li>
|
94 |
+
<li><a href="<?php echo Mage::getUrl() . "customer/account"; ?>" style="font:bold;font-size:13px;">Login</a></li>
|
95 |
+
|
96 |
+
</div>
|
97 |
+
<?php } ?>
|
package.xml
CHANGED
@@ -1,19 +1,19 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Raveinfosys_sitemap</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license>OSL v3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>The Raveinfosys Sitemap Extension generate the sitemap xml file and submit the created xml file on different channel.</summary>
|
10 |
-
<description>The Raveinfosys Sitemap Extension generate the sitemap xml file and submit the created xml file on different channel e.g. Google,Yahoo,Bing and Window Live
|
11 |
-
|
12 |
-
In this particular version we are supporting it to run on PHP V 5.5.X
|
13 |
<authors><author><name>Rave Infosys</name><user>raveinfo</user><email>lpext@raveinfosys.com</email></author></authors>
|
14 |
-
<date>
|
15 |
-
<time>
|
16 |
-
<contents><target name="magecommunity"><dir name="Raveinfosys"><dir name="Showmap"><dir name="Block"><dir name="Adminhtml"><dir name="Showmap"><dir name="Edit"><file name="Config.php" hash="
|
17 |
<compatible/>
|
18 |
-
<dependencies><required><php><min>5.2.0</min><max>5.6.
|
19 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Raveinfosys_sitemap</name>
|
4 |
+
<version>1.0.7</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>OSL v3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>The Raveinfosys Sitemap Extension generate the sitemap xml file and submit the created xml file on different channel.</summary>
|
10 |
+
<description>The Raveinfosys Sitemap Extension generate the sitemap xml file and submit the created xml file on different channel e.g. Google,Yahoo,Bing and Window Live.
|
11 |
+
</description>
|
12 |
+
<notes>This is stable version of this extension and has been tested on various version of community editions. In this particular version we are supporting it to run on PHP V 5.5.X.</notes>
|
13 |
<authors><author><name>Rave Infosys</name><user>raveinfo</user><email>lpext@raveinfosys.com</email></author></authors>
|
14 |
+
<date>2016-04-06</date>
|
15 |
+
<time>14:05:53</time>
|
16 |
+
<contents><target name="magecommunity"><dir name="Raveinfosys"><dir name="Showmap"><dir name="Block"><dir name="Adminhtml"><dir name="Showmap"><dir name="Edit"><file name="Config.php" hash="e8ab3c4dd59d1a50b8a405e70970de8f"/><file name="Form.php" hash="e8ffbfcdb8d5420570cee31aee2ec55f"/><dir name="Tab"><file name="Config.php" hash="2d320edeeb2c9c03feda884e69940ccb"/><file name="Form.php" hash="15524fa733b2dbce6d53dfea94f2cfd9"/></dir><file name="Tabs.php" hash="cb49ddc21114d6a2e8aa41432da536a9"/></dir><file name="Edit.php" hash="431ca5f054ec3485dfd1dc9fb20c4353"/></dir><file name="Showmap.php" hash="9945865a39e909a9855421d44380f6b5"/></dir><file name="Showmap.php" hash="b78670bff569dee560da6daaae9001bf"/></dir><dir name="Helper"><file name="Data.php" hash="f51c613b4e1c51e9f0603903ca23c15e"/></dir><dir name="Model"><file name="Config.php" hash="cb0d57fc6e4413aaee383fdd0c4a8561"/><dir name="Mysql4"><dir name="Config"><file name="Collection.php" hash="6597fd9214af200077432c71a828bef7"/></dir><file name="Config.php" hash="219d1aa554a7f0e831b857eeba6b5922"/><dir name="Showmap"><file name="Collection.php" hash="39928f65f948052532f6cca11e8d77f4"/></dir><file name="Showmap.php" hash="b4a15de4bb6d27a51f5652b9ae46fc1f"/></dir><file name="Showmap.php" hash="75768aff87a1f07fb9dcbfbbd0e8db43"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="ShowmapController.php" hash="5bd0acd3cf0f406589bc909c8af68e04"/></dir><file name="IndexController.php" hash="421f2ae4615e8a970493d1dc0b9161de"/></dir><dir name="etc"><file name="config.xml" hash="3d5b89a82cec575577a7e934d4f0da01"/></dir><dir name="sql"><dir name="showmap_setup"><file name="mysql4-install-0.1.0.php" hash="cece645218e53f6e7e2208c377bd17f1"/></dir></dir></dir><dir name="Showresponse"><dir name="Block"><dir name="Adminhtml"><dir name="Showresponse"><file name="Description.php" hash="cdb67db4593c75a9e777d7fc2cfce9c7"/><file name="Grid.php" hash="ec7a4bb54469b15bccc8c746aeb4f89e"/></dir><file name="Showresponse.php" hash="55defa5810cf3096b5acdc996f48b70e"/></dir></dir><dir name="Helper"><file name="Data.php" hash="96681b450aef52225dca45b3b8ba8671"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Showresponse"><file name="Collection.php" hash="dbd584d6a892acc90fecac1c77770f86"/></dir><file name="Showresponse.php" hash="589a5ee92993019be201fa5dc439febf"/></dir><file name="Showresponse.php" hash="a922524a51a8edc99652cedb88ca9cb9"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="ShowresponseController.php" hash="a64fecc39d308406866d705423b8e95b"/></dir></dir><dir name="etc"><file name="config.xml" hash="48eedfa413e15d4ec33eda914b7727a5"/></dir><dir name="sql"><dir name="showresponse_setup"><file name="mysql4-install-0.1.0.php" hash="1d33b3ef452a1c385305e920d34b1736"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Raveinfosys_Showmap.xml" hash="ce57a53875aff4c2c2921c01372ce6eb"/><file name="Raveinfosys_Showresponse.xml" hash="49aa5e11fa483202f16541bf703d29c9"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="showmap.xml" hash="c1ebb47555f3b60cad22e1b2f2d20780"/><file name="showresponse.xml" hash="8590cf727e2fa8f2109305c06cfc0cbf"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="showmap.xml" hash="2dc0228bfe8979923bd4fd482231ecb2"/></dir><dir name="template"><dir name="showmap"><file name="showmap.phtml" hash="63fc3c608572293b860811ff3697e467"/></dir></dir></dir></dir></dir></target></contents>
|
17 |
<compatible/>
|
18 |
+
<dependencies><required><php><min>5.2.0</min><max>5.6.20</max></php><extension><name>curl</name><min>7.21.4</min><max>7.44.0</max></extension><extension><name>SimpleXML</name><min/><max/></extension></required></dependencies>
|
19 |
</package>
|