Version Notes
First stable release
Download this release
Release Info
Developer | Magmodules |
Extension | Magmodules_Feedbackcompany |
Version | 1.5.0 |
Comparing to | |
See all releases |
Code changes from version 1.4.9 to 1.5.0
- app/code/community/Magmodules/Feedbackcompany/.DS_Store +0 -0
- app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Feedbacklog.php +28 -22
- app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Feedbacklog/Grid.php +150 -115
- app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Feedbackreviews.php +29 -22
- app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Feedbackreviews/Grid.php +177 -155
- app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Feedbackreviews/Renderer/Experience.php +0 -37
- app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Widget/Buttons/Process.php +27 -21
- app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Widget/Buttons/Productreviews.php +27 -21
- app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Widget/Buttons/Test.php +0 -36
- app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Widget/Field/Version.php +17 -13
- app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Widget/Form/Heading.php +20 -14
- app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Widget/Form/Note.php +18 -12
- app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Widget/Grid/Experience.php +44 -0
- app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Widget/Grid/Log.php +68 -52
- app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Widget/Grid/Seconds.php +21 -15
- app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Widget/Grid/Stars.php +39 -54
- app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Widget/Info/Info.php +56 -40
- app/code/community/Magmodules/Feedbackcompany/Block/Custom.php +119 -87
- app/code/community/Magmodules/Feedbackcompany/Block/Header.php +38 -27
- app/code/community/Magmodules/Feedbackcompany/Block/Reviews.php +89 -61
- app/code/community/Magmodules/Feedbackcompany/Block/Sidebar.php +141 -91
- app/code/community/Magmodules/Feedbackcompany/Helper/Data.php +413 -241
- app/code/community/Magmodules/Feedbackcompany/Model/Api.php +304 -318
- app/code/community/Magmodules/Feedbackcompany/Model/Export.php +105 -69
- app/code/community/Magmodules/Feedbackcompany/Model/Log.php +46 -56
- app/code/community/Magmodules/Feedbackcompany/Model/Mysql4/Log.php +16 -13
- app/code/community/Magmodules/Feedbackcompany/Model/Mysql4/Log/Collection.php +17 -14
- app/code/community/Magmodules/Feedbackcompany/Model/Mysql4/Reviews.php +16 -13
- app/code/community/Magmodules/Feedbackcompany/Model/Mysql4/Reviews/Collection.php +17 -14
- app/code/community/Magmodules/Feedbackcompany/Model/Mysql4/Stats.php +15 -12
- app/code/community/Magmodules/Feedbackcompany/Model/Mysql4/Stats/Collection.php +17 -14
- app/code/community/Magmodules/Feedbackcompany/Model/Observer.php +153 -137
- app/code/community/Magmodules/Feedbackcompany/Model/Productreviews.php +225 -112
- app/code/community/Magmodules/Feedbackcompany/Model/Resource/Review.php +28 -22
- app/code/community/Magmodules/Feedbackcompany/Model/Reviews.php +210 -134
- app/code/community/Magmodules/Feedbackcompany/Model/Stats.php +163 -100
- app/code/community/Magmodules/Feedbackcompany/Model/System/Config/Source/Attribute.php +23 -20
- app/code/community/Magmodules/Feedbackcompany/Model/System/Config/Source/Category.php +50 -39
- app/code/community/Magmodules/Feedbackcompany/Model/System/Config/Source/Cronfrequency.php +24 -21
- app/code/community/Magmodules/Feedbackcompany/Model/System/Config/Source/Cronfrequencylong.php +21 -18
- app/code/community/Magmodules/Feedbackcompany/Model/System/Config/Source/Orderstatus.php +27 -21
- app/code/community/Magmodules/Feedbackcompany/Model/System/Config/Source/Position.php +19 -15
- app/code/community/Magmodules/Feedbackcompany/Model/System/Config/Source/Reviewlink.php +18 -15
- app/code/community/Magmodules/Feedbackcompany/Model/System/Config/Source/Reviewrating.php +23 -17
- app/code/community/Magmodules/Feedbackcompany/Model/System/Config/Source/Reviewstatus.php +20 -16
- app/code/community/Magmodules/Feedbackcompany/Model/System/Config/Source/Sidebarlink.php +19 -16
- app/code/community/Magmodules/Feedbackcompany/controllers/Adminhtml/FeedbacklogController.php +74 -50
- app/code/community/Magmodules/Feedbackcompany/controllers/Adminhtml/FeedbackreviewsController.php +286 -219
- app/code/community/Magmodules/Feedbackcompany/controllers/IndexController.php +33 -30
- app/code/community/Magmodules/Feedbackcompany/data/feedbackcompany_setup/data-upgrade-1.4.1-1.4.2.php +14 -13
- app/code/community/Magmodules/Feedbackcompany/etc/adminhtml.xml +91 -95
- app/code/community/Magmodules/Feedbackcompany/etc/config.xml +268 -251
- app/code/community/Magmodules/Feedbackcompany/etc/system.xml +859 -756
- app/code/community/Magmodules/Feedbackcompany/sql/feedbackcompany_setup/mysql4-install-0.9.0.php +11 -10
- app/code/community/Magmodules/Feedbackcompany/sql/feedbackcompany_setup/mysql4-upgrade-1.2.1-1.2.2.php +17 -16
- app/code/community/Magmodules/Feedbackcompany/sql/feedbackcompany_setup/mysql4-upgrade-1.2.5-1.2.6.php +8 -11
- app/code/community/Magmodules/Feedbackcompany/sql/feedbackcompany_setup/mysql4-upgrade-1.3.0-1.3.1.php +7 -8
- app/code/community/Magmodules/Feedbackcompany/sql/feedbackcompany_setup/mysql4-upgrade-1.4.9-1.5.0.php +65 -0
- app/design/adminhtml/default/default/layout/magmodules_feedbackcompany.xml +24 -3
- app/design/frontend/base/default/layout/magmodules_feedbackcompany.xml +64 -34
- app/design/frontend/base/default/template/magmodules/feedbackcompany/index.phtml +138 -121
- app/design/frontend/base/default/template/magmodules/feedbackcompany/sidebar/left.phtml +81 -56
- app/design/frontend/base/default/template/magmodules/feedbackcompany/sidebar/right.phtml +81 -56
- app/design/frontend/base/default/template/magmodules/feedbackcompany/widget/header.phtml +47 -25
- app/design/frontend/base/default/template/magmodules/feedbackcompany/widget/medium.phtml +60 -52
- app/design/frontend/base/default/template/magmodules/feedbackcompany/widget/sidebar.phtml +77 -53
- app/design/frontend/base/default/template/magmodules/feedbackcompany/widget/small.phtml +34 -36
- app/design/frontend/rwd/default/template/magmodules/feedbackcompany/widget/header.phtml +24 -25
- app/etc/modules/Magmodules_Feedbackcompany.xml +24 -6
- app/locale/nl_NL/Magmodules_Feedbackcompany.csv +5 -4
- package.xml +4 -4
- skin/adminhtml/default/default/magmodules/feedbackcompany/grid.css +39 -40
- skin/frontend/base/default/magmodules/feedbackcompany/richsnippets.css +19 -0
- skin/frontend/base/default/magmodules/feedbackcompany/sidebar.css +265 -88
- skin/frontend/base/default/magmodules/feedbackcompany/style.css +33 -46
app/code/community/Magmodules/Feedbackcompany/.DS_Store
ADDED
Binary file
|
app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Feedbacklog.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,28 +11,35 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
-
class Magmodules_Feedbackcompany_Block_Adminhtml_Feedbacklog extends Mage_Adminhtml_Block_Widget_Grid_Container {
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
|
|
|
|
|
|
38 |
|
39 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
|
|
|
|
20 |
|
21 |
+
class Magmodules_Feedbackcompany_Block_Adminhtml_Feedbacklog extends Mage_Adminhtml_Block_Widget_Grid_Container
|
22 |
+
{
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Magmodules_Feedbackcompany_Block_Adminhtml_Feedbacklog constructor.
|
26 |
+
*/
|
27 |
+
public function __construct()
|
28 |
+
{
|
29 |
+
$this->_controller = 'adminhtml_feedbacklog';
|
30 |
+
$this->_blockGroup = 'feedbackcompany';
|
31 |
+
$this->_headerText = Mage::helper('feedbackcompany')->__('The Feedback Company - Logs');
|
32 |
+
|
33 |
+
parent::__construct();
|
34 |
|
35 |
+
$this->_removeButton('add');
|
36 |
+
$this->_addButton(
|
37 |
+
'feedbackcompany_log',
|
38 |
+
array(
|
39 |
+
'label' => Mage::helper('feedbackcompany')->__('Cleanup Log'),
|
40 |
+
'onclick' => "setLocation('{$this->getUrl('adminhtml/feedbacklog/clean')}')",
|
41 |
+
)
|
42 |
+
);
|
43 |
+
}
|
44 |
|
45 |
}
|
app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Feedbacklog/Grid.php
CHANGED
@@ -3,7 +3,6 @@
|
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,120 +11,156 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
-
class Magmodules_Feedbackcompany_Block_Adminhtml_Feedbacklog_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
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 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
|
131 |
}
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
+
|
21 |
+
class Magmodules_Feedbackcompany_Block_Adminhtml_Feedbacklog_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
22 |
+
{
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Magmodules_Feedbackcompany_Block_Adminhtml_Feedbacklog_Grid constructor.
|
26 |
+
*/
|
27 |
+
public function __construct()
|
28 |
+
{
|
29 |
+
parent::__construct();
|
30 |
+
$this->setId('feedbacklogGrid');
|
31 |
+
$this->setDefaultSort('date');
|
32 |
+
$this->setDefaultDir('DESC');
|
33 |
+
$this->setSaveParametersInSession(true);
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* @param $row
|
38 |
+
*
|
39 |
+
* @return bool
|
40 |
+
*/
|
41 |
+
public function getRowUrl($row)
|
42 |
+
{
|
43 |
+
return false;
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* @return mixed
|
48 |
+
*/
|
49 |
+
protected function _prepareCollection()
|
50 |
+
{
|
51 |
+
$collection = Mage::getModel('feedbackcompany/log')->getCollection();
|
52 |
+
$this->setCollection($collection);
|
53 |
+
return parent::_prepareCollection();
|
54 |
+
}
|
55 |
+
|
56 |
+
/**
|
57 |
+
* @return mixed
|
58 |
+
*/
|
59 |
+
protected function _prepareColumns()
|
60 |
+
{
|
61 |
+
$showApiUrl = Mage::app()->getRequest()->getParam('showapiurl');
|
62 |
+
|
63 |
+
$this->addColumn(
|
64 |
+
'type', array(
|
65 |
+
'header' => Mage::helper('feedbackcompany')->__('Type'),
|
66 |
+
'align' => 'left',
|
67 |
+
'index' => 'type',
|
68 |
+
'width' => '120',
|
69 |
+
'type' => 'options',
|
70 |
+
'options' => array(
|
71 |
+
'reviews' => Mage::helper('feedbackcompany')->__('Reviews'),
|
72 |
+
'productreviews' => Mage::helper('feedbackcompany')->__('Productreviews'),
|
73 |
+
'invitation' => Mage::helper('feedbackcompany')->__('Invitation Call'),
|
74 |
+
),
|
75 |
+
)
|
76 |
+
);
|
77 |
+
|
78 |
+
if ($showApiUrl) {
|
79 |
+
$this->addColumn(
|
80 |
+
'api_url', array(
|
81 |
+
'header' => Mage::helper('feedbackcompany')->__('Api URL'),
|
82 |
+
'align' => 'left',
|
83 |
+
'index' => 'api_url',
|
84 |
+
'filter' => false,
|
85 |
+
'sortable' => false,
|
86 |
+
)
|
87 |
+
);
|
88 |
+
}
|
89 |
+
|
90 |
+
$this->addColumn(
|
91 |
+
'qty', array(
|
92 |
+
'header' => Mage::helper('feedbackcompany')->__('Description'),
|
93 |
+
'align' => 'left',
|
94 |
+
'index' => 'qty',
|
95 |
+
'renderer' => 'feedbackcompany/adminhtml_widget_grid_log',
|
96 |
+
'filter' => false,
|
97 |
+
'sortable' => false,
|
98 |
+
)
|
99 |
+
);
|
100 |
+
|
101 |
+
$this->addColumn(
|
102 |
+
'company', array(
|
103 |
+
'header' => Mage::helper('feedbackcompany')->__('Shop'),
|
104 |
+
'index' => 'company',
|
105 |
+
'width' => '120px',
|
106 |
+
)
|
107 |
+
);
|
108 |
+
|
109 |
+
$this->addColumn(
|
110 |
+
'cron', array(
|
111 |
+
'header' => Mage::helper('feedbackcompany')->__('Cron'),
|
112 |
+
'align' => 'left',
|
113 |
+
'index' => 'cron',
|
114 |
+
'width' => '120',
|
115 |
+
'type' => 'options',
|
116 |
+
'options' => array(
|
117 |
+
'' => Mage::helper('feedbackcompany')->__('Manually'),
|
118 |
+
'stats' => Mage::helper('feedbackcompany')->__('Stats Cron'),
|
119 |
+
'reviews' => Mage::helper('feedbackcompany')->__('Reviews Cron'),
|
120 |
+
'productreviews' => Mage::helper('feedbackcompany')->__('Producteviews Cron'),
|
121 |
+
'orderupdate' => Mage::helper('feedbackcompany')->__('Invitation'),
|
122 |
+
),
|
123 |
+
)
|
124 |
+
);
|
125 |
+
|
126 |
+
$this->addColumn(
|
127 |
+
'time', array(
|
128 |
+
'header' => Mage::helper('feedbackcompany')->__('Time'),
|
129 |
+
'align' => 'left',
|
130 |
+
'index' => 'time',
|
131 |
+
'width' => '60',
|
132 |
+
'renderer' => 'feedbackcompany/adminhtml_widget_grid_seconds',
|
133 |
+
)
|
134 |
+
);
|
135 |
+
|
136 |
+
$this->addColumn(
|
137 |
+
'date', array(
|
138 |
+
'header' => Mage::helper('feedbackcompany')->__('Date'),
|
139 |
+
'align' => 'left',
|
140 |
+
'type' => 'datetime',
|
141 |
+
'index' => 'date',
|
142 |
+
'width' => '140',
|
143 |
+
)
|
144 |
+
);
|
145 |
+
|
146 |
+
return parent::_prepareColumns();
|
147 |
+
}
|
148 |
+
|
149 |
+
/**
|
150 |
+
* @return $this
|
151 |
+
*/
|
152 |
+
protected function _prepareMassaction()
|
153 |
+
{
|
154 |
+
$this->setMassactionIdField('id');
|
155 |
+
$this->getMassactionBlock()->setFormFieldName('logids');
|
156 |
+
$this->getMassactionBlock()->addItem(
|
157 |
+
'hide', array(
|
158 |
+
'label' => Mage::helper('feedbackcompany')->__('Delete'),
|
159 |
+
'url' => $this->getUrl('*/*/massDelete'),
|
160 |
+
)
|
161 |
+
);
|
162 |
+
|
163 |
+
return $this;
|
164 |
+
}
|
165 |
|
166 |
}
|
app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Feedbackreviews.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,27 +11,35 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
-
class Magmodules_Feedbackcompany_Block_Adminhtml_Feedbackreviews extends Mage_Adminhtml_Block_Widget_Grid_Container {
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
|
38 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
|
|
|
|
20 |
|
21 |
+
class Magmodules_Feedbackcompany_Block_Adminhtml_Feedbackreviews extends Mage_Adminhtml_Block_Widget_Grid_Container
|
22 |
+
{
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Magmodules_Feedbackcompany_Block_Adminhtml_Feedbackreviews constructor.
|
26 |
+
*/
|
27 |
+
public function __construct()
|
28 |
+
{
|
29 |
+
$this->_controller = 'adminhtml_feedbackreviews';
|
30 |
+
$this->_blockGroup = 'feedbackcompany';
|
31 |
+
$this->_headerText = Mage::helper('feedbackcompany')->__('The Feedback Company - Reviews');
|
32 |
+
|
33 |
+
parent::__construct();
|
34 |
+
|
35 |
+
$this->_removeButton('add');
|
36 |
+
$this->_addButton(
|
37 |
+
'module_controller', array(
|
38 |
+
'label' => Mage::helper('feedbackcompany')->__('Delete all reviews'),
|
39 |
+
'onclick' => "setLocation('{$this->getUrl('adminhtml/feedbackreviews/truncate')}')",
|
40 |
+
'confirm' => Mage::helper('feedbackcompany')->__('Are you sure you want to delete all reviews?'),
|
41 |
+
)
|
42 |
+
);
|
43 |
+
}
|
44 |
|
45 |
}
|
app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Feedbackreviews/Grid.php
CHANGED
@@ -3,7 +3,6 @@
|
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,160 +11,183 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
-
class Magmodules_Feedbackcompany_Block_Adminhtml_Feedbackreviews_Grid
|
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 |
-
|
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 |
}
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
+
|
21 |
+
class Magmodules_Feedbackcompany_Block_Adminhtml_Feedbackreviews_Grid
|
22 |
+
extends Mage_Adminhtml_Block_Widget_Grid
|
23 |
+
{
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Magmodules_Feedbackcompany_Block_Adminhtml_Feedbackreviews_Grid constructor.
|
27 |
+
*/
|
28 |
+
public function __construct()
|
29 |
+
{
|
30 |
+
parent::__construct();
|
31 |
+
$this->setId('reviewsGrid');
|
32 |
+
$this->setDefaultSort('date_created');
|
33 |
+
$this->setDefaultDir('DESC');
|
34 |
+
$this->setSaveParametersInSession(true);
|
35 |
+
}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* @param $row
|
39 |
+
*
|
40 |
+
* @return bool
|
41 |
+
*/
|
42 |
+
public function getRowUrl($row)
|
43 |
+
{
|
44 |
+
return false;
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* @return mixed
|
49 |
+
*/
|
50 |
+
protected function _prepareCollection()
|
51 |
+
{
|
52 |
+
$collection = Mage::getModel('feedbackcompany/reviews')->getCollection();
|
53 |
+
$this->setCollection($collection);
|
54 |
+
return parent::_prepareCollection();
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* @return mixed
|
59 |
+
*/
|
60 |
+
protected function _prepareColumns()
|
61 |
+
{
|
62 |
+
|
63 |
+
$this->addColumn(
|
64 |
+
'review_id', array(
|
65 |
+
'header' => Mage::helper('feedbackcompany')->__('ID'),
|
66 |
+
'index' => 'feedback_id',
|
67 |
+
'width' => '60px',
|
68 |
+
)
|
69 |
+
);
|
70 |
+
|
71 |
+
$this->addColumn(
|
72 |
+
'company', array(
|
73 |
+
'header' => Mage::helper('feedbackcompany')->__('Shop'),
|
74 |
+
'index' => 'company',
|
75 |
+
)
|
76 |
+
);
|
77 |
+
|
78 |
+
|
79 |
+
$this->addColumn(
|
80 |
+
'customer_name', array(
|
81 |
+
'header' => Mage::helper('feedbackcompany')->__('Name'),
|
82 |
+
'align' => 'left',
|
83 |
+
'index' => 'customer_name',
|
84 |
+
)
|
85 |
+
);
|
86 |
+
|
87 |
+
$this->addColumn(
|
88 |
+
'customer_email', array(
|
89 |
+
'header' => Mage::helper('feedbackcompany')->__('Email'),
|
90 |
+
'align' => 'left',
|
91 |
+
'index' => 'customer_email',
|
92 |
+
)
|
93 |
+
);
|
94 |
+
|
95 |
+
$this->addColumn(
|
96 |
+
'review_text', array(
|
97 |
+
'header' => Mage::helper('feedbackcompany')->__('Review'),
|
98 |
+
'align' => 'left',
|
99 |
+
'index' => 'review_text',
|
100 |
+
'renderer' => 'feedbackcompany/adminhtml_widget_grid_experience',
|
101 |
+
)
|
102 |
+
);
|
103 |
+
|
104 |
+
$this->addColumn(
|
105 |
+
'score', array(
|
106 |
+
'header' => Mage::helper('feedbackcompany')->__('Score'),
|
107 |
+
'align' => 'left',
|
108 |
+
'index' => 'score',
|
109 |
+
'renderer' => 'feedbackcompany/adminhtml_widget_grid_stars',
|
110 |
+
'width' => '110',
|
111 |
+
'filter' => false,
|
112 |
+
'sortable' => true,
|
113 |
+
)
|
114 |
+
);
|
115 |
+
|
116 |
+
$this->addColumn(
|
117 |
+
'date_created', array(
|
118 |
+
'header' => Mage::helper('feedbackcompany')->__('Date'),
|
119 |
+
'align' => 'left',
|
120 |
+
'type' => 'date',
|
121 |
+
'index' => 'date_created',
|
122 |
+
'width' => '140',
|
123 |
+
)
|
124 |
+
);
|
125 |
+
|
126 |
+
$this->addColumn(
|
127 |
+
'sidebar', array(
|
128 |
+
'header' => Mage::helper('feedbackcompany')->__('Sidebar'),
|
129 |
+
'align' => 'left',
|
130 |
+
'width' => '80px',
|
131 |
+
'index' => 'sidebar',
|
132 |
+
'type' => 'options',
|
133 |
+
'options' => array(
|
134 |
+
0 => Mage::helper('feedbackcompany')->__('No'),
|
135 |
+
1 => Mage::helper('feedbackcompany')->__('Yes'),
|
136 |
+
),
|
137 |
+
)
|
138 |
+
);
|
139 |
+
|
140 |
+
$this->addColumn(
|
141 |
+
'status', array(
|
142 |
+
'header' => Mage::helper('feedbackcompany')->__('Active'),
|
143 |
+
'align' => 'left',
|
144 |
+
'width' => '80px',
|
145 |
+
'index' => 'status',
|
146 |
+
'type' => 'options',
|
147 |
+
'options' => array(
|
148 |
+
0 => Mage::helper('feedbackcompany')->__('No'),
|
149 |
+
1 => Mage::helper('feedbackcompany')->__('Yes'),
|
150 |
+
),
|
151 |
+
)
|
152 |
+
);
|
153 |
+
|
154 |
+
return parent::_prepareColumns();
|
155 |
+
}
|
156 |
+
|
157 |
+
/**
|
158 |
+
* @return $this
|
159 |
+
*/
|
160 |
+
protected function _prepareMassaction()
|
161 |
+
{
|
162 |
+
$this->setMassactionIdField('review_id');
|
163 |
+
$this->getMassactionBlock()->setFormFieldName('reviewids');
|
164 |
+
|
165 |
+
$this->getMassactionBlock()->addItem(
|
166 |
+
'hide', array(
|
167 |
+
'label' => Mage::helper('feedbackcompany')->__('Set to invisible'),
|
168 |
+
'url' => $this->getUrl('*/*/massDisable'),
|
169 |
+
)
|
170 |
+
);
|
171 |
+
$this->getMassactionBlock()->addItem(
|
172 |
+
'visible', array(
|
173 |
+
'label' => Mage::helper('feedbackcompany')->__('Set to visible'),
|
174 |
+
'url' => $this->getUrl('*/*/massEnable'),
|
175 |
+
)
|
176 |
+
);
|
177 |
+
$this->getMassactionBlock()->addItem(
|
178 |
+
'addsidebar', array(
|
179 |
+
'label' => Mage::helper('feedbackcompany')->__('Add to Sidebar'),
|
180 |
+
'url' => $this->getUrl('*/*/massEnableSidebar'),
|
181 |
+
)
|
182 |
+
);
|
183 |
+
$this->getMassactionBlock()->addItem(
|
184 |
+
'removesidebar', array(
|
185 |
+
'label' => Mage::helper('feedbackcompany')->__('Remove from Sidebar'),
|
186 |
+
'url' => $this->getUrl('*/*/massDisableSidebar'),
|
187 |
+
)
|
188 |
+
);
|
189 |
+
|
190 |
+
return $this;
|
191 |
+
}
|
192 |
|
193 |
}
|
app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Feedbackreviews/Renderer/Experience.php
DELETED
@@ -1,37 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magmodules.eu - http://www.magmodules.eu
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
9 |
-
* It is also available through the world-wide-web at this URL:
|
10 |
-
* http://opensource.org/licenses/osl-3.0.php
|
11 |
-
* If you did not receive a copy of the license and are unable to
|
12 |
-
* obtain it through the world-wide-web, please send an email
|
13 |
-
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
-
*
|
15 |
-
* @category Magmodules
|
16 |
-
* @package Magmodules_Feedbackcompany
|
17 |
-
* @author Magmodules <info@magmodules.eu)
|
18 |
-
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
19 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
-
*/
|
21 |
-
|
22 |
-
class Magmodules_Feedbackcompany_Block_Adminhtml_Feedbackreviews_Renderer_Experience extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract {
|
23 |
-
|
24 |
-
public function render(Varien_Object $row)
|
25 |
-
{
|
26 |
-
$value = $row->getData($this->getColumn()->getIndex());
|
27 |
-
$char_limit = '100';
|
28 |
-
if(strlen($value) > $char_limit) {
|
29 |
-
$content_small = Mage::helper('core/string')->truncate($value, $char_limit, ' ... <a href="#" class="magtooltip" alt="">(meer)', $_remainder, true);
|
30 |
-
$content = $content_small . '<span>' . $value . '</span></a>';
|
31 |
-
return $content;
|
32 |
-
} else {
|
33 |
-
return $value;
|
34 |
-
}
|
35 |
-
}
|
36 |
-
|
37 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Widget/Buttons/Process.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,26 +11,33 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
-
class Magmodules_Feedbackcompany_Block_Adminhtml_Widget_Buttons_Process extends Mage_Adminhtml_Block_System_Config_Form_Field {
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
|
37 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
|
|
|
|
20 |
|
21 |
+
class Magmodules_Feedbackcompany_Block_Adminhtml_Widget_Buttons_Process
|
22 |
+
extends Mage_Adminhtml_Block_System_Config_Form_Field
|
23 |
+
{
|
24 |
+
|
25 |
+
/**
|
26 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
27 |
+
* @return mixed
|
28 |
+
*/
|
29 |
+
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
30 |
+
{
|
31 |
+
$this->setElement($element);
|
32 |
+
$url = $this->getUrl('*/feedbackreviews/process');
|
33 |
+
$html = $this->getLayout()->createBlock('adminhtml/widget_button')
|
34 |
+
->setType('button')
|
35 |
+
->setClass('scalable')
|
36 |
+
->setLabel(Mage::helper('feedbackcompany')->__('Import all reviews'))
|
37 |
+
->setOnClick("setLocation('$url')")
|
38 |
+
->toHtml();
|
39 |
+
|
40 |
+
return $html;
|
41 |
+
}
|
42 |
|
43 |
}
|
app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Widget/Buttons/Productreviews.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,26 +11,33 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
-
class Magmodules_Feedbackcompany_Block_Adminhtml_Widget_Buttons_Productreviews extends Mage_Adminhtml_Block_System_Config_Form_Field {
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
|
37 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
|
|
|
|
20 |
|
21 |
+
class Magmodules_Feedbackcompany_Block_Adminhtml_Widget_Buttons_Productreviews
|
22 |
+
extends Mage_Adminhtml_Block_System_Config_Form_Field
|
23 |
+
{
|
24 |
+
|
25 |
+
/**
|
26 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
27 |
+
* @return mixed
|
28 |
+
*/
|
29 |
+
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
30 |
+
{
|
31 |
+
$this->setElement($element);
|
32 |
+
$url = $this->getUrl('*/feedbackreviews/productreviews');
|
33 |
+
$html = $this->getLayout()->createBlock('adminhtml/widget_button')
|
34 |
+
->setType('button')
|
35 |
+
->setClass('scalable')
|
36 |
+
->setLabel(Mage::helper('feedbackcompany')->__('Process Manually'))
|
37 |
+
->setOnClick("setLocation('$url')")
|
38 |
+
->toHtml();
|
39 |
+
|
40 |
+
return $html;
|
41 |
+
}
|
42 |
|
43 |
}
|
app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Widget/Buttons/Test.php
DELETED
@@ -1,36 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magmodules.eu - http://www.magmodules.eu
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
9 |
-
* It is also available through the world-wide-web at this URL:
|
10 |
-
* http://opensource.org/licenses/osl-3.0.php
|
11 |
-
* If you did not receive a copy of the license and are unable to
|
12 |
-
* obtain it through the world-wide-web, please send an email
|
13 |
-
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
-
*
|
15 |
-
* @category Magmodules
|
16 |
-
* @package Magmodules_Feedbackcompany
|
17 |
-
* @author Magmodules <info@magmodules.eu)
|
18 |
-
* @copyright Copyright (c) 2015 (http://www.magmodules.eu)
|
19 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
-
*/
|
21 |
-
|
22 |
-
class Magmodules_Feedbackcompany_Block_Adminhtml_Widget_Buttons_Test extends Mage_Adminhtml_Block_System_Config_Form_Field {
|
23 |
-
|
24 |
-
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) {
|
25 |
-
$this->setElement($element);
|
26 |
-
$url = $this->getUrl('*/feedbackreviews/testapi');
|
27 |
-
$html = $this->getLayout()->createBlock('adminhtml/widget_button')
|
28 |
-
->setType('button')
|
29 |
-
->setClass('scalable')
|
30 |
-
->setLabel(Mage::helper('feedbackcompany')->__('Test API'))
|
31 |
-
->setOnClick("setLocation('$url')")
|
32 |
-
->toHtml();
|
33 |
-
return $html;
|
34 |
-
}
|
35 |
-
|
36 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Widget/Field/Version.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,19 +11,24 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
-
class Magmodules_Feedbackcompany_Block_Adminhtml_Widget_Field_Version extends Mage_Adminhtml_Block_System_Config_Form_Field {
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
}
|
29 |
-
|
30 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
|
|
|
|
20 |
|
21 |
+
class Magmodules_Feedbackcompany_Block_Adminhtml_Widget_Field_Version
|
22 |
+
extends Mage_Adminhtml_Block_System_Config_Form_Field
|
23 |
+
{
|
24 |
|
25 |
+
/**
|
26 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
27 |
+
* @return mixed
|
28 |
+
*/
|
29 |
+
public function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
30 |
+
{
|
31 |
+
return Mage::getConfig()->getNode()->modules->Magmodules_Feedbackcompany->version;
|
32 |
}
|
33 |
+
|
34 |
}
|
app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Widget/Form/Heading.php
CHANGED
@@ -3,7 +3,6 @@
|
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,21 +11,28 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
|
22 |
-
class Magmodules_Feedbackcompany_Block_Adminhtml_Widget_Form_Heading extends Mage_Adminhtml_Block_Abstract
|
|
|
|
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
|
|
|
|
|
|
|
|
|
|
31 |
|
32 |
}
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
|
21 |
+
class Magmodules_Feedbackcompany_Block_Adminhtml_Widget_Form_Heading extends Mage_Adminhtml_Block_Abstract
|
22 |
+
implements Varien_Data_Form_Element_Renderer_Interface
|
23 |
+
{
|
24 |
|
25 |
+
/**
|
26 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
27 |
+
* @return string
|
28 |
+
*/
|
29 |
+
public function render(Varien_Data_Form_Element_Abstract $element)
|
30 |
+
{
|
31 |
+
return sprintf(
|
32 |
+
'<tr class="system-fieldset-sub-head" id="row_%s"><td colspan="5"><h4>%s</h4></td></tr>',
|
33 |
+
$element->getHtmlId(),
|
34 |
+
$element->getLabel()
|
35 |
+
);
|
36 |
+
}
|
37 |
|
38 |
}
|
app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Widget/Form/Note.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,20 +11,27 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
class Magmodules_Feedbackcompany_Block_Adminhtml_Widget_Form_Note extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface {
|
22 |
|
23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
{
|
25 |
-
|
26 |
-
|
27 |
$element->getHtmlId(), $element->getLabel()
|
28 |
);
|
29 |
}
|
30 |
-
|
31 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
|
|
20 |
|
21 |
+
class Magmodules_Feedbackcompany_Block_Adminhtml_Widget_Form_Note extends Mage_Adminhtml_Block_Abstract
|
22 |
+
implements Varien_Data_Form_Element_Renderer_Interface
|
23 |
+
{
|
24 |
+
|
25 |
+
/**
|
26 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
27 |
+
* @return string
|
28 |
+
*/
|
29 |
+
public function render(Varien_Data_Form_Element_Abstract $element)
|
30 |
{
|
31 |
+
return sprintf(
|
32 |
+
'<tr id="row_%s"><td colspan="5" class="label" style="margin-bottom: 10px;">%s</td></tr>',
|
33 |
$element->getHtmlId(), $element->getLabel()
|
34 |
);
|
35 |
}
|
36 |
+
|
37 |
}
|
app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Widget/Grid/Experience.php
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
+
* that is bundled with this package in the file LICENSE.txt.
|
8 |
+
* It is also available through the world-wide-web at this URL:
|
9 |
+
* http://opensource.org/licenses/osl-3.0.php
|
10 |
+
* If you did not receive a copy of the license and are unable to
|
11 |
+
* obtain it through the world-wide-web, please send an email
|
12 |
+
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
+
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
class Magmodules_Feedbackcompany_Block_Adminhtml_Widget_Grid_Experience
|
22 |
+
extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
|
23 |
+
{
|
24 |
+
|
25 |
+
/**
|
26 |
+
* @param Varien_Object $row
|
27 |
+
* @return string
|
28 |
+
*/
|
29 |
+
public function render(Varien_Object $row)
|
30 |
+
{
|
31 |
+
$value = $row->getData($this->getColumn()->getIndex());
|
32 |
+
$charLimit = '100';
|
33 |
+
if (strlen($value) > $charLimit) {
|
34 |
+
$more = ' ... <a href="#" class="magtooltip" alt="">' . Mage::helper('feedbackcompany')->__('(more)');
|
35 |
+
$trucated = Mage::helper('core/string')->truncate($value, $charLimit, $more);
|
36 |
+
$content = $trucated . '<span>' . $value . '</span></a>';
|
37 |
+
|
38 |
+
return $content;
|
39 |
+
} else {
|
40 |
+
return $value;
|
41 |
+
}
|
42 |
+
}
|
43 |
+
|
44 |
+
}
|
app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Widget/Grid/Log.php
CHANGED
@@ -3,7 +3,6 @@
|
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,62 +11,79 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
|
22 |
-
class Magmodules_Feedbackcompany_Block_Adminhtml_Widget_Grid_Log
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
if($updates > 0) {
|
37 |
-
$msg .= ', ';
|
38 |
-
}
|
39 |
-
$msg .= Mage::helper('feedbackcompany')->__('%s review(s) updated', $row->getReviewUpdate());
|
40 |
-
$updates++;
|
41 |
-
}
|
42 |
-
if($updates > 0) {
|
43 |
-
$msg .= ' & ';
|
44 |
-
}
|
45 |
-
$msg .= Mage::helper('feedbackcompany')->__('total score updated');
|
46 |
-
|
47 |
-
if(!empty($row->getResponse())) {
|
48 |
-
$msg = $row->getResponse();
|
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 |
}
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
|
21 |
+
class Magmodules_Feedbackcompany_Block_Adminhtml_Widget_Grid_Log
|
22 |
+
extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Action
|
23 |
+
{
|
24 |
+
|
25 |
+
/**
|
26 |
+
* @param Varien_Object $row
|
27 |
+
* @return string
|
28 |
+
*/
|
29 |
+
public function render(Varien_Object $row)
|
30 |
+
{
|
31 |
+
$msg = '';
|
32 |
+
$type = $row->getType();
|
33 |
+
|
34 |
+
if ($type == 'reviews') {
|
35 |
+
$updates = '';
|
36 |
+
if ($row->getReviewNew() > 0) {
|
37 |
+
$msg .= Mage::helper('feedbackcompany')->__('%s new review(s)', $row->getReviewNew());
|
38 |
+
$updates++;
|
39 |
+
}
|
40 |
+
|
41 |
+
if ($row->getReviewUpdate() > 0) {
|
42 |
+
if ($updates > 0) {
|
43 |
+
$msg .= ', ';
|
44 |
+
}
|
45 |
+
|
46 |
+
$msg .= Mage::helper('feedbackcompany')->__('%s review(s) updated', $row->getReviewUpdate());
|
47 |
+
$updates++;
|
48 |
+
}
|
49 |
+
|
50 |
+
if ($updates > 0) {
|
51 |
+
$msg .= ' & ';
|
52 |
+
}
|
53 |
+
|
54 |
+
$msg .= Mage::helper('feedbackcompany')->__('total score updated');
|
55 |
+
|
56 |
+
$response = $row->getResponse();
|
57 |
|
58 |
+
if (!empty($response)) {
|
59 |
+
$msg = $row->getResponse();
|
60 |
+
}
|
61 |
+
}
|
62 |
|
63 |
+
if ($type == 'productreviews') {
|
64 |
+
if ($row->getReviewNew() > 0) {
|
65 |
+
$msg = Mage::helper('feedbackcompany')->__('%s new productreview(s) imported', $row->getReviewNew());
|
66 |
+
} else {
|
67 |
+
$msg = Mage::helper('feedbackcompany')->__('No new reviews');
|
68 |
+
}
|
69 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
|
71 |
+
if ($type == 'invitation') {
|
72 |
+
if ($row->getOrderId()) {
|
73 |
+
$order = Mage::getModel('sales/order')->load($row->getOrderId());
|
74 |
+
$incrementId = $order->getIncrementId();
|
75 |
+
$orderUrl = Mage::helper('adminhtml')->getUrl(
|
76 |
+
"adminhtml/sales_order/view",
|
77 |
+
array('order_id' => $row->getOrderId())
|
78 |
+
);
|
79 |
+
$msg = Mage::helper('feedbackcompany')->__(
|
80 |
+
'%s - %s',
|
81 |
+
'<a href="' . $orderUrl . '">#' . $incrementId . '</a>', $row->getResponse()
|
82 |
+
);
|
83 |
+
}
|
84 |
+
}
|
|
|
|
|
85 |
|
86 |
+
return ucfirst($msg);
|
87 |
+
}
|
88 |
|
89 |
}
|
app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Widget/Grid/Seconds.php
CHANGED
@@ -3,7 +3,6 @@
|
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,22 +11,29 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
|
22 |
-
class Magmodules_Feedbackcompany_Block_Adminhtml_Widget_Grid_Seconds
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
$value = $row->getData($this->getColumn()->getIndex());
|
27 |
-
if($value > 0) {
|
28 |
-
$value = number_format($value, 3, '.', '');
|
29 |
-
}
|
30 |
-
return $value;
|
31 |
-
}
|
32 |
|
33 |
}
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
|
21 |
+
class Magmodules_Feedbackcompany_Block_Adminhtml_Widget_Grid_Seconds
|
22 |
+
extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Action
|
23 |
+
{
|
24 |
+
|
25 |
+
/**
|
26 |
+
* @param Varien_Object $row
|
27 |
+
* @return string
|
28 |
+
*/
|
29 |
+
public function render(Varien_Object $row)
|
30 |
+
{
|
31 |
+
$value = $row->getData($this->getColumn()->getIndex());
|
32 |
+
if ($value > 0) {
|
33 |
+
$value = number_format($value, 3, '.', '');
|
34 |
+
}
|
35 |
|
36 |
+
return $value;
|
37 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
|
39 |
}
|
app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Widget/Grid/Stars.php
CHANGED
@@ -3,7 +3,6 @@
|
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,60 +11,46 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
-
class Magmodules_Feedbackcompany_Block_Adminhtml_Widget_Grid_Stars extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Action {
|
23 |
-
|
24 |
-
public function render(Varien_Object $row)
|
25 |
-
{
|
26 |
-
$value = $row->getData($this->getColumn()->getIndex());
|
27 |
-
|
28 |
-
if($value == '0') {
|
29 |
-
$output = '';
|
30 |
-
} else {
|
31 |
-
$output = '<span class="rating-empty"><span class="rating-star-' . $value . '"></span></span>';
|
32 |
-
$output .= '<a href="#" class="magtooltip" alt="">(i)<span>';
|
33 |
-
|
34 |
-
if($row->getData('score_aftersales') > 0) {
|
35 |
-
$output .= '<strong>' . Mage::helper('feedbackcompany')->__('Aftersales:') . '</strong> ' . $row->getData('score_aftersales') . '/5<br>';
|
36 |
-
}
|
37 |
-
if($row->getData('score_checkout') > 0) {
|
38 |
-
$output .= '<strong>' . Mage::helper('feedbackcompany')->__('Checkout process:') . '</strong> ' . $row->getData('score_checkout') . '/5<br>';
|
39 |
-
}
|
40 |
-
if($row->getData('score_information' > 0)) {
|
41 |
-
$output .= '<strong>' . Mage::helper('feedbackcompany')->__('Information:') . '</strong> ' . $row->getData('score_information') . '/5<br>';
|
42 |
-
}
|
43 |
-
if($row->getData('score_friendly') > 0) {
|
44 |
-
$output .= '<strong>' . Mage::helper('feedbackcompany')->__('Customer Friendlyness:') . '</strong> ' . $row->getData('score_friendly') . '/5<br>';
|
45 |
-
}
|
46 |
-
if($row->getData('score_leadtime') > 0) {
|
47 |
-
$output .= '<strong>' . Mage::helper('feedbackcompany')->__('Leadtime:') . '</strong> ' . $row->getData('score_leadtime') . '/5<br>';
|
48 |
-
}
|
49 |
-
if($row->getData('score_responsetime') > 0) {
|
50 |
-
$output .= '<strong>' . Mage::helper('feedbackcompany')->__('Repsonsetime:') . '</strong> ' . $row->getData('score_responsetime') . '/5<br>';
|
51 |
-
}
|
52 |
-
if($row->getData('score_order') > 0) {
|
53 |
-
$output .= '<strong>' . Mage::helper('feedbackcompany')->__('Order process:') . '</strong> ' . $row->getData('score_order') . '/5<br>';
|
54 |
-
}
|
55 |
-
|
56 |
-
$output .= '<br/>';
|
57 |
-
|
58 |
-
if($row->getData('text_positive')) {
|
59 |
-
$output .= '<strong>' . Mage::helper('feedbackcompany')->__('Strong:') . '</strong> ' . $row->getData('text_positive') .'<br>';
|
60 |
-
}
|
61 |
-
if($row->getData('text_improvements')) {
|
62 |
-
$output .= '<strong>' . Mage::helper('feedbackcompany')->__('Can do better:') . '</strong> ' . $row->getData('text_improvements') .'<br>';
|
63 |
-
}
|
64 |
-
|
65 |
-
$output .= '</span></a>';
|
66 |
-
}
|
67 |
|
68 |
-
|
69 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
|
71 |
}
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
|
21 |
+
class Magmodules_Feedbackcompany_Block_Adminhtml_Widget_Grid_Stars
|
22 |
+
extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Action
|
23 |
+
{
|
24 |
+
|
25 |
+
/**
|
26 |
+
* @param Varien_Object $row
|
27 |
+
*
|
28 |
+
* @return string
|
29 |
+
*/
|
30 |
+
public function render(Varien_Object $row)
|
31 |
+
{
|
32 |
+
if ($row->getScore() == '0') {
|
33 |
+
return '';
|
34 |
+
}
|
35 |
+
|
36 |
+
$output = '<span class="rating-empty"><span class="rating-star-' . $row->getScore() . '"></span></span>';
|
37 |
+
|
38 |
+
$extra = '';
|
39 |
+
if ($questions = $row->getQuestions()) {
|
40 |
+
$questions = Mage::helper('feedbackcompany')->getQuestions($questions, false);
|
41 |
+
foreach ($questions as $question) {
|
42 |
+
$extra .= '<p><strong>' . $question['Reviewtitle'] . ':</strong> ';
|
43 |
+
$extra .= $question['value_html'] . '</p>';
|
44 |
+
}
|
45 |
+
}
|
46 |
+
|
47 |
+
if (!empty($extra)) {
|
48 |
+
$output .= '<a href="#" class="magtooltip" alt="">(i)<span>';
|
49 |
+
$output .= $extra;
|
50 |
+
$output .= '</span></a>';
|
51 |
+
}
|
52 |
+
|
53 |
+
return $output;
|
54 |
+
}
|
55 |
|
56 |
}
|
app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Widget/Info/Info.php
CHANGED
@@ -3,7 +3,6 @@
|
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,50 +11,67 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
-
class Magmodules_Feedbackcompany_Block_Adminhtml_Widget_Info_Info extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface {
|
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 |
-
if(file_exists(Mage::getBaseDir('app') . DS . 'code' . DS . 'local' . DS . 'Magmodules' . DS . 'Feedbackcompany')) {
|
55 |
-
$msg = '<div id="messages"><ul class="messages"><li class="error-msg"><ul><li><span>' . Mage::helper('adminhtml')->__('There is an older version detected on the server, please remove the directory <u>app/code/local/Magmodules/Feedbackcompany</u> from your server using FTP and flush cache.') . '</span></li></ul></li></ul></div>';
|
56 |
-
$html = $msg . $html;
|
57 |
-
}
|
58 |
-
|
59 |
return $html;
|
60 |
}
|
61 |
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
|
|
|
|
20 |
|
21 |
+
class Magmodules_Feedbackcompany_Block_Adminhtml_Widget_Info_Info extends Mage_Adminhtml_Block_Abstract
|
22 |
+
implements Varien_Data_Form_Element_Renderer_Interface
|
23 |
+
{
|
24 |
+
|
25 |
+
/**
|
26 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
27 |
+
*
|
28 |
+
* @return string
|
29 |
+
*/
|
30 |
+
public function render(Varien_Data_Form_Element_Abstract $element)
|
31 |
{
|
32 |
+
$magentoVersion = Mage::getVersion();
|
33 |
+
$moduleVersion = Mage::getConfig()->getNode()->modules->Magmodules_Feedbackcompany->version;
|
34 |
+
$logoLink = '//www.magmodules.eu/logo/feedbackcompany/' . $moduleVersion . '/' . $magentoVersion . '/logo.png';
|
35 |
|
36 |
+
$html = '<div style="background:url(\'' . $logoLink . '\') no-repeat scroll 15px center #EAF0EE;
|
37 |
+
border:1px solid #CCC;margin-bottom:10px;padding:10px 5px 5px 200px;">
|
38 |
+
<h4>About Magmodules.eu</h4>
|
39 |
+
<p>We are a Magento only E-commerce Agency located in the Netherlands.<br>
|
40 |
+
<br />
|
41 |
+
<table width="500px" border="0">
|
42 |
+
<tr>
|
43 |
+
<td width="58%">View more extensions from us:</td>
|
44 |
+
<td width="42%">
|
45 |
+
<a href="http://www.magentocommerce.com/magento-connect/developer/Magmodules" target="_blank">
|
46 |
+
Magento Connect
|
47 |
+
</a>
|
48 |
+
</td>
|
49 |
+
</tr>
|
50 |
+
<tr>
|
51 |
+
<td>For Help:</td>
|
52 |
+
<td>
|
53 |
+
<a href="https://www.magmodules.eu/support.html?ext=feedbackcompany">
|
54 |
+
Visit our Support Page
|
55 |
+
</a>
|
56 |
+
</td>
|
57 |
+
</tr>
|
58 |
+
<tr>
|
59 |
+
<td height="30">Visit our website:</td>
|
60 |
+
<td><a href="http://www.magmodules.eu" target="_blank">www.magmodules.eu</a></td>
|
61 |
+
</tr>
|
62 |
+
<tr>
|
63 |
+
<td height="30"><strong>Need help?</strong></td>
|
64 |
+
<td>
|
65 |
+
<strong>
|
66 |
+
<a href="http://www.magmodules.eu/help/feedbackcompany" target="_blank">
|
67 |
+
Online manual
|
68 |
+
</a>
|
69 |
+
</strong>
|
70 |
+
</td>
|
71 |
+
</tr>
|
72 |
+
</table>
|
73 |
+
</div>';
|
74 |
|
|
|
|
|
|
|
|
|
|
|
75 |
return $html;
|
76 |
}
|
77 |
|
app/code/community/Magmodules/Feedbackcompany/Block/Custom.php
CHANGED
@@ -3,7 +3,6 @@
|
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,100 +11,133 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
-
class Magmodules_Feedbackcompany_Block_Custom extends Mage_Core_Block_Template {
|
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 |
-
public function getFeedbackcompanyData()
|
82 |
-
{
|
83 |
-
return $this->helper('feedbackcompany')->getTotalScore();
|
84 |
-
}
|
85 |
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
|
|
|
|
|
|
90 |
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
|
106 |
-
public function getHtmlStars($percentage, $type)
|
107 |
-
{
|
108 |
-
return $this->helper('feedbackcompany')->getHtmlStars($percentage, $type);
|
109 |
-
}
|
110 |
-
|
111 |
}
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
|
|
|
|
20 |
|
21 |
+
class Magmodules_Feedbackcompany_Block_Custom extends Mage_Core_Block_Template
|
22 |
+
{
|
23 |
+
|
24 |
+
/**
|
25 |
+
*
|
26 |
+
*/
|
27 |
+
protected function _construct()
|
28 |
{
|
29 |
+
parent::_construct();
|
30 |
+
|
31 |
+
$blockType = $this->getData("blocktype");
|
32 |
+
$blockTypeTemplate = '';
|
33 |
+
$total = $this->helper('feedbackcompany')->getTotalScore();
|
34 |
+
|
35 |
+
if ($blockType == 'sidebar') {
|
36 |
+
$enabled = $this->helper('feedbackcompany')->getBlockEnabled('sidebar');
|
37 |
+
$sidebarreviews = $this->helper('feedbackcompany')->getSidebarCollection('sidebar');
|
38 |
+
if ($total && $enabled && $sidebarreviews) {
|
39 |
+
$this->setTotals($total);
|
40 |
+
$this->setReviews($sidebarreviews);
|
41 |
+
$blockTypeTemplate = 'magmodules/feedbackcompany/widget/sidebar.phtml';
|
42 |
+
}
|
43 |
+
}
|
44 |
+
|
45 |
+
if ($blockType == 'medium') {
|
46 |
+
$enabled = $this->helper('feedbackcompany')->getBlockEnabled('medium');
|
47 |
+
if ($total && $enabled) {
|
48 |
+
$this->setTotals($total);
|
49 |
+
$blockTypeTemplate = 'magmodules/feedbackcompany/widget/medium.phtml';
|
50 |
+
}
|
51 |
+
}
|
52 |
+
|
53 |
+
if ($blockType == 'small') {
|
54 |
+
$enabled = $this->helper('feedbackcompany')->getBlockEnabled('small');
|
55 |
+
if ($total && $enabled) {
|
56 |
+
$this->setTotals($total);
|
57 |
+
$blockTypeTemplate = 'magmodules/feedbackcompany/widget/small.phtml';
|
58 |
+
}
|
59 |
+
}
|
|
|
|
|
60 |
|
61 |
+
if ($blockType == 'summary') {
|
62 |
+
$enabled = $this->helper('feedbackcompany')->getBlockEnabled('summary');
|
63 |
+
if ($total && $enabled) {
|
64 |
+
$this->setTotals($total);
|
65 |
+
$blockTypeTemplate = 'magmodules/feedbackcompany/widget/summary.phtml';
|
66 |
+
}
|
67 |
+
}
|
68 |
+
|
69 |
+
if ($blockTypeTemplate) {
|
70 |
+
$this->addData(
|
71 |
+
array(
|
72 |
+
'cache_lifetime' => 7200,
|
73 |
+
'cache_tags' => array(
|
74 |
+
Mage_Cms_Model_Block::CACHE_TAG,
|
75 |
+
Magmodules_Feedbackcompany_Model_Reviews::CACHE_TAG
|
76 |
+
),
|
77 |
+
'cache_key' => Mage::app()->getStore()->getStoreId() . '-' . $blockType . '-feedback-block',
|
78 |
+
)
|
79 |
+
);
|
80 |
+
parent::_construct();
|
81 |
+
$this->setTemplate($blockTypeTemplate);
|
82 |
+
}
|
83 |
}
|
|
|
|
|
|
|
|
|
|
|
84 |
|
85 |
+
/**
|
86 |
+
* @return mixed
|
87 |
+
*/
|
88 |
+
public function getFeedbackcompanyData()
|
89 |
+
{
|
90 |
+
return $this->helper('feedbackcompany')->getTotalScore();
|
91 |
+
}
|
92 |
|
93 |
+
/**
|
94 |
+
* @param $sidebarreview
|
95 |
+
* @param $sidebar
|
96 |
+
*
|
97 |
+
* @return mixed
|
98 |
+
*/
|
99 |
+
public function formatContent($sidebarreview, $sidebar)
|
100 |
+
{
|
101 |
+
return $this->helper('feedbackcompany')->formatContent($sidebarreview, $sidebar);
|
102 |
+
}
|
103 |
|
104 |
+
/**
|
105 |
+
* @param $type
|
106 |
+
*
|
107 |
+
* @return mixed
|
108 |
+
*/
|
109 |
+
public function getReviewsUrl($type)
|
110 |
+
{
|
111 |
+
return $this->helper('feedbackcompany')->getReviewsUrl($type);
|
112 |
+
}
|
113 |
+
|
114 |
+
/**
|
115 |
+
* @param $sidebar
|
116 |
+
*
|
117 |
+
* @return mixed
|
118 |
+
*/
|
119 |
+
public function getSnippetsEnabled($sidebar)
|
120 |
+
{
|
121 |
+
return $this->helper('feedbackcompany')->getSnippetsEnabled($sidebar);
|
122 |
+
}
|
123 |
|
124 |
+
/**
|
125 |
+
* @return mixed
|
126 |
+
*/
|
127 |
+
public function getLatestReview()
|
128 |
+
{
|
129 |
+
return $this->helper('feedbackcompany')->getLatestReview();
|
130 |
+
}
|
131 |
+
|
132 |
+
/**
|
133 |
+
* @param $percentage
|
134 |
+
* @param $type
|
135 |
+
*
|
136 |
+
* @return mixed
|
137 |
+
*/
|
138 |
+
public function getHtmlStars($percentage, $type)
|
139 |
+
{
|
140 |
+
return $this->helper('feedbackcompany')->getHtmlStars($percentage, $type);
|
141 |
+
}
|
142 |
|
|
|
|
|
|
|
|
|
|
|
143 |
}
|
app/code/community/Magmodules/Feedbackcompany/Block/Header.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,35 +12,46 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
|
|
|
|
21 |
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
|
|
26 |
parent::_construct();
|
27 |
-
$total = $this->helper('feedbackcompany')->getTotalScore();
|
28 |
-
$enabled = $this->helper('feedbackcompany')->getBlockEnabled('header');
|
29 |
-
if($total && $enabled) {
|
30 |
-
$this->setTotals($total);
|
31 |
-
$blockTypeTemplate = 'magmodules/feedbackcompany/widget/header.phtml';
|
32 |
-
$this->setTemplate($blockTypeTemplate);
|
33 |
-
}
|
34 |
-
}
|
35 |
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
-
public function getSnippetsEnabled()
|
42 |
-
{
|
43 |
-
return $this->helper('feedbackcompany')->getSnippetsEnabled('header');
|
44 |
-
}
|
45 |
-
|
46 |
}
|
1 |
<?php
|
2 |
+
|
3 |
/**
|
4 |
* Magmodules.eu - http://www.magmodules.eu
|
5 |
*
|
6 |
* NOTICE OF LICENSE
|
|
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
+
* @category Magmodules
|
16 |
+
* @package Magmodules_Feedbackcompany
|
17 |
+
* @author Magmodules <info@magmodules.eu>
|
18 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
+
class Magmodules_Feedbackcompany_Block_Header extends Mage_Core_Block_Template
|
22 |
+
{
|
23 |
|
24 |
+
/**
|
25 |
+
*
|
26 |
+
*/
|
27 |
+
protected function _construct()
|
28 |
+
{
|
29 |
parent::_construct();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
+
$total = $this->helper('feedbackcompany')->getTotalScore();
|
32 |
+
$enabled = $this->helper('feedbackcompany')->getBlockEnabled('header');
|
33 |
+
|
34 |
+
if ($total && $enabled) {
|
35 |
+
$this->setTotals($total);
|
36 |
+
$blockTypeTemplate = 'magmodules/feedbackcompany/widget/header.phtml';
|
37 |
+
$this->setTemplate($blockTypeTemplate);
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* @return mixed
|
43 |
+
*/
|
44 |
+
public function getReviewsUrl()
|
45 |
+
{
|
46 |
+
return $this->helper('feedbackcompany')->getReviewsUrl('header');
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* @return mixed
|
51 |
+
*/
|
52 |
+
public function getSnippetsEnabled()
|
53 |
+
{
|
54 |
+
return $this->helper('feedbackcompany')->getSnippetsEnabled('header');
|
55 |
+
}
|
56 |
|
|
|
|
|
|
|
|
|
|
|
57 |
}
|
app/code/community/Magmodules/Feedbackcompany/Block/Reviews.php
CHANGED
@@ -3,7 +3,6 @@
|
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,69 +11,98 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
-
class Magmodules_Feedbackcompany_Block_Reviews extends Mage_Core_Block_Template {
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
$fieldPerPage = array_combine($fieldPerPage, $fieldPerPage);
|
45 |
-
$pager->setAvailableLimit($fieldPerPage);
|
46 |
-
} else {
|
47 |
-
$pager->setAvailableLimit(array('all'=>'all'));
|
48 |
-
}
|
49 |
-
$pager->setCollection($this->getReviews());
|
50 |
-
$this->setChild('pager', $pager);
|
51 |
-
$this->getReviews()->load();
|
52 |
-
return $this;
|
53 |
-
}
|
54 |
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
}
|
64 |
|
65 |
-
public function getReviewUrl()
|
66 |
-
{
|
67 |
-
return Mage::getStoreConfig('feedbackcompany/general/url');
|
68 |
-
}
|
69 |
-
|
70 |
-
public function getPageIntro()
|
71 |
-
{
|
72 |
-
return nl2br(Mage::getStoreConfig('feedbackcompany/overview/intro'));
|
73 |
-
}
|
74 |
-
|
75 |
-
public function formatScoresReview($review)
|
76 |
-
{
|
77 |
-
return $this->helper('feedbackcompany')->formatScoresReview($review);
|
78 |
-
}
|
79 |
-
|
80 |
}
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
|
|
|
|
20 |
|
21 |
+
class Magmodules_Feedbackcompany_Block_Reviews extends Mage_Core_Block_Template
|
22 |
+
{
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @return $this
|
26 |
+
*/
|
27 |
+
public function _prepareLayout()
|
28 |
+
{
|
29 |
+
parent::_prepareLayout();
|
30 |
+
|
31 |
+
$pager = $this->getLayout()->createBlock('page/html_pager', 'feedbackcompany.pager');
|
32 |
+
|
33 |
+
if (Mage::getStoreConfig('feedbackcompany/overview/enable_paging')) {
|
34 |
+
$fieldPerPage = Mage::getStoreConfig('feedbackcompany/overview/paging_settings');
|
35 |
+
$fieldPerPage = explode(',', $fieldPerPage);
|
36 |
+
$fieldPerPage = array_combine($fieldPerPage, $fieldPerPage);
|
37 |
+
$pager->setAvailableLimit($fieldPerPage);
|
38 |
+
} else {
|
39 |
+
$pager->setAvailableLimit(array('all' => 'all'));
|
40 |
+
}
|
41 |
+
|
42 |
+
$pager->setCollection($this->getReviews());
|
43 |
+
$this->setChild('pager', $pager);
|
44 |
+
$this->getReviews()->load();
|
45 |
+
|
46 |
+
return $this;
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Magmodules_Feedbackcompany_Block_Reviews constructor.
|
51 |
+
*/
|
52 |
+
public function __construct()
|
53 |
+
{
|
54 |
+
parent::__construct();
|
55 |
+
|
56 |
+
$shopId = Mage::getModel("feedbackcompany/stats")->getShopIdByStoreId();
|
57 |
+
$collection = Mage::getModel('feedbackcompany/reviews')->getCollection();
|
58 |
+
$collection->setOrder('date_created', 'DESC');
|
59 |
+
$collection->addFieldToFilter('status', 1);
|
60 |
+
$collection->addFieldToFilter('shop_id', $shopId);
|
61 |
+
$this->setReviews($collection);
|
62 |
+
|
63 |
+
$stats = Mage::getModel('feedbackcompany/stats')->load($shopId, 'shop_id');
|
64 |
+
$this->setStats($stats);
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* @return mixed
|
69 |
+
*/
|
70 |
+
public function getPagerHtml()
|
71 |
+
{
|
72 |
+
return $this->getChildHtml('pager');
|
73 |
+
}
|
74 |
+
|
75 |
+
/**
|
76 |
+
* @return mixed
|
77 |
+
*/
|
78 |
+
public function getFormUrl()
|
79 |
+
{
|
80 |
+
return $this->helper('feedbackcompany')->getFormUrl();
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* @return mixed
|
85 |
+
*/
|
86 |
+
public function getReviewUrl()
|
87 |
+
{
|
88 |
+
return Mage::getStoreConfig('feedbackcompany/general/url');
|
89 |
+
}
|
90 |
|
91 |
+
/**
|
92 |
+
* @return string
|
93 |
+
*/
|
94 |
+
public function getPageIntro()
|
95 |
+
{
|
96 |
+
return nl2br(Mage::getStoreConfig('feedbackcompany/overview/intro'));
|
97 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
|
99 |
+
/**
|
100 |
+
* @param $review
|
101 |
+
* @return mixed
|
102 |
+
*/
|
103 |
+
public function formatScoresReview($review)
|
104 |
+
{
|
105 |
+
return $this->helper('feedbackcompany')->formatScoresReview($review);
|
106 |
+
}
|
|
|
107 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
}
|
app/code/community/Magmodules/Feedbackcompany/Block/Sidebar.php
CHANGED
@@ -3,7 +3,6 @@
|
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,96 +11,147 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
-
class Magmodules_Feedbackcompany_Block_Sidebar extends Mage_Core_Block_Template {
|
23 |
-
|
24 |
-
function getSidebarCollection($sidebar)
|
25 |
-
{
|
26 |
-
$enabled = '';
|
27 |
-
$qty = '5';
|
28 |
-
if(Mage::getStoreConfig('feedbackcompany/general/enabled')) {
|
29 |
-
if($sidebar == 'left') {
|
30 |
-
$qty = Mage::getStoreConfig('feedbackcompany/sidebar/left_qty');
|
31 |
-
$enabled = Mage::getStoreConfig('feedbackcompany/sidebar/left');
|
32 |
-
}
|
33 |
-
if($sidebar == 'right') {
|
34 |
-
$qty = Mage::getStoreConfig('feedbackcompany/sidebar/right_qty');
|
35 |
-
$enabled = Mage::getStoreConfig('feedbackcompany/sidebar/right');
|
36 |
-
}
|
37 |
-
}
|
38 |
-
if($enabled) {
|
39 |
-
$shop_id = Mage::getStoreConfig('feedbackcompany/general/api_id');
|
40 |
-
$collection = Mage::getModel("feedbackcompany/reviews")->getCollection();
|
41 |
-
$collection->setOrder('date_created', 'DESC');
|
42 |
-
$collection->addFieldToFilter('status',1);
|
43 |
-
$collection->addFieldToFilter('sidebar',1);
|
44 |
-
$collection->addFieldToFilter('shop_id', array('eq'=> array($shop_id)));
|
45 |
-
$collection->setPageSize($qty);
|
46 |
-
$collection->load();
|
47 |
-
return $collection;
|
48 |
-
} else {
|
49 |
-
return false;
|
50 |
-
}
|
51 |
-
}
|
52 |
-
|
53 |
-
function formatContent($sidebarreview, $sidebar = 'left')
|
54 |
-
{
|
55 |
-
$content = $sidebarreview->getReviewText();
|
56 |
-
if($sidebar == 'left') {
|
57 |
-
$char_limit = Mage::getStoreConfig('feedbackcompany/sidebar/left_lenght');
|
58 |
-
}
|
59 |
-
if($sidebar == 'right') {
|
60 |
-
$char_limit = Mage::getStoreConfig('feedbackcompany/sidebar/right_lenght');
|
61 |
-
}
|
62 |
-
$content = Mage::helper('core/string')->truncate($content, $char_limit, ' ...', $_remainder, false);
|
63 |
-
return $content;
|
64 |
-
|
65 |
-
}
|
66 |
-
|
67 |
-
function getReviewsUrl($sidebar = 'left')
|
68 |
-
{
|
69 |
-
$url = '';
|
70 |
-
if($sidebar == 'left') {
|
71 |
-
$link = Mage::getStoreConfig('feedbackcompany/sidebar/left_link');
|
72 |
-
}
|
73 |
-
if($sidebar == 'right') {
|
74 |
-
$link = Mage::getStoreConfig('feedbackcompany/sidebar/right_link');
|
75 |
-
}
|
76 |
-
if($link == 'internal') {
|
77 |
-
$url = $this->getUrl('feedbackcompany');
|
78 |
-
}
|
79 |
-
if($link == 'external') {
|
80 |
-
$url = Mage::getStoreConfig('feedbackcompany/general/url');
|
81 |
-
}
|
82 |
-
if($url) {
|
83 |
-
return '<a href="' . $url . '" target="_blank">' . $this->__('View all reviews') . '</a>';
|
84 |
-
} else {
|
85 |
-
return false;
|
86 |
-
}
|
87 |
-
}
|
88 |
-
|
89 |
-
function getSnippetsEnabled($sidebar = 'left')
|
90 |
-
{
|
91 |
-
if($sidebar == 'left') {
|
92 |
-
$enabled = Mage::getStoreConfig('feedbackcompany/sidebar/left_snippets');
|
93 |
-
}
|
94 |
-
if($sidebar == 'right') {
|
95 |
-
$enabled = Mage::getStoreConfig('feedbackcompany/sidebar/right_snippets');
|
96 |
-
}
|
97 |
-
if($enabled && ($this->getRequest()->getRouteName() != 'feedbackcompany')) {
|
98 |
-
return true;
|
99 |
-
}
|
100 |
-
}
|
101 |
-
|
102 |
-
public function getTotalScore()
|
103 |
-
{
|
104 |
-
return $this->helper('feedbackcompany')->getTotalScore();
|
105 |
-
}
|
106 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
}
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
|
21 |
+
class Magmodules_Feedbackcompany_Block_Sidebar extends Mage_Core_Block_Template
|
22 |
+
{
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @param $sidebar
|
26 |
+
* @return bool
|
27 |
+
*/
|
28 |
+
public function getSidebarCollection($sidebar)
|
29 |
+
{
|
30 |
+
$enabled = '';
|
31 |
+
$qty = '5';
|
32 |
+
if (Mage::getStoreConfig('feedbackcompany/general/enabled')) {
|
33 |
+
if ($sidebar == 'left') {
|
34 |
+
$qty = Mage::getStoreConfig('feedbackcompany/sidebar/left_qty');
|
35 |
+
$enabled = Mage::getStoreConfig('feedbackcompany/sidebar/left');
|
36 |
+
}
|
37 |
+
|
38 |
+
if ($sidebar == 'right') {
|
39 |
+
$qty = Mage::getStoreConfig('feedbackcompany/sidebar/right_qty');
|
40 |
+
$enabled = Mage::getStoreConfig('feedbackcompany/sidebar/right');
|
41 |
+
}
|
42 |
+
}
|
43 |
+
|
44 |
+
if ($enabled) {
|
45 |
+
$shopId = Mage::getStoreConfig('feedbackcompany/general/api_id');
|
46 |
+
$collection = Mage::getModel("feedbackcompany/reviews")->getCollection();
|
47 |
+
$collection->setOrder('date_created', 'DESC');
|
48 |
+
$collection->addFieldToFilter('status', 1);
|
49 |
+
$collection->addFieldToFilter('sidebar', 1);
|
50 |
+
$collection->addFieldToFilter('shop_id', array('eq' => array($shopId)));
|
51 |
+
$collection->setPageSize($qty);
|
52 |
+
$collection->load();
|
53 |
+
|
54 |
+
return $collection;
|
55 |
+
} else {
|
56 |
+
return false;
|
57 |
+
}
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* @param $sidebarreview
|
62 |
+
* @param string $sidebar
|
63 |
+
* @return mixed
|
64 |
+
*/
|
65 |
+
public function formatContent($sidebarreview, $sidebar = 'left')
|
66 |
+
{
|
67 |
+
$content = $sidebarreview->getReviewText();
|
68 |
+
$charLimit = '120';
|
69 |
+
|
70 |
+
if ($sidebar == 'left') {
|
71 |
+
$charLimit = Mage::getStoreConfig('feedbackcompany/sidebar/left_lenght');
|
72 |
+
}
|
73 |
+
|
74 |
+
if ($sidebar == 'right') {
|
75 |
+
$charLimit = Mage::getStoreConfig('feedbackcompany/sidebar/right_lenght');
|
76 |
+
}
|
77 |
+
|
78 |
+
$content = Mage::helper('core/string')->truncate($content, $charLimit, ' ...');
|
79 |
+
|
80 |
+
return $content;
|
81 |
+
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* @param string $sidebar
|
86 |
+
* @return bool|string
|
87 |
+
*/
|
88 |
+
public function getReviewsUrl($sidebar = 'left')
|
89 |
+
{
|
90 |
+
$url = '';
|
91 |
+
$link = '';
|
92 |
+
|
93 |
+
if ($sidebar == 'left') {
|
94 |
+
$link = Mage::getStoreConfig('feedbackcompany/sidebar/left_link');
|
95 |
+
}
|
96 |
+
|
97 |
+
if ($sidebar == 'right') {
|
98 |
+
$link = Mage::getStoreConfig('feedbackcompany/sidebar/right_link');
|
99 |
+
}
|
100 |
+
|
101 |
+
if ($link == 'internal') {
|
102 |
+
$url = $this->getUrl('feedbackcompany');
|
103 |
+
}
|
104 |
+
|
105 |
+
if ($link == 'external') {
|
106 |
+
$url = Mage::getStoreConfig('feedbackcompany/general/url');
|
107 |
+
}
|
108 |
+
|
109 |
+
if ($url) {
|
110 |
+
return '<a href="' . $url . '" target="_blank">' . $this->__('View all reviews') . '</a>';
|
111 |
+
} else {
|
112 |
+
return false;
|
113 |
+
}
|
114 |
+
}
|
115 |
+
|
116 |
+
/**
|
117 |
+
* @param string $sidebar
|
118 |
+
* @return bool
|
119 |
+
*/
|
120 |
+
public function getSnippetsEnabled($sidebar = 'left')
|
121 |
+
{
|
122 |
+
$enabled = '';
|
123 |
+
|
124 |
+
if ($sidebar == 'left') {
|
125 |
+
$enabled = Mage::getStoreConfig('feedbackcompany/sidebar/left_snippets');
|
126 |
+
}
|
127 |
+
|
128 |
+
if ($sidebar == 'right') {
|
129 |
+
$enabled = Mage::getStoreConfig('feedbackcompany/sidebar/right_snippets');
|
130 |
+
}
|
131 |
+
|
132 |
+
if ($enabled && ($this->getRequest()->getRouteName() != 'feedbackcompany')) {
|
133 |
+
return true;
|
134 |
+
}
|
135 |
+
|
136 |
+
return false;
|
137 |
+
}
|
138 |
+
|
139 |
+
/**
|
140 |
+
* @return mixed
|
141 |
+
*/
|
142 |
+
public function getTotalScore()
|
143 |
+
{
|
144 |
+
return $this->helper('feedbackcompany')->getTotalScore();
|
145 |
+
}
|
146 |
+
|
147 |
+
public function getVotesHtml($votes)
|
148 |
+
{
|
149 |
+
return $this->__('Based on %s reviews', '<span itemprop="ratingCount">' .$votes . '</span>');
|
150 |
+
}
|
151 |
+
|
152 |
+
public function getLogoHtml()
|
153 |
+
{
|
154 |
+
$img = $this->getSkinUrl('magmodules/feedbackcompany/images/logo.png');
|
155 |
+
return '<img src="' . $img .'" class="feedbackcompany-logo">';
|
156 |
+
}
|
157 |
}
|
app/code/community/Magmodules/Feedbackcompany/Helper/Data.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,248 +11,421 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
-
class Magmodules_Feedbackcompany_Helper_Data extends Mage_Core_Helper_Abstract
|
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 |
-
|
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 |
-
$char_limit = Mage::getStoreConfig('feedbackcompany/sidebar/right_lenght');
|
164 |
-
}
|
165 |
-
if($sidebar == 'sidebar') {
|
166 |
-
$char_limit = Mage::getStoreConfig('feedbackcompany/block/sidebar_lenght');
|
167 |
-
}
|
168 |
-
if($sidebar == 'medium') {
|
169 |
-
$char_limit = Mage::getStoreConfig('feedbackcompany/block/medium_lenght');
|
170 |
-
}
|
171 |
-
|
172 |
-
if($char_limit > 1) {
|
173 |
-
$url = $this->getReviewsUrl($sidebar);
|
174 |
-
$content = Mage::helper('core/string')->truncate($content, $char_limit, ' ...', $_remainder, false);
|
175 |
-
if($url) {
|
176 |
-
$content .= ' <a href="' . $url . '" target="_blank">' . $this->__('Read More') . '</a>';
|
177 |
-
}
|
178 |
-
}
|
179 |
-
return $content;
|
180 |
-
}
|
181 |
-
|
182 |
-
public function getBlockEnabled($type)
|
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 |
-
$scoreValues = Array();
|
231 |
-
$scoreValuesPossible = Array(
|
232 |
-
'aftersales' => 'Aftersales',
|
233 |
-
'checkout' => 'Checkout',
|
234 |
-
'information' => 'Information',
|
235 |
-
'friendly' => 'Friendlyness',
|
236 |
-
'leadtime' => 'Leadtime',
|
237 |
-
'responsetime' => 'Responsetime',
|
238 |
-
'order' => 'Orderprocess');
|
239 |
-
|
240 |
-
foreach($scoreValuesPossible as $key => $value){
|
241 |
-
if($review->getData("score_" . $key) > 0 ){
|
242 |
-
$scoreValues[$value] = $review->getData("score_" . $key) * 20;
|
243 |
-
}
|
244 |
-
}
|
245 |
-
return $scoreValues;
|
246 |
-
}
|
247 |
-
|
248 |
-
public function getUncachedConfigValue($path, $storeId = 0)
|
249 |
-
{
|
250 |
-
$collection = Mage::getModel('core/config_data')->getCollection()->addFieldToFilter('path', $path);
|
251 |
-
if($storeId == 0) {
|
252 |
-
$collection = $collection->addFieldToFilter('scope_id', 0)->addFieldToFilter('scope', 'default');
|
253 |
-
} else {
|
254 |
-
$collection = $collection->addFieldToFilter('scope_id', $storeId)->addFieldToFilter('scope', 'stores');
|
255 |
-
}
|
256 |
-
return $collection->getFirstItem()->getValue();
|
257 |
-
}
|
258 |
-
|
259 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
+
|
21 |
+
class Magmodules_Feedbackcompany_Helper_Data extends Mage_Core_Helper_Abstract
|
22 |
+
{
|
23 |
+
|
24 |
+
const XML_CLIENT_ID = 'feedbackcompany/general/client_id';
|
25 |
+
const XML_MODULE_ENABLED = 'feedbackcompany/general/enabled';
|
26 |
+
const XML_REVIEWS_CRON = 'feedbackcompany/reviews/cron';
|
27 |
+
const XML_PRODUCT_REVIEWS_CRON = 'feedbackcompany/productreviews/cron';
|
28 |
+
const XML_PRODUCT_REVIEWS_ENABLED = 'feedbackcompany/productreviews/enabled';
|
29 |
+
|
30 |
+
/**
|
31 |
+
* @param $storeId
|
32 |
+
*
|
33 |
+
* @return mixed
|
34 |
+
*/
|
35 |
+
public function isEnabled($storeId = null)
|
36 |
+
{
|
37 |
+
return Mage::getStoreConfig(self::XML_MODULE_ENABLED, $storeId);
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* @param null $storeId
|
42 |
+
*
|
43 |
+
* @return mixed
|
44 |
+
*/
|
45 |
+
public function isPrEnabled($storeId = null)
|
46 |
+
{
|
47 |
+
return Mage::getStoreConfig(self::XML_PRODUCT_REVIEWS_ENABLED, $storeId);
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* @param $storeId
|
52 |
+
*
|
53 |
+
* @return bool
|
54 |
+
*/
|
55 |
+
public function isCronEnabled($storeId)
|
56 |
+
{
|
57 |
+
$enabled = $this->isEnabled($storeId);
|
58 |
+
$cron = Mage::getStoreConfig(self::XML_REVIEWS_CRON, $storeId);
|
59 |
+
|
60 |
+
if ($enabled && $cron) {
|
61 |
+
return true;
|
62 |
+
}
|
63 |
+
|
64 |
+
return false;
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* @param $storeId
|
69 |
+
*
|
70 |
+
* @return bool
|
71 |
+
*/
|
72 |
+
public function isPrCronEnabled($storeId)
|
73 |
+
{
|
74 |
+
$enabled = $this->isEnabled($storeId);
|
75 |
+
$prEnabled = $this->isPrEnabled($storeId);
|
76 |
+
$cron = Mage::getStoreConfig(self::XML_PRODUCT_REVIEWS_CRON, $storeId);
|
77 |
+
|
78 |
+
if ($enabled && $cron && $prEnabled) {
|
79 |
+
return true;
|
80 |
+
}
|
81 |
+
|
82 |
+
return false;
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* @param $path
|
87 |
+
* @param $value
|
88 |
+
* @param int $storeId
|
89 |
+
*/
|
90 |
+
public function saveConfigValue($path, $value, $storeId = 0)
|
91 |
+
{
|
92 |
+
$config = Mage::getModel('core/config');
|
93 |
+
if ($storeId == 0) {
|
94 |
+
$config->saveConfig($path, $value, 'default', 0);
|
95 |
+
} else {
|
96 |
+
$config->saveConfig($path, $value, 'stores', $storeId);
|
97 |
+
}
|
98 |
+
}
|
99 |
+
|
100 |
+
/**
|
101 |
+
* @return mixed
|
102 |
+
*/
|
103 |
+
public function getTotalScore()
|
104 |
+
{
|
105 |
+
$storeId = Mage::app()->getStore()->getStoreId();
|
106 |
+
return Mage::getModel("feedbackcompany/stats")->loadByStoreId($storeId);
|
107 |
+
}
|
108 |
+
|
109 |
+
/**
|
110 |
+
* @param string $type
|
111 |
+
*
|
112 |
+
* @return mixed
|
113 |
+
*/
|
114 |
+
public function getStyle($type = 'sidebar')
|
115 |
+
{
|
116 |
+
$style = '';
|
117 |
+
|
118 |
+
if ($type == 'left') {
|
119 |
+
$style = Mage::getStoreConfig('feedbackcompany/sidebar/left_style');
|
120 |
+
}
|
121 |
+
|
122 |
+
if ($type == 'right') {
|
123 |
+
$style = Mage::getStoreConfig('feedbackcompany/sidebar/right_style');
|
124 |
+
}
|
125 |
+
|
126 |
+
if ($type == 'sidebar') {
|
127 |
+
$style = Mage::getStoreConfig('feedbackcompany/block/sidebar_style');
|
128 |
+
}
|
129 |
+
|
130 |
+
return $style;
|
131 |
+
}
|
132 |
+
|
133 |
+
/**
|
134 |
+
* @param string $type
|
135 |
+
*
|
136 |
+
* @return bool
|
137 |
+
*/
|
138 |
+
public function getSnippetsEnabled($type = 'sidebar')
|
139 |
+
{
|
140 |
+
if (Mage::app()->getRequest()->getRouteName() == 'feedbackcompany') {
|
141 |
+
return false;
|
142 |
+
} else {
|
143 |
+
$snippets = '';
|
144 |
+
switch ($type) {
|
145 |
+
case 'left':
|
146 |
+
$snippets = Mage::getStoreConfig('feedbackcompany/sidebar/left_snippets');
|
147 |
+
break;
|
148 |
+
case 'right':
|
149 |
+
$snippets = Mage::getStoreConfig('feedbackcompany/sidebar/right_snippets');
|
150 |
+
break;
|
151 |
+
case 'sidebar':
|
152 |
+
$snippets = Mage::getStoreConfig('feedbackcompany/block/sidebar_snippets');
|
153 |
+
break;
|
154 |
+
case 'small':
|
155 |
+
$snippets = Mage::getStoreConfig('feedbackcompany/block/small_snippets');
|
156 |
+
break;
|
157 |
+
case 'header':
|
158 |
+
$snippets = Mage::getStoreConfig('feedbackcompany/block/header_snippets');
|
159 |
+
break;
|
160 |
+
case 'medium':
|
161 |
+
$snippets = Mage::getStoreConfig('feedbackcompany/block/medium_snippets');
|
162 |
+
break;
|
163 |
+
}
|
164 |
+
|
165 |
+
return $snippets;
|
166 |
+
}
|
167 |
+
}
|
168 |
+
|
169 |
+
/**
|
170 |
+
* @param $sidebar
|
171 |
+
*
|
172 |
+
* @return bool
|
173 |
+
*/
|
174 |
+
public function getSidebarCollection($sidebar)
|
175 |
+
{
|
176 |
+
$enabled = '';
|
177 |
+
$qty = '5';
|
178 |
+
if (Mage::getStoreConfig('feedbackcompany/general/enabled')) {
|
179 |
+
if ($sidebar == 'left') {
|
180 |
+
$qty = Mage::getStoreConfig('feedbackcompany/sidebar/left_qty');
|
181 |
+
$enabled = Mage::getStoreConfig('feedbackcompany/sidebar/left');
|
182 |
+
}
|
183 |
+
|
184 |
+
if ($sidebar == 'right') {
|
185 |
+
$qty = Mage::getStoreConfig('feedbackcompany/sidebar/right_qty');
|
186 |
+
$enabled = Mage::getStoreConfig('feedbackcompany/sidebar/right');
|
187 |
+
}
|
188 |
+
|
189 |
+
if ($sidebar == 'sidebar') {
|
190 |
+
$qty = Mage::getStoreConfig('feedbackcompany/block/sidebar_qty');
|
191 |
+
$enabled = Mage::getStoreConfig('feedbackcompany/block/sidebar');
|
192 |
+
}
|
193 |
+
}
|
194 |
+
|
195 |
+
if ($enabled) {
|
196 |
+
$shopId = Mage::getModel("feedbackcompany/stats")->getShopIdByStoreId();
|
197 |
+
if($shopId) {
|
198 |
+
$collection = Mage::getModel("feedbackcompany/reviews")->getCollection()
|
199 |
+
->setOrder('date_created', 'DESC')
|
200 |
+
->addFieldToFilter('status', 1)
|
201 |
+
->addFieldToFilter('sidebar', 1)
|
202 |
+
->addFieldToFilter('shop_id', array('eq' => array($shopId)))
|
203 |
+
->setPageSize($qty)
|
204 |
+
->load();
|
205 |
+
|
206 |
+
return $collection;
|
207 |
+
}
|
208 |
+
}
|
209 |
+
|
210 |
+
return false;
|
211 |
+
}
|
212 |
+
|
213 |
+
/**
|
214 |
+
* @return bool
|
215 |
+
*/
|
216 |
+
public function getLatestReview()
|
217 |
+
{
|
218 |
+
if (Mage::getStoreConfig('feedbackcompany/block/medium_review')) {
|
219 |
+
$shopId = Mage::getModel("feedbackcompany/stats")->getShopIdByStoreId();
|
220 |
+
if($shopId) {
|
221 |
+
$review = Mage::getModel("feedbackcompany/reviews")->getCollection();
|
222 |
+
$review->setOrder('date_created', 'DESC');
|
223 |
+
$review->addFieldToFilter('status', 1);
|
224 |
+
$review->addFieldToFilter('review_text', array('notnull' => true));
|
225 |
+
$review->addFieldToFilter('shop_id', array('eq' => array($shopId)));
|
226 |
+
$review->setPageSize(1);
|
227 |
+
return $review->getFirstItem();
|
228 |
+
}
|
229 |
+
}
|
230 |
+
|
231 |
+
return false;
|
232 |
+
}
|
233 |
+
|
234 |
+
/**
|
235 |
+
* @param $sidebarreview
|
236 |
+
* @param string $sidebar
|
237 |
+
*
|
238 |
+
* @return string
|
239 |
+
*/
|
240 |
+
public function formatContent($sidebarreview, $sidebar = 'left')
|
241 |
+
{
|
242 |
+
$content = $sidebarreview->getReviewText();
|
243 |
+
$charLimit = '';
|
244 |
+
if ($sidebar == 'left') {
|
245 |
+
$charLimit = Mage::getStoreConfig('feedbackcompany/sidebar/left_lenght');
|
246 |
+
}
|
247 |
+
|
248 |
+
if ($sidebar == 'right') {
|
249 |
+
$charLimit = Mage::getStoreConfig('feedbackcompany/sidebar/right_lenght');
|
250 |
+
}
|
251 |
+
|
252 |
+
if ($sidebar == 'sidebar') {
|
253 |
+
$charLimit = Mage::getStoreConfig('feedbackcompany/block/sidebar_lenght');
|
254 |
+
}
|
255 |
+
|
256 |
+
if ($sidebar == 'medium') {
|
257 |
+
$charLimit = Mage::getStoreConfig('feedbackcompany/block/medium_lenght');
|
258 |
+
}
|
259 |
+
|
260 |
+
if ($charLimit > 1) {
|
261 |
+
$url = $this->getReviewsUrl($sidebar);
|
262 |
+
$content = Mage::helper('core/string')->truncate($content, $charLimit, ' ...');
|
263 |
+
if ($url) {
|
264 |
+
$content .= ' <a href="' . $url . '" target="_blank">' . $this->__('Read More') . '</a>';
|
265 |
+
}
|
266 |
+
}
|
267 |
+
|
268 |
+
return $content;
|
269 |
+
}
|
270 |
+
|
271 |
+
/**
|
272 |
+
* @param $type
|
273 |
+
*
|
274 |
+
* @return bool|string
|
275 |
+
*/
|
276 |
+
public function getReviewsUrl($type)
|
277 |
+
{
|
278 |
+
$link = '';
|
279 |
+
switch ($type) {
|
280 |
+
case 'left':
|
281 |
+
$link = Mage::getStoreConfig('feedbackcompany/sidebar/left_link');
|
282 |
+
break;
|
283 |
+
case 'right':
|
284 |
+
$link = Mage::getStoreConfig('feedbackcompany/sidebar/right_link');
|
285 |
+
break;
|
286 |
+
case 'sidebar':
|
287 |
+
$link = Mage::getStoreConfig('feedbackcompany/block/sidebar_link');
|
288 |
+
break;
|
289 |
+
case 'small':
|
290 |
+
$link = Mage::getStoreConfig('feedbackcompany/block/small_link');
|
291 |
+
break;
|
292 |
+
case 'header':
|
293 |
+
$link = Mage::getStoreConfig('feedbackcompany/block/header_link');
|
294 |
+
break;
|
295 |
+
case 'medium':
|
296 |
+
$link = Mage::getStoreConfig('feedbackcompany/block/medium_link');
|
297 |
+
break;
|
298 |
+
}
|
299 |
+
|
300 |
+
if ($link == 'internal') {
|
301 |
+
return Mage::getBaseUrl() . 'feedbackcompany';
|
302 |
+
}
|
303 |
+
|
304 |
+
if ($link == 'external') {
|
305 |
+
return Mage::getModel("feedbackcompany/stats")->getFeedbackUrl();
|
306 |
+
}
|
307 |
+
|
308 |
+
return false;
|
309 |
+
}
|
310 |
+
|
311 |
+
/**
|
312 |
+
* @param $type
|
313 |
+
*
|
314 |
+
* @return bool
|
315 |
+
*/
|
316 |
+
public function getBlockEnabled($type)
|
317 |
+
{
|
318 |
+
if (Mage::getStoreConfig('feedbackcompany/general/enabled')) {
|
319 |
+
$enabled = '';
|
320 |
+
switch ($type) {
|
321 |
+
case 'left':
|
322 |
+
$enabled = Mage::getStoreConfig('feedbackcompany/sidebar/left');
|
323 |
+
break;
|
324 |
+
case 'right':
|
325 |
+
$enabled = Mage::getStoreConfig('feedbackcompany/sidebar/right');
|
326 |
+
break;
|
327 |
+
case 'sidebar':
|
328 |
+
$enabled = Mage::getStoreConfig('feedbackcompany/block/sidebar');
|
329 |
+
break;
|
330 |
+
case 'small':
|
331 |
+
$enabled = Mage::getStoreConfig('feedbackcompany/block/small');
|
332 |
+
break;
|
333 |
+
case 'header':
|
334 |
+
$enabled = Mage::getStoreConfig('feedbackcompany/block/header');
|
335 |
+
break;
|
336 |
+
case 'medium':
|
337 |
+
$enabled = Mage::getStoreConfig('feedbackcompany/block/medium');
|
338 |
+
break;
|
339 |
+
}
|
340 |
+
|
341 |
+
return $enabled;
|
342 |
+
}
|
343 |
+
|
344 |
+
return false;
|
345 |
}
|
346 |
|
347 |
+
/**
|
348 |
+
* @param $rating
|
349 |
+
* @param string $type
|
350 |
+
*
|
351 |
+
* @return bool|string
|
352 |
+
*/
|
353 |
+
public function getHtmlStars($rating, $type = 'small')
|
354 |
+
{
|
355 |
+
$perc = $rating;
|
356 |
+
$show = '';
|
357 |
+
if ($type == 'small') {
|
358 |
+
$show = Mage::getStoreConfig('feedbackcompany/block/small_stars');
|
359 |
+
}
|
360 |
+
|
361 |
+
if ($type == 'medium') {
|
362 |
+
$show = Mage::getStoreConfig('feedbackcompany/block/medium_stars');
|
363 |
+
}
|
364 |
+
|
365 |
+
if ($show) {
|
366 |
+
$html = '<div class="rating-box">';
|
367 |
+
$html .= ' <div class="rating" style="width:' . $perc . '%"></div>';
|
368 |
+
$html .= '</div>';
|
369 |
+
|
370 |
+
return $html;
|
371 |
+
}
|
372 |
+
|
373 |
+
return false;
|
374 |
}
|
375 |
+
|
376 |
+
/**
|
377 |
+
* @param $data
|
378 |
+
* @param null $excludeReview
|
379 |
+
* @param null $include
|
380 |
+
*
|
381 |
+
* @return array
|
382 |
+
*/
|
383 |
+
public function getQuestions($data, $excludeReview = null, $include = null)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
384 |
{
|
385 |
+
$data = json_decode($data, true);
|
386 |
+
$questions = array();
|
387 |
+
foreach ($data as $row) {
|
388 |
+
if (!empty($include)) {
|
389 |
+
if ($row['type'] != $include) {
|
390 |
+
continue;
|
391 |
+
}
|
392 |
+
}
|
393 |
+
|
394 |
+
$row['value_html'] = $row['value'];
|
395 |
+
if ($row['type'] == 'score' || $row['type'] == 'final_score') {
|
396 |
+
if ($row['value'] < 1) {
|
397 |
+
continue;
|
398 |
+
}
|
399 |
+
|
400 |
+
$row['value_html'] = round($row['value']) . '/5';
|
401 |
+
}
|
402 |
+
|
403 |
+
if ($row['type'] == 'main_open' && $excludeReview) {
|
404 |
+
continue;
|
405 |
+
}
|
406 |
+
|
407 |
+
$questions[$row['orderNr']] = $row;
|
408 |
+
}
|
409 |
+
|
410 |
+
return $questions;
|
411 |
+
}
|
412 |
+
|
413 |
+
/**
|
414 |
+
* @param $data
|
415 |
+
*
|
416 |
+
* @return bool|string
|
417 |
+
*/
|
418 |
+
public function getCustomerRecommend($data)
|
419 |
+
{
|
420 |
+
if ($data == 1) {
|
421 |
+
return $this->__('Yes');
|
422 |
+
}
|
423 |
+
|
424 |
+
if ($data == 0) {
|
425 |
+
return $this->__('No');
|
426 |
+
}
|
427 |
+
|
428 |
+
return false;
|
429 |
+
}
|
430 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
431 |
}
|
app/code/community/Magmodules/Feedbackcompany/Model/Api.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,321 +11,308 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
-
class Magmodules_Feedbackcompany_Model_Api extends Mage_Core_Model_Abstract
|
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 |
-
|
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 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
} else {
|
320 |
-
if($response->description) {
|
321 |
-
$result = array();
|
322 |
-
$result['status'] = 'ERROR';
|
323 |
-
$result['error'] = $response->description;
|
324 |
-
return $result;
|
325 |
-
}
|
326 |
-
}
|
327 |
-
} else {
|
328 |
-
return false;
|
329 |
-
}
|
330 |
-
}
|
331 |
-
|
332 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
+
|
21 |
+
class Magmodules_Feedbackcompany_Model_Api extends Mage_Core_Model_Abstract
|
22 |
+
{
|
23 |
+
|
24 |
+
const XML_CLIENT_ID = 'feedbackcompany/general/client_id';
|
25 |
+
const XML_CLIENT_SECRET = 'feedbackcompany/general/client_secret';
|
26 |
+
const FBC_OAUTH2_TOKEN_URL = 'https://beoordelingen.feedbackcompany.nl/api/v1/oauth2/token';
|
27 |
+
const FBC_FEEDBACK_URL = 'https://connect.feedbackcompany.nl/feedback/';
|
28 |
+
|
29 |
+
/**
|
30 |
+
* @param $storeId
|
31 |
+
*
|
32 |
+
* @return mixed
|
33 |
+
*/
|
34 |
+
public function getClientId($storeId)
|
35 |
+
{
|
36 |
+
return Mage::getStoreConfig(self::XML_CLIENT_ID, $storeId);
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* @param $url
|
41 |
+
* @param $storeId
|
42 |
+
*
|
43 |
+
* @return array|bool|mixed
|
44 |
+
*/
|
45 |
+
public function makeRequest($url, $storeId)
|
46 |
+
{
|
47 |
+
$clientToken = $this->getOauthToken($storeId);
|
48 |
+
if ($clientToken['status'] == 'ERROR') {
|
49 |
+
return $clientToken;
|
50 |
+
} else {
|
51 |
+
$clientToken = $clientToken['client_token'];
|
52 |
+
}
|
53 |
+
|
54 |
+
$request = curl_init();
|
55 |
+
curl_setopt($request, CURLOPT_SSL_VERIFYPEER, false);
|
56 |
+
curl_setopt($request, CURLOPT_URL, $url);
|
57 |
+
curl_setopt($request, CURLOPT_HTTPHEADER, array('Authorization: Bearer ' . $clientToken));
|
58 |
+
curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
|
59 |
+
curl_setopt($request, CURLOPT_TIMEOUT, 30);
|
60 |
+
$apiResult = json_decode($content = curl_exec($request), true);
|
61 |
+
|
62 |
+
return $apiResult;
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* @param $storeId
|
67 |
+
*
|
68 |
+
* @return array|bool
|
69 |
+
*/
|
70 |
+
public function getOauthToken($storeId)
|
71 |
+
{
|
72 |
+
$clientId = Mage::getStoreConfig(self::XML_CLIENT_ID, $storeId);
|
73 |
+
$clientSecret = Mage::getStoreConfig(self::XML_CLIENT_SECRET, $storeId);
|
74 |
+
|
75 |
+
if (!empty($clientId) && !empty($clientSecret)) {
|
76 |
+
$getArray = array(
|
77 |
+
"client_id" => $clientId,
|
78 |
+
"client_secret" => $clientSecret,
|
79 |
+
"grant_type" => "authorization_code"
|
80 |
+
);
|
81 |
+
|
82 |
+
$feedbackconnect = curl_init(self::FBC_OAUTH2_TOKEN_URL . '?' . http_build_query($getArray));
|
83 |
+
curl_setopt($feedbackconnect, CURLOPT_VERBOSE, 1);
|
84 |
+
curl_setopt($feedbackconnect, CURLOPT_FAILONERROR, false);
|
85 |
+
curl_setopt($feedbackconnect, CURLOPT_HEADER, 0);
|
86 |
+
curl_setopt($feedbackconnect, CURLOPT_FOLLOWLOCATION, 1);
|
87 |
+
curl_setopt($feedbackconnect, CURLOPT_RETURNTRANSFER, 1);
|
88 |
+
curl_setopt($feedbackconnect, CURLOPT_SSL_VERIFYPEER, false);
|
89 |
+
curl_setopt($feedbackconnect, CURLOPT_TIMEOUT, 30);
|
90 |
+
$response = json_decode(curl_exec($feedbackconnect));
|
91 |
+
curl_close($feedbackconnect);
|
92 |
+
|
93 |
+
if (isset($response->access_token)) {
|
94 |
+
return array('status' => 'OK', 'client_token' => $response->access_token);
|
95 |
+
} else {
|
96 |
+
if (isset($response->description)) {
|
97 |
+
return array('status' => 'ERROR', 'error' => $response->description);
|
98 |
+
} else {
|
99 |
+
return array('status' => 'ERROR', 'error' => 'No response from API');
|
100 |
+
}
|
101 |
+
}
|
102 |
+
}
|
103 |
+
|
104 |
+
return false;
|
105 |
+
}
|
106 |
+
|
107 |
+
/**
|
108 |
+
* @param $order
|
109 |
+
*
|
110 |
+
* @return bool
|
111 |
+
*/
|
112 |
+
public function sendInvitation($order)
|
113 |
+
{
|
114 |
+
$storeId = $order->getStoreId();
|
115 |
+
$invStatus = Mage::getStoreConfig('feedbackcompany/invitation/status', $storeId);
|
116 |
+
$dateNow = Mage::getModel('core/date')->timestamp(time());
|
117 |
+
$dateOrder = Mage::getModel('core/date')->timestamp($order->getCreatedAt());
|
118 |
+
$dateDiff = (($dateOrder - $dateNow) / 86400);
|
119 |
+
$backlog = Mage::getStoreConfig('feedbackcompany/invitation/backlog', $storeId);
|
120 |
+
$sent = $order->getFeedbackSent();
|
121 |
+
$log = Mage::getModel('feedbackcompany/log');
|
122 |
+
|
123 |
+
if ($backlog < 1) {
|
124 |
+
$backlog = 30;
|
125 |
+
}
|
126 |
+
|
127 |
+
if (($order->getStatus() == $invStatus) && ($dateDiff < $backlog) && (!$sent)) {
|
128 |
+
$startTime = microtime(true);
|
129 |
+
$crontype = 'orderupdate';
|
130 |
+
$apiKey = Mage::getStoreConfig('feedbackcompany/invitation/connector', $storeId);
|
131 |
+
$delay = Mage::getStoreConfig('feedbackcompany/invitation/delay', $storeId);
|
132 |
+
$resend = Mage::getStoreConfig('feedbackcompany/invitation/resend', $storeId);
|
133 |
+
$remindDelay = Mage::getStoreConfig('feedbackcompany/invitation/remind_delay', $storeId);
|
134 |
+
$minOrder = Mage::getStoreConfig('feedbackcompany/invitation/min_order_total', $storeId);
|
135 |
+
$excludeCat = Mage::getStoreConfig('feedbackcompany/invitation/exclude_category', $storeId);
|
136 |
+
$productreviews = Mage::getStoreConfig('feedbackcompany/productreviews/enabled', $storeId);
|
137 |
+
$email = $order->getCustomerEmail();
|
138 |
+
$orderNumber = $order->getIncrementID();
|
139 |
+
$orderTotal = $order->getGrandTotal();
|
140 |
+
$aanhef = $order->getCustomerName();
|
141 |
+
$checkSum = 0;
|
142 |
+
$categories = array();
|
143 |
+
$excludeReason = array();
|
144 |
+
|
145 |
+
$request = array();
|
146 |
+
$request['action'] = 'sendInvitation';
|
147 |
+
|
148 |
+
// Exclude by Category
|
149 |
+
$exclCategories = '';
|
150 |
+
if ($excludeCat) {
|
151 |
+
if ($ids = Mage::getStoreConfig('feedbackcompany/invitation/exclude_categories', $storeId)) {
|
152 |
+
$exclCategories = explode(',', $ids);
|
153 |
+
}
|
154 |
+
}
|
155 |
+
|
156 |
+
// Get all Products
|
157 |
+
$i = 1;
|
158 |
+
$filtercode = array();
|
159 |
+
$websiteUrl = Mage::app()->getStore($storeId)
|
160 |
+
->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
|
161 |
+
$mediaUrl = Mage::app()->getStore($storeId)
|
162 |
+
->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog' . DS . 'product';
|
163 |
+
|
164 |
+
foreach ($order->getAllVisibleItems() as $item) {
|
165 |
+
$filtercode[] = urlencode(trim($item->getSku()));
|
166 |
+
$filtercode[] = urlencode(trim($item->getName()));
|
167 |
+
if ($productreviews) {
|
168 |
+
$product = Mage::getModel('catalog/product')->setStoreId($storeId)->load($item->getProductId());
|
169 |
+
if (($product->getStatus() == '1') && ($product->getVisibility() != '1')) {
|
170 |
+
$varUrl = urlencode('product_url[' . $i . ']');
|
171 |
+
$varText = urlencode('product_text[' . $i . ']');
|
172 |
+
$varId = urlencode('product_ids[' . $i . ']');
|
173 |
+
$varPhoto = urlencode('product_photo[' . $i . ']');
|
174 |
+
if ($product->getUrlPath()) {
|
175 |
+
$deeplink = $websiteUrl . $product->getUrlPath();
|
176 |
+
$imageUrl = '';
|
177 |
+
if ($product->getImage() && ($product->getImage() != 'no_selection')) {
|
178 |
+
$imageUrl = $mediaUrl . $product->getImage();
|
179 |
+
}
|
180 |
+
|
181 |
+
$request[$varUrl] = urlencode($deeplink);
|
182 |
+
$request[$varText] = urlencode(trim($product->getName()));
|
183 |
+
$request[$varId] = urlencode('SKU=' . trim($product->getSku()));
|
184 |
+
$request[$varPhoto] = urlencode($imageUrl);
|
185 |
+
$i++;
|
186 |
+
}
|
187 |
+
}
|
188 |
+
}
|
189 |
+
|
190 |
+
if ($excludeCat) {
|
191 |
+
if (!$product) {
|
192 |
+
$product = Mage::getModel('catalog/product')->setStoreId($storeId)->load($item->getProductId());
|
193 |
+
}
|
194 |
+
|
195 |
+
$categories = array_merge($categories, $product->getCategoryIds());
|
196 |
+
}
|
197 |
+
}
|
198 |
+
|
199 |
+
$filtercode = implode(',', $filtercode);
|
200 |
+
|
201 |
+
// Get Checksum
|
202 |
+
for ($i = 0; $i < strlen($email); $i++) {
|
203 |
+
$checkSum += ord($email[$i]);
|
204 |
+
}
|
205 |
+
|
206 |
+
$exclude = 0;
|
207 |
+
if (!empty($minOrder)) {
|
208 |
+
if ($minOrder >= $orderTotal) {
|
209 |
+
$exclude = 1;
|
210 |
+
$excludeReason[] = Mage::helper('feedbackcompany')->__('Below minimum order value');
|
211 |
+
}
|
212 |
+
}
|
213 |
+
|
214 |
+
if ($order->getStatus() != $invStatus) {
|
215 |
+
$exclude = 1;
|
216 |
+
}
|
217 |
+
|
218 |
+
if ($exclCategories) {
|
219 |
+
foreach ($categories as $cat) {
|
220 |
+
if (in_array($cat, $exclCategories)) {
|
221 |
+
$exclude = 1;
|
222 |
+
$excludeReason[] = Mage::helper('feedbackcompany')->__('Category is excluded');
|
223 |
+
}
|
224 |
+
}
|
225 |
+
}
|
226 |
+
|
227 |
+
if ($exclude == 1) {
|
228 |
+
if ($excludeReason) {
|
229 |
+
$reason = implode(',', array_unique($excludeReason));
|
230 |
+
$reason = 'Not invited: ' . $reason;
|
231 |
+
$log->addToLog('invitation', $storeId, '', $reason, $startTime, $crontype, '', $order->getId());
|
232 |
+
} else {
|
233 |
+
return false;
|
234 |
+
}
|
235 |
+
} else {
|
236 |
+
$request['filtercode'] = $filtercode;
|
237 |
+
$request['Chksum'] = $checkSum;
|
238 |
+
$request['orderNumber'] = $orderNumber;
|
239 |
+
$request['resendIfDouble'] = $resend;
|
240 |
+
$request['remindDelay'] = $remindDelay;
|
241 |
+
$request['delay'] = $delay;
|
242 |
+
$request['aanhef'] = urlencode($aanhef);
|
243 |
+
$request['user'] = urlencode($email);
|
244 |
+
$request['connector'] = $apiKey;
|
245 |
+
|
246 |
+
$post = '';
|
247 |
+
foreach (array_reverse($request) as $key => $value) {
|
248 |
+
$post .= '&' . $key . '=' . trim($value);
|
249 |
+
}
|
250 |
+
|
251 |
+
$post = trim($post, '&');
|
252 |
+
|
253 |
+
// Connect to API
|
254 |
+
$url = self::FBC_FEEDBACK_URL . '?' . $post;
|
255 |
+
$feedbackconnect = curl_init($url);
|
256 |
+
curl_setopt($feedbackconnect, CURLOPT_VERBOSE, 1);
|
257 |
+
curl_setopt($feedbackconnect, CURLOPT_FAILONERROR, false);
|
258 |
+
curl_setopt($feedbackconnect, CURLOPT_HEADER, 0);
|
259 |
+
curl_setopt($feedbackconnect, CURLOPT_FOLLOWLOCATION, 1);
|
260 |
+
curl_setopt($feedbackconnect, CURLOPT_RETURNTRANSFER, 1);
|
261 |
+
curl_setopt($feedbackconnect, CURLOPT_SSL_VERIFYPEER, false);
|
262 |
+
curl_setopt($feedbackconnect, CURLOPT_TIMEOUT, 60);
|
263 |
+
$response = curl_exec($feedbackconnect);
|
264 |
+
curl_close($feedbackconnect);
|
265 |
+
|
266 |
+
if ($response) {
|
267 |
+
if ($response == 'Request OK.') {
|
268 |
+
$order->setFeedbackSent(1)->save();
|
269 |
+
$responseHtml = $response;
|
270 |
+
} else {
|
271 |
+
$responseHtml = 'Error sending review request!';
|
272 |
+
}
|
273 |
+
} else {
|
274 |
+
$responseHtml = 'No response from https://connect.feedbackcompany.nl';
|
275 |
+
}
|
276 |
+
|
277 |
+
// Write to log
|
278 |
+
$log->addToLog(
|
279 |
+
'invitation', $order->getStoreId(), '', $responseHtml, $startTime, $crontype,
|
280 |
+
$url, $order->getId()
|
281 |
+
);
|
282 |
+
|
283 |
+
return true;
|
284 |
+
}
|
285 |
+
}
|
286 |
+
|
287 |
+
return false;
|
288 |
+
}
|
289 |
+
|
290 |
+
/**
|
291 |
+
* @param null $type
|
292 |
+
*
|
293 |
+
* @return array
|
294 |
+
*/
|
295 |
+
public function getStoreIds($type = null)
|
296 |
+
{
|
297 |
+
$storeIds = array();
|
298 |
+
$stores = Mage::getModel('core/store')->getCollection();
|
299 |
+
foreach ($stores as $store) {
|
300 |
+
if ($store->getIsActive()) {
|
301 |
+
if ($type == 'cron') {
|
302 |
+
$enabled = Mage::helper('feedbackcompany')->isCronEnabled($store->getId());
|
303 |
+
} elseif ($type == 'prcron') {
|
304 |
+
$enabled = Mage::helper('feedbackcompany')->isPrCronEnabled($store->getId());
|
305 |
+
} else {
|
306 |
+
$enabled = Mage::helper('feedbackcompany')->isEnabled($store->getId());
|
307 |
+
}
|
308 |
+
$clientId = Mage::getStoreConfig(self::XML_CLIENT_ID, $store->getId());
|
309 |
+
if ($enabled && $clientId) {
|
310 |
+
$storeIds[$clientId] = $store->getId();
|
311 |
+
}
|
312 |
+
}
|
313 |
+
}
|
314 |
+
|
315 |
+
return $storeIds;
|
316 |
+
}
|
317 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
318 |
}
|
app/code/community/Magmodules/Feedbackcompany/Model/Export.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,73 +11,109 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
-
class Magmodules_Feedbackcompany_Model_Export extends Mage_Core_Model_Abstract {
|
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 |
'date',
|
79 |
-
'name',
|
80 |
'email',
|
81 |
-
'gender',
|
82 |
'age',
|
83 |
'city',
|
84 |
'country',
|
@@ -88,10 +123,11 @@ class Magmodules_Feedbackcompany_Model_Export extends Mage_Core_Model_Abstract {
|
|
88 |
'product_review',
|
89 |
'product_url',
|
90 |
'product_id',
|
91 |
-
'product_sku',
|
92 |
-
|
93 |
);
|
|
|
94 |
return $header;
|
95 |
-
|
96 |
-
|
97 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
|
|
|
|
20 |
|
21 |
+
class Magmodules_Feedbackcompany_Model_Export extends Mage_Core_Model_Abstract
|
22 |
+
{
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @param $reviews
|
26 |
+
* @param $storeId
|
27 |
+
*
|
28 |
+
* @return array
|
29 |
+
*/
|
30 |
+
public function getFeed($reviews, $storeId)
|
31 |
+
{
|
32 |
+
$csvData = array();
|
33 |
+
$csvData[] = $this->getHeader();
|
34 |
+
foreach ($reviews as $reviewId) {
|
35 |
+
$review = Mage::getModel('review/review')->load($reviewId);
|
36 |
+
$product = Mage::getModel('catalog/product')->setStoreId($storeId)->load($review->getEntityPkValue());
|
37 |
+
if ($review && $product) {
|
38 |
+
$text = trim($review->getTitle()) . ' ' . trim(preg_replace('/\s+/', ' ', $review->getDetail()));
|
39 |
+
if (strlen($text) > 1) {
|
40 |
+
$date = date('Ymd', strtotime($review->getCreatedAt()));
|
41 |
+
$name = Mage::helper('core/string')->truncate($review->getNickname(), 250);
|
42 |
+
$email = '';
|
43 |
+
$gender = '';
|
44 |
+
$city = '';
|
45 |
+
$country = '';
|
46 |
+
$productName = trim($product->getName());
|
47 |
+
$productReview = str_replace(';', '', $text);
|
48 |
+
$productId = $review->getEntityPkValue();
|
49 |
+
$productSku = $product->getSku();
|
50 |
+
$productUrl = $product->getProductUrl();
|
51 |
+
if ($productUrl) {
|
52 |
+
$productUrl = preg_replace('/\?.*/', '', $productUrl);
|
53 |
+
}
|
54 |
+
|
55 |
+
$productOpinionId = $review->getFeedbackcompanyId();
|
56 |
+
$score = array();
|
57 |
+
|
58 |
+
$votes = Mage::getModel('rating/rating_option_vote')->getResourceCollection()
|
59 |
+
->setReviewFilter($reviewId)
|
60 |
+
->setStoreFilter($storeId)
|
61 |
+
->load();
|
62 |
+
|
63 |
+
foreach ($votes as $vote) {
|
64 |
+
if ($vote->getPercent() > 0) {
|
65 |
+
$score[] = $vote->getPercent();
|
66 |
+
}
|
67 |
+
}
|
68 |
+
|
69 |
+
if (!empty($votes) > 0) {
|
70 |
+
$productScore = round(((array_sum($score) / count($votes)) / 20), 2);
|
71 |
+
} else {
|
72 |
+
$productScore = '';
|
73 |
+
}
|
74 |
+
|
75 |
+
if ($review->getCustomerId()) {
|
76 |
+
$customer = Mage::getModel('customer/customer')->load($review->getCustomerId());
|
77 |
+
$address = Mage::getModel('customer/address')->load($customer->getDefaultBilling());
|
78 |
+
$email = $customer->getEmail();
|
79 |
+
$city = $address->getCity();
|
80 |
+
$country = $address->getCountry();
|
81 |
+
}
|
82 |
+
|
83 |
+
$csvData[] = array(
|
84 |
+
$date,
|
85 |
+
$name,
|
86 |
+
$email,
|
87 |
+
$gender,
|
88 |
+
'',
|
89 |
+
$city,
|
90 |
+
$country,
|
91 |
+
'',
|
92 |
+
$productName,
|
93 |
+
$productScore,
|
94 |
+
$productReview,
|
95 |
+
$productUrl,
|
96 |
+
$productId,
|
97 |
+
$productSku,
|
98 |
+
$productOpinionId
|
99 |
+
);
|
100 |
+
}
|
101 |
+
}
|
102 |
+
}
|
103 |
+
|
104 |
+
return $csvData;
|
105 |
+
}
|
106 |
+
|
107 |
+
/**
|
108 |
+
* @return array
|
109 |
+
*/
|
110 |
+
public function getHeader()
|
111 |
+
{
|
112 |
+
$header = array(
|
113 |
'date',
|
114 |
+
'name',
|
115 |
'email',
|
116 |
+
'gender',
|
117 |
'age',
|
118 |
'city',
|
119 |
'country',
|
123 |
'product_review',
|
124 |
'product_url',
|
125 |
'product_id',
|
126 |
+
'product_sku',
|
127 |
+
'product_opinion_id',
|
128 |
);
|
129 |
+
|
130 |
return $header;
|
131 |
+
}
|
132 |
+
|
133 |
}
|
app/code/community/Magmodules/Feedbackcompany/Model/Log.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,63 +11,54 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
-
class Magmodules_Feedbackcompany_Model_Log extends Mage_Core_Model_Abstract {
|
23 |
-
|
24 |
-
public function _construct()
|
25 |
-
{
|
26 |
-
parent::_construct();
|
27 |
-
$this->_init('feedbackcompany/log');
|
28 |
-
}
|
29 |
|
30 |
-
|
31 |
-
|
32 |
-
if(Mage::getStoreConfig('feedbackcompany/log/enabled')) {
|
33 |
-
|
34 |
-
if($type == 'productreview') {
|
35 |
-
$api_id = Mage::getStoreConfig('feedbackcompany/productreviews/client_token', $storeId);
|
36 |
-
$api_url = Mage::getStoreConfig('feedbackcompany/productreviews/client_token', $storeId);
|
37 |
-
} else {
|
38 |
-
$api_id = Mage::getStoreConfig('feedbackcompany/general/api_id', $storeId);
|
39 |
-
}
|
40 |
-
|
41 |
-
$company = Mage::getStoreConfig('feedbackcompany/general/company', $storeId);
|
42 |
-
$review_updates = '';
|
43 |
-
$review_new = '';
|
44 |
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
$response = $review['stats']['msg'];
|
54 |
-
}
|
55 |
-
}
|
56 |
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
|
74 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
|
21 |
+
class Magmodules_Feedbackcompany_Model_Log extends Mage_Core_Model_Abstract
|
22 |
+
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
+
/**
|
25 |
+
*
|
26 |
+
*/
|
27 |
+
public function _construct()
|
28 |
+
{
|
29 |
+
parent::_construct();
|
30 |
+
$this->_init('feedbackcompany/log');
|
31 |
+
}
|
|
|
|
|
|
|
32 |
|
33 |
+
/**
|
34 |
+
* @param $type
|
35 |
+
* @param $sId
|
36 |
+
* @param string $review
|
37 |
+
* @param string $res
|
38 |
+
* @param string $t
|
39 |
+
* @param string $cron
|
40 |
+
* @param string $aUrl
|
41 |
+
* @param string $oId
|
42 |
+
*/
|
43 |
+
public function addToLog($type, $sId, $review = '', $res = '', $t = '', $cron = '', $aUrl = '', $oId = '')
|
44 |
+
{
|
45 |
+
if (Mage::getStoreConfig('feedbackcompany/log/enabled')) {
|
46 |
+
$data = array(
|
47 |
+
'type' => $type,
|
48 |
+
'shop_id' => Mage::getModel('feedbackcompany/api')->getClientId($sId),
|
49 |
+
'store_id' => $sId,
|
50 |
+
'company' => isset($review['company']) ? $review['company'] : '',
|
51 |
+
'review_updates' => isset($review['update']) ? $review['update'] : '',
|
52 |
+
'review_new' => isset($review['new']) ? $review['new'] : '',
|
53 |
+
'response' => $res,
|
54 |
+
'order_id' => $oId,
|
55 |
+
'cron' => $cron,
|
56 |
+
'date' => date('Y-m-d H:i:s'),
|
57 |
+
'time' => isset($t) ? (microtime(true) - $t) : '',
|
58 |
+
'api_url' => $aUrl
|
59 |
+
);
|
60 |
+
Mage::getModel('feedbackcompany/log')->setData($data)->save();
|
61 |
+
}
|
62 |
+
}
|
63 |
|
64 |
}
|
app/code/community/Magmodules/Feedbackcompany/Model/Mysql4/Log.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,18 +11,22 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
-
class Magmodules_Feedbackcompany_Model_Mysql4_Log extends Mage_Core_Model_Mysql4_Abstract {
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
|
29 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
|
|
|
|
20 |
|
21 |
+
class Magmodules_Feedbackcompany_Model_Mysql4_Log extends Mage_Core_Model_Mysql4_Abstract
|
22 |
+
{
|
23 |
+
|
24 |
+
/**
|
25 |
+
*
|
26 |
+
*/
|
27 |
+
public function _construct()
|
28 |
+
{
|
29 |
+
$this->_init('feedbackcompany/log', 'id');
|
30 |
+
}
|
31 |
|
32 |
}
|
app/code/community/Magmodules/Feedbackcompany/Model/Mysql4/Log/Collection.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,19 +11,23 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
-
class Magmodules_Feedbackcompany_Model_Mysql4_Log_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
|
30 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
|
|
|
|
20 |
|
21 |
+
class Magmodules_Feedbackcompany_Model_Mysql4_Log_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
22 |
+
{
|
23 |
+
|
24 |
+
/**
|
25 |
+
*
|
26 |
+
*/
|
27 |
+
public function _construct()
|
28 |
+
{
|
29 |
+
parent::_construct();
|
30 |
+
$this->_init('feedbackcompany/log');
|
31 |
+
}
|
32 |
|
33 |
}
|
app/code/community/Magmodules/Feedbackcompany/Model/Mysql4/Reviews.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,18 +11,22 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
-
class Magmodules_Feedbackcompany_Model_Mysql4_Reviews extends Mage_Core_Model_Mysql4_Abstract {
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
|
29 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
|
|
|
|
20 |
|
21 |
+
class Magmodules_Feedbackcompany_Model_Mysql4_Reviews extends Mage_Core_Model_Mysql4_Abstract
|
22 |
+
{
|
23 |
+
|
24 |
+
/**
|
25 |
+
*
|
26 |
+
*/
|
27 |
+
public function _construct()
|
28 |
+
{
|
29 |
+
$this->_init('feedbackcompany/reviews', 'review_id');
|
30 |
+
}
|
31 |
|
32 |
}
|
app/code/community/Magmodules/Feedbackcompany/Model/Mysql4/Reviews/Collection.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,19 +11,23 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
-
class Magmodules_Feedbackcompany_Model_Mysql4_Reviews_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
|
30 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
|
|
|
|
20 |
|
21 |
+
class Magmodules_Feedbackcompany_Model_Mysql4_Reviews_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
22 |
+
{
|
23 |
+
|
24 |
+
/**
|
25 |
+
*
|
26 |
+
*/
|
27 |
+
public function _construct()
|
28 |
+
{
|
29 |
+
parent::_construct();
|
30 |
+
$this->_init('feedbackcompany/reviews');
|
31 |
+
}
|
32 |
|
33 |
}
|
app/code/community/Magmodules/Feedbackcompany/Model/Mysql4/Stats.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,18 +11,22 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
|
22 |
-
class Magmodules_Feedbackcompany_Model_Mysql4_Stats extends Mage_Core_Model_Mysql4_Abstract
|
|
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
|
|
|
|
|
|
28 |
|
29 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
|
21 |
+
class Magmodules_Feedbackcompany_Model_Mysql4_Stats extends Mage_Core_Model_Mysql4_Abstract
|
22 |
+
{
|
23 |
|
24 |
+
/**
|
25 |
+
*
|
26 |
+
*/
|
27 |
+
public function _construct()
|
28 |
+
{
|
29 |
+
$this->_init('feedbackcompany/stats', 'id');
|
30 |
+
}
|
31 |
|
32 |
}
|
app/code/community/Magmodules/Feedbackcompany/Model/Mysql4/Stats/Collection.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,19 +11,23 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
-
class Magmodules_Feedbackcompany_Model_Mysql4_Stats_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
|
30 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
|
|
|
|
20 |
|
21 |
+
class Magmodules_Feedbackcompany_Model_Mysql4_Stats_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
22 |
+
{
|
23 |
+
|
24 |
+
/**
|
25 |
+
*
|
26 |
+
*/
|
27 |
+
public function _construct()
|
28 |
+
{
|
29 |
+
parent::_construct();
|
30 |
+
$this->_init('feedbackcompany/stats');
|
31 |
+
}
|
32 |
|
33 |
}
|
app/code/community/Magmodules/Feedbackcompany/Model/Observer.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,151 +11,168 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
-
class Magmodules_Feedbackcompany_Model_Observer {
|
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 |
-
if($results['review_new'] > 0) {
|
73 |
-
$log = Mage::getModel('feedbackcompany/log')->addToLog('productreviews', $storeid, $results, '', (microtime(true) - $start_time), $crontype);
|
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 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
|
|
|
|
20 |
|
21 |
+
class Magmodules_Feedbackcompany_Model_Observer
|
22 |
+
{
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Stats cron
|
26 |
+
*/
|
27 |
+
public function processStats()
|
28 |
+
{
|
29 |
+
$logModel = Mage::getModel('feedbackcompany/log');
|
30 |
+
$storeIds = Mage::getModel('feedbackcompany/api')->getStoreIds('cron');
|
31 |
+
foreach ($storeIds as $storeId) {
|
32 |
+
$startTime = microtime(true);
|
33 |
+
$results = Mage::getModel('feedbackcompany/stats')->runUpdate($storeId);
|
34 |
+
$logModel->addToLog('reviews', $storeId, $results, '', $startTime, 'stats');
|
35 |
+
}
|
36 |
+
}
|
|
|
37 |
|
38 |
+
/**
|
39 |
+
* Reviews cron
|
40 |
+
*/
|
41 |
+
public function processReviews()
|
42 |
+
{
|
43 |
+
$logModel = Mage::getModel('feedbackcompany/log');
|
44 |
+
$storeIds = Mage::getModel('feedbackcompany/api')->getStoreIds('cron');
|
45 |
+
foreach ($storeIds as $storeId) {
|
46 |
+
$startTime = microtime(true);
|
47 |
+
$results = Mage::getModel('feedbackcompany/reviews')->runUpdate($storeId);
|
48 |
+
$logModel->addToLog('reviews', $storeId, $results, '', $startTime, 'reviews');
|
49 |
+
}
|
50 |
+
}
|
|
|
|
|
|
|
51 |
|
52 |
+
/**
|
53 |
+
* History cron
|
54 |
+
*/
|
55 |
+
public function processHistory()
|
56 |
+
{
|
57 |
+
$logModel = Mage::getModel('feedbackcompany/log');
|
58 |
+
$storeIds = Mage::getModel('feedbackcompany/api')->getStoreIds('cron');
|
59 |
+
foreach ($storeIds as $storeId) {
|
60 |
+
$startTime = microtime(true);
|
61 |
+
$results = Mage::getModel('feedbackcompany/reviews')->runUpdate($storeId, 'full');
|
62 |
+
$logModel->addToLog('reviews', $storeId, $results, '', $startTime, 'reviews');
|
63 |
+
}
|
64 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
|
66 |
+
/**
|
67 |
+
* Productreviews cron
|
68 |
+
*/
|
69 |
+
public function processProductreviews()
|
70 |
+
{
|
71 |
+
$logModel = Mage::getModel('feedbackcompany/log');
|
72 |
+
$storeIds = Mage::getModel('feedbackcompany/api')->getStoreIds('prcron');
|
73 |
+
foreach ($storeIds as $storeId) {
|
74 |
+
$startTime = microtime(true);
|
75 |
+
$results = Mage::getModel('feedbackcompany/productreviews')->runUpdate($storeId);
|
76 |
+
$logModel->addToLog('productreviews', $storeId, $results, '', $startTime, 'productreviews');
|
77 |
+
}
|
78 |
+
}
|
|
|
|
|
|
|
79 |
|
80 |
+
/**
|
81 |
+
* Log cleaning cron
|
82 |
+
*/
|
83 |
+
public function cleanLog()
|
84 |
+
{
|
85 |
+
$enabled = Mage::getStoreConfig('feedbackcompany/log/clean', 0);
|
86 |
+
$days = Mage::getStoreConfig('feedbackcompany/log/clean_days', 0);
|
87 |
+
if (($enabled) && ($days > 0)) {
|
88 |
+
$deldate = date('Y-m-d', strtotime('-' . $days . ' days'));
|
89 |
+
$logs = Mage::getModel('feedbackcompany/log')->getCollection()
|
90 |
+
->addFieldToSelect('id')
|
91 |
+
->addFieldToFilter('date', array('lteq' => $deldate));
|
92 |
+
foreach ($logs as $log) {
|
93 |
+
$log->delete();
|
94 |
+
}
|
95 |
+
}
|
96 |
+
}
|
97 |
|
98 |
+
/**
|
99 |
+
* sales_order_shipment_save_after observer for invitation call
|
100 |
+
*
|
101 |
+
* @param $observer
|
102 |
+
*/
|
103 |
+
public function processFeedbackInvitationcallAfterShipment($observer)
|
104 |
{
|
105 |
+
$shipment = $observer->getEvent()->getShipment();
|
106 |
+
$order = $shipment->getOrder();
|
107 |
+
$invitationEnabled = Mage::getStoreConfig('feedbackcompany/invitation/enabled', $order->getStoreId());
|
108 |
+
$connector = Mage::getStoreConfig('feedbackcompany/invitation/connector', $order->getStoreId());
|
109 |
+
if ($invitationEnabled && $connector) {
|
110 |
+
$status = Mage::getStoreConfig('feedbackcompany/invitation/status', $order->getStoreId());
|
111 |
+
if ($order->getStatus() == $status) {
|
112 |
+
if (!$order->getFeedbackSent()) {
|
113 |
+
$backlog = Mage::getStoreConfig('feedbackcompany/invitation/backlog', $order->getStoreId());
|
114 |
+
if ($backlog > 0) {
|
115 |
+
$dateDiff = floor(time() - strtotime($order->getCreatedAt())) / (60 * 60 * 24);
|
116 |
+
if ($dateDiff < $backlog) {
|
117 |
+
Mage::getModel('feedbackcompany/api')->sendInvitation($order);
|
118 |
+
}
|
119 |
+
} else {
|
120 |
+
Mage::getModel('feedbackcompany/api')->sendInvitation($order);
|
121 |
+
}
|
122 |
+
}
|
123 |
+
}
|
124 |
+
}
|
125 |
+
}
|
126 |
|
127 |
+
/**
|
128 |
+
* sales_order_save_commit_after observer for invitation call
|
129 |
+
*
|
130 |
+
* @param $observer
|
131 |
+
*/
|
132 |
+
public function processFeedbackInvitationcall($observer)
|
133 |
+
{
|
134 |
+
$order = $observer->getEvent()->getOrder();
|
135 |
+
$invitationEnabled = Mage::getStoreConfig('feedbackcompany/invitation/enabled', $order->getStoreId());
|
136 |
+
$connector = Mage::getStoreConfig('feedbackcompany/invitation/connector', $order->getStoreId());
|
137 |
+
if ($invitationEnabled && $connector) {
|
138 |
+
$status = Mage::getStoreConfig('feedbackcompany/invitation/status', $order->getStoreId());
|
139 |
+
if ($order->getStatus() == $status) {
|
140 |
+
if (!$order->getFeedbackSent()) {
|
141 |
+
$backlog = Mage::getStoreConfig('feedbackcompany/invitation/backlog', $order->getStoreId());
|
142 |
+
if ($backlog > 0) {
|
143 |
+
$dateDiff = floor(time() - strtotime($order->getCreatedAt())) / (60 * 60 * 24);
|
144 |
+
if ($dateDiff < $backlog) {
|
145 |
+
Mage::getModel('feedbackcompany/api')->sendInvitation($order);
|
146 |
+
}
|
147 |
+
} else {
|
148 |
+
Mage::getModel('feedbackcompany/api')->sendInvitation($order);
|
149 |
+
}
|
150 |
+
}
|
151 |
+
}
|
152 |
+
}
|
153 |
+
}
|
154 |
|
155 |
+
/**
|
156 |
+
* Add export option to review grid
|
157 |
+
*
|
158 |
+
* @param $observer
|
159 |
+
*/
|
160 |
+
public function addExportOption($observer)
|
161 |
+
{
|
162 |
+
$block = $observer->getEvent()->getBlock();
|
163 |
+
$targetBlock = 'Mage_Adminhtml_Block_Widget_Grid_Massaction';
|
164 |
+
$controllerName = 'catalog_product_review';
|
165 |
+
if (get_class($block) == $targetBlock && $block->getRequest()->getControllerName() == $controllerName) {
|
166 |
+
$request = Mage::app()->getFrontController()->getRequest();
|
167 |
+
$filter = $request->getParam('filter');
|
168 |
+
$block->addItem(
|
169 |
+
'reviewsexport',
|
170 |
+
array(
|
171 |
+
'label' => Mage::helper('feedbackcompany')->__('Export Reviews'),
|
172 |
+
'url' => Mage::app()->getStore()->getUrl('*/feedbackreviews/exportcsv/filter/' . $filter),
|
173 |
+
)
|
174 |
+
);
|
175 |
}
|
176 |
+
}
|
177 |
|
178 |
}
|
app/code/community/Magmodules/Feedbackcompany/Model/Productreviews.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,117 +11,231 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
|
22 |
-
class Magmodules_Feedbackcompany_Model_Productreviews extends
|
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 |
-
|
125 |
-
|
126 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
|
128 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
|
21 |
+
class Magmodules_Feedbackcompany_Model_Productreviews extends Magmodules_Feedbackcompany_Model_Api
|
22 |
+
{
|
23 |
+
|
24 |
+
const FBC_REVIEW_URL = 'https://beoordelingen.feedbackcompany.nl/api/v1/review/getrecent/?type=product&interval=last_week';
|
25 |
+
const FBC_REVIEW_URL_FULL = 'https://beoordelingen.feedbackcompany.nl/api/v1/review/all/?type=product';
|
26 |
+
const XML_REVIEW_IMPORT_STATUS = 'feedbackcompany/productreviews/review_import_status';
|
27 |
+
const XML_REVIEW_IMPORT_RATING = 'feedbackcompany/productreviews/review_import_rating';
|
28 |
+
const XML_LAST_RUN = 'feedbackcompany/productreviews/lastrun';
|
29 |
+
|
30 |
+
public $new = 0;
|
31 |
+
|
32 |
+
/**
|
33 |
+
* @param $storeId
|
34 |
+
* @param $type
|
35 |
+
*
|
36 |
+
* @return array
|
37 |
+
*/
|
38 |
+
public function runUpdate($storeId, $type)
|
39 |
+
{
|
40 |
+
$feed = $this->getFeed($storeId, $type);
|
41 |
+
|
42 |
+
if ($feed['status'] != 'OK') {
|
43 |
+
return $feed;
|
44 |
+
}
|
45 |
+
|
46 |
+
if (!isset($feed['feed']['product_reviews'])) {
|
47 |
+
return array();
|
48 |
+
}
|
49 |
+
|
50 |
+
$statusId = Mage::getStoreConfig(self::XML_REVIEW_IMPORT_STATUS, $storeId);
|
51 |
+
$ratingId = Mage::getStoreConfig(self::XML_REVIEW_IMPORT_RATING, $storeId);
|
52 |
+
$options = $this->getRatingOptionArray($ratingId);
|
53 |
+
$storeViews = $this->getAllStoreViews($storeId);
|
54 |
+
|
55 |
+
foreach ($feed['feed']['product_reviews'] as $review) {
|
56 |
+
$reviewId = $this->getReviewIdByFeedbackId($review['id']);
|
57 |
+
if (!empty($reviewId)) {
|
58 |
+
continue;
|
59 |
+
}
|
60 |
+
|
61 |
+
if ($review['rating'] < 1) {
|
62 |
+
continue;
|
63 |
+
}
|
64 |
+
|
65 |
+
$productId = Mage::getModel("catalog/product")->getIdBySku($review['product_sku']);
|
66 |
+
if (!$productId) {
|
67 |
+
continue;
|
68 |
+
//$productId = '905';
|
69 |
+
}
|
70 |
+
|
71 |
+
try {
|
72 |
+
$content = $review['review'];
|
73 |
+
$title = $this->getFirstSentence($content);
|
74 |
+
if (!empty($title)) {
|
75 |
+
|
76 |
+
$createdAt = $this->reformatDate($review['date_created']);
|
77 |
+
$nickName = $review['client']['name'];
|
78 |
+
$id = $review['id'];
|
79 |
+
|
80 |
+
$review = Mage::getModel('review/review');
|
81 |
+
$review->setEntityPkValue($productId);
|
82 |
+
$review->setCreatedAt($createdAt);
|
83 |
+
$review->setTitle($title);
|
84 |
+
$review->setFeedbackcompanyId($id);
|
85 |
+
$review->setDetail($content);
|
86 |
+
$review->setEntityId(1);
|
87 |
+
$review->setStoreId(0);
|
88 |
+
$review->setStatusId($statusId);
|
89 |
+
$review->setCustomerId(null);
|
90 |
+
$review->setNickname($nickName);
|
91 |
+
$review->setStores($storeViews);
|
92 |
+
$review->setSkipCreatedAtSet(true);
|
93 |
+
$review->save();
|
94 |
+
|
95 |
+
$rating = Mage::getModel('rating/rating');
|
96 |
+
$rating->setRatingId($ratingId);
|
97 |
+
$rating->setReviewId($review->getId());
|
98 |
+
$rating->setCustomerId(null);
|
99 |
+
$rating->addOptionVote($options[$id], $productId);
|
100 |
+
$review->aggregate();
|
101 |
+
}
|
102 |
+
} catch (Exception $e) {
|
103 |
+
Mage::log($e->getMessage(), null, 'feedbackcompany.log');
|
104 |
+
}
|
105 |
+
}
|
106 |
+
|
107 |
+
Mage::helper('feedbackcompany')->saveConfigValue(self::XML_LAST_RUN, now());
|
108 |
+
|
109 |
+
return array(
|
110 |
+
'status' => 'OK',
|
111 |
+
'new' => $this->new,
|
112 |
+
'company' => $feed['feed']['shop']['webshop_name']
|
113 |
+
);
|
114 |
+
}
|
115 |
+
|
116 |
+
/**
|
117 |
+
* @param $storeId
|
118 |
+
* @param $type
|
119 |
+
*
|
120 |
+
* @return array
|
121 |
+
*/
|
122 |
+
public function getFeed($storeId, $type)
|
123 |
+
{
|
124 |
+
$apiUrl = self:: FBC_REVIEW_URL;
|
125 |
+
|
126 |
+
if ($type == 'full') {
|
127 |
+
$apiUrl = self:: FBC_REVIEW_URL_FULL;
|
128 |
+
}
|
129 |
+
|
130 |
+
$apiResult = $this->makeRequest($apiUrl, $storeId);
|
131 |
+
|
132 |
+
if ($apiResult) {
|
133 |
+
if (!empty($apiResult['message']) && $apiResult['message'] == 'OK') {
|
134 |
+
return array(
|
135 |
+
'status' => 'OK',
|
136 |
+
'feed' => $apiResult['data'][0]
|
137 |
+
);
|
138 |
+
}
|
139 |
+
return array(
|
140 |
+
'status' => 'ERROR',
|
141 |
+
'error' => isset($apiResult['error']) ? $apiResult['error'] : ''
|
142 |
+
);
|
143 |
+
} else {
|
144 |
+
return array(
|
145 |
+
'status' => 'ERROR',
|
146 |
+
'error' => Mage::helper('feedbackcompany')->__('Error connect to the API.')
|
147 |
+
);
|
148 |
+
}
|
149 |
+
}
|
150 |
+
|
151 |
+
/**
|
152 |
+
* @param $ratingId
|
153 |
+
*
|
154 |
+
* @return array
|
155 |
+
*/
|
156 |
+
public function getRatingOptionArray($ratingId)
|
157 |
+
{
|
158 |
+
$options = Mage::getModel('rating/rating_option')->getCollection()
|
159 |
+
->addFieldToFilter('rating_id', $ratingId);
|
160 |
+
$array = array();
|
161 |
+
foreach ($options as $option) {
|
162 |
+
$array[$option['value']] = $option['option_id'];
|
163 |
+
}
|
164 |
+
|
165 |
+
return $array;
|
166 |
+
}
|
167 |
+
|
168 |
+
/**
|
169 |
+
* @param $storeId
|
170 |
+
*
|
171 |
+
* @return array
|
172 |
+
*/
|
173 |
+
public function getAllStoreViews($storeId)
|
174 |
+
{
|
175 |
+
$fbcReviewstores = array();
|
176 |
+
$clientId = Mage::getStoreConfig('feedbackcompany/general/client_id', $storeId);
|
177 |
+
$stores = Mage::getModel('core/store')->getCollection();
|
178 |
+
foreach ($stores as $store) {
|
179 |
+
if ($store->getIsActive()) {
|
180 |
+
if (Mage::getStoreConfig('feedbackcompany/productreviews/enabled', $store->getId())) {
|
181 |
+
$cId = Mage::getStoreConfig('feedbackcompany/general/client_id', $store->getId());
|
182 |
+
if ($clientId == $cId) {
|
183 |
+
$fbcReviewstores[] = $store->getId();
|
184 |
+
}
|
185 |
+
}
|
186 |
+
}
|
187 |
+
}
|
188 |
+
|
189 |
+
return $fbcReviewstores;
|
190 |
+
}
|
191 |
+
|
192 |
+
/**
|
193 |
+
* @param $feedbackId
|
194 |
+
*
|
195 |
+
* @return bool|mixed
|
196 |
+
*/
|
197 |
+
public function getReviewIdByFeedbackId($feedbackId)
|
198 |
+
{
|
199 |
+
$loadedReview = Mage::getModel('review/review')
|
200 |
+
->load($feedbackId, 'feedbackcompany_id');
|
201 |
+
|
202 |
+
if (!empty($loadedReview)) {
|
203 |
+
return $loadedReview->getId();
|
204 |
+
}
|
205 |
+
|
206 |
+
return false;
|
207 |
+
}
|
208 |
+
|
209 |
+
/**
|
210 |
+
* @param $string
|
211 |
+
*
|
212 |
+
* @return string
|
213 |
+
*/
|
214 |
+
public function getFirstSentence($string)
|
215 |
+
{
|
216 |
+
$string = str_replace(" .", ".", $string);
|
217 |
+
$string = str_replace(" ?", "?", $string);
|
218 |
+
$string = str_replace(" !", "!", $string);
|
219 |
+
preg_match('/^.*[^\s](\.|\?|\!)/U', $string, $match);
|
220 |
+
if (!empty($match[0])) {
|
221 |
+
return $match[0];
|
222 |
+
} else {
|
223 |
+
return Mage::helper('core/string')->truncate($string, 50) . '...';
|
224 |
+
}
|
225 |
+
}
|
226 |
+
|
227 |
+
/**
|
228 |
+
* @param $date
|
229 |
+
*
|
230 |
+
* @return string
|
231 |
+
*/
|
232 |
+
public function reformatDate($date)
|
233 |
+
{
|
234 |
+
$this->new++;
|
235 |
+
$datetime = DateTime::createFromFormat('F, j Y H:i:s T', $date);
|
236 |
+
if ($datetime) {
|
237 |
+
return $datetime->format('Y-m-d H:i:s');
|
238 |
+
}
|
239 |
+
}
|
240 |
|
241 |
}
|
app/code/community/Magmodules/Feedbackcompany/Model/Resource/Review.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,28 +11,35 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
|
22 |
-
class Magmodules_Feedbackcompany_Model_Resource_Review extends Mage_Review_Model_Resource_Review
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
if(!$object->getId() && !$object->getSkipCreatedAtSet()) {
|
27 |
-
$object->setCreatedAt(Mage::getSingleton('core/date')->gmtDate());
|
28 |
-
}
|
29 |
-
if($object->hasData('stores') && is_array($object->getStores())) {
|
30 |
-
$stores = $object->getStores();
|
31 |
-
$stores[] = 0;
|
32 |
-
$object->setStores($stores);
|
33 |
-
} elseif ($object->hasData('stores')) {
|
34 |
-
$object->setStores(array($object->getStores(), 0));
|
35 |
-
}
|
36 |
-
return $this;
|
37 |
-
}
|
38 |
|
39 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
|
21 |
+
class Magmodules_Feedbackcompany_Model_Resource_Review extends Mage_Review_Model_Resource_Review
|
22 |
+
{
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @param Mage_Core_Model_Abstract $object
|
26 |
+
* @return $this
|
27 |
+
*/
|
28 |
+
protected function _beforeSave(Mage_Core_Model_Abstract $object)
|
29 |
+
{
|
30 |
+
if (!$object->getId() && !$object->getSkipCreatedAtSet()) {
|
31 |
+
$object->setCreatedAt(Mage::getSingleton('core/date')->gmtDate());
|
32 |
+
}
|
33 |
+
|
34 |
+
if ($object->hasData('stores') && is_array($object->getStores())) {
|
35 |
+
$stores = $object->getStores();
|
36 |
+
$stores[] = 0;
|
37 |
+
$object->setStores($stores);
|
38 |
+
} elseif ($object->hasData('stores')) {
|
39 |
+
$object->setStores(array($object->getStores(), 0));
|
40 |
+
}
|
41 |
|
42 |
+
return $this;
|
43 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
|
45 |
}
|
app/code/community/Magmodules/Feedbackcompany/Model/Reviews.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,139 +11,216 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
|
22 |
-
class Magmodules_Feedbackcompany_Model_Reviews extends
|
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 |
-
|
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 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
|
21 |
+
class Magmodules_Feedbackcompany_Model_Reviews extends Magmodules_Feedbackcompany_Model_Api
|
22 |
+
{
|
23 |
+
|
24 |
+
const CACHE_TAG = 'feedback_block';
|
25 |
+
const XML_LAST_RUN = 'feedbackcompany/reviews/lastrun';
|
26 |
+
const XML_FLUSH_CACHE = 'feedbackcompany/reviews/flushcache';
|
27 |
+
const FBC_REVIEW_URL = 'https://beoordelingen.feedbackcompany.nl/api/v1/getrecent/?interval=last_week';
|
28 |
+
const FBC_REVIEW_URL_FULL = 'https://beoordelingen.feedbackcompany.nl/api/v1/review/all/';
|
29 |
+
|
30 |
+
public $new = 0;
|
31 |
+
public $update = 0;
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Reviews Constructor
|
35 |
+
*/
|
36 |
+
public function _construct()
|
37 |
+
{
|
38 |
+
parent::_construct();
|
39 |
+
$this->_init('feedbackcompany/reviews');
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* @param $storeId
|
44 |
+
* @param $type
|
45 |
+
*
|
46 |
+
* @return array
|
47 |
+
*/
|
48 |
+
public function runUpdate($storeId, $type)
|
49 |
+
{
|
50 |
+
$feed = $this->getFeed($storeId, $type);
|
51 |
+
|
52 |
+
if ($feed['status'] != 'OK') {
|
53 |
+
return $feed;
|
54 |
+
}
|
55 |
+
|
56 |
+
if (!isset($feed['feed']['reviews'])) {
|
57 |
+
return array();
|
58 |
+
}
|
59 |
+
|
60 |
+
foreach ($feed['feed']['reviews'] as $review) {
|
61 |
+
$reviewId = $this->getReviewIdByFeedbackId($review['id']);
|
62 |
+
if (!empty($reviewId) && ($type != 'full')) {
|
63 |
+
continue;
|
64 |
+
}
|
65 |
+
|
66 |
+
$this->saveReview(
|
67 |
+
array(
|
68 |
+
'review_id' => $reviewId,
|
69 |
+
'feedback_id' => $review['id'],
|
70 |
+
'company' => $feed['feed']['shop']['webshop_name'],
|
71 |
+
'shop_id' => $feed['feed']['shop']['id'],
|
72 |
+
'score' => $review['total_score'],
|
73 |
+
'buy_online' => $review['buy_online'],
|
74 |
+
'customer_recommend' => $this->getRecommends($review['recommends']),
|
75 |
+
'review_text' => $this->getReviewTextFromQuestions($review['questions']),
|
76 |
+
'customer_name' => $review['client']['name'],
|
77 |
+
'customer_sex' => $review['client']['gender'],
|
78 |
+
'customer_age' => $review['client']['age'],
|
79 |
+
'customer_city' => $review['client']['city'],
|
80 |
+
'customer_email' => $review['client']['email'],
|
81 |
+
'customer_country' => $review['client']['country'],
|
82 |
+
'shop_comment' => $review['shop_comment'],
|
83 |
+
'product' => $review['product'],
|
84 |
+
'questions' => json_encode($review['questions']),
|
85 |
+
'date_created' => $this->reformatDate($review['date_created']),
|
86 |
+
'date_updated' => $this->reformatDate($review['date_updated']),
|
87 |
+
)
|
88 |
+
);
|
89 |
+
}
|
90 |
+
|
91 |
+
Mage::helper('feedbackcompany')->saveConfigValue(self::XML_LAST_RUN, now());
|
92 |
+
|
93 |
+
return array(
|
94 |
+
'status' => 'OK',
|
95 |
+
'update' => $this->update,
|
96 |
+
'new' => $this->new,
|
97 |
+
'company' => $feed['feed']['shop']['webshop_name']
|
98 |
+
);
|
99 |
+
|
100 |
+
}
|
101 |
+
|
102 |
+
/**
|
103 |
+
* @param $storeId
|
104 |
+
* @param $type
|
105 |
+
*
|
106 |
+
* @return array
|
107 |
+
*/
|
108 |
+
public function getFeed($storeId, $type)
|
109 |
+
{
|
110 |
+
$apiUrl = self:: FBC_REVIEW_URL;
|
111 |
+
|
112 |
+
if ($type == 'full') {
|
113 |
+
$apiUrl = self:: FBC_REVIEW_URL_FULL;
|
114 |
+
}
|
115 |
+
|
116 |
+
$apiResult = $this->makeRequest($apiUrl, $storeId);
|
117 |
+
|
118 |
+
if ($apiResult) {
|
119 |
+
if (!empty($apiResult['message']) && $apiResult['message'] == 'OK') {
|
120 |
+
return array(
|
121 |
+
'status' => 'OK',
|
122 |
+
'feed' => $apiResult['data'][0]
|
123 |
+
);
|
124 |
+
}
|
125 |
+
return array(
|
126 |
+
'status' => 'ERROR',
|
127 |
+
'error' => isset($apiResult['error']) ? $apiResult['error'] : ''
|
128 |
+
);
|
129 |
+
} else {
|
130 |
+
return array(
|
131 |
+
'status' => 'ERROR',
|
132 |
+
'error' => Mage::helper('feedbackcompany')->__('Error connect to the API.')
|
133 |
+
);
|
134 |
+
}
|
135 |
+
}
|
136 |
+
|
137 |
+
/**
|
138 |
+
* @param $feedbackId
|
139 |
+
*
|
140 |
+
* @return mixed
|
141 |
+
*/
|
142 |
+
public function getReviewIdByFeedbackId($feedbackId)
|
143 |
+
{
|
144 |
+
$reviewId = $this->getCollection()
|
145 |
+
->addFieldToFilter('feedback_id', $feedbackId)
|
146 |
+
->addFieldToSelect('review_id')
|
147 |
+
->getFirstItem()
|
148 |
+
->getReviewId();
|
149 |
+
|
150 |
+
return $reviewId;
|
151 |
+
}
|
152 |
+
|
153 |
+
/**
|
154 |
+
* @param $data
|
155 |
+
*/
|
156 |
+
public function saveReview($data)
|
157 |
+
{
|
158 |
+
Mage::getModel('feedbackcompany/reviews')->setData($data)->save();
|
159 |
+
if ($data['review_id'] > 0) {
|
160 |
+
$this->update++;
|
161 |
+
} else {
|
162 |
+
$this->new++;
|
163 |
+
}
|
164 |
+
}
|
165 |
+
|
166 |
+
/**
|
167 |
+
* @param $recommends
|
168 |
+
*
|
169 |
+
* @return int
|
170 |
+
*/
|
171 |
+
public function getRecommends($recommends)
|
172 |
+
{
|
173 |
+
if (strtolower($recommends) == 'ja') {
|
174 |
+
return 1;
|
175 |
+
}
|
176 |
+
|
177 |
+
if (strtolower($recommends) == 'nee') {
|
178 |
+
return 0;
|
179 |
+
}
|
180 |
+
|
181 |
+
return -1;
|
182 |
+
}
|
183 |
+
|
184 |
+
/**
|
185 |
+
* @param $questions
|
186 |
+
*
|
187 |
+
* @return mixed
|
188 |
+
*/
|
189 |
+
public function getReviewTextFromQuestions($questions)
|
190 |
+
{
|
191 |
+
foreach ($questions as $question) {
|
192 |
+
if ($question['type'] == 'main_open') {
|
193 |
+
return $question['value'];
|
194 |
+
}
|
195 |
+
}
|
196 |
+
|
197 |
+
return '';
|
198 |
+
}
|
199 |
+
|
200 |
+
/**
|
201 |
+
* @param $date
|
202 |
+
*
|
203 |
+
* @return string
|
204 |
+
*/
|
205 |
+
public function reformatDate($date)
|
206 |
+
{
|
207 |
+
$datetime = DateTime::createFromFormat('F, j Y H:i:s T', $date);
|
208 |
+
return $datetime->format('Y-m-d H:i:s');
|
209 |
+
}
|
210 |
+
|
211 |
+
/**
|
212 |
+
* Flush Cache function
|
213 |
+
*/
|
214 |
+
public function flushCache()
|
215 |
+
{
|
216 |
+
if (Mage::getStoreConfig(self::XML_FLUSH_CACHE)) {
|
217 |
+
Mage::app()->cleanCache(
|
218 |
+
array(
|
219 |
+
Mage_Cms_Model_Block::CACHE_TAG,
|
220 |
+
Magmodules_Feedbackcompany_Model_Reviews::CACHE_TAG
|
221 |
+
)
|
222 |
+
);
|
223 |
+
}
|
224 |
+
}
|
225 |
|
226 |
}
|
app/code/community/Magmodules/Feedbackcompany/Model/Stats.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,103 +11,167 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
-
class Magmodules_Feedbackcompany_Model_Stats extends
|
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 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
+
|
21 |
+
class Magmodules_Feedbackcompany_Model_Stats extends Magmodules_Feedbackcompany_Model_Api
|
22 |
+
{
|
23 |
+
|
24 |
+
const FBC_REVIEW_SUMMARY_URL = 'https://beoordelingen.feedbackcompany.nl/api/v1/review/summary';
|
25 |
+
|
26 |
+
/**
|
27 |
+
*
|
28 |
+
*/
|
29 |
+
public function _construct()
|
30 |
+
{
|
31 |
+
parent::_construct();
|
32 |
+
$this->_init('feedbackcompany/stats');
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* @param $storeId
|
37 |
+
*
|
38 |
+
* @return array
|
39 |
+
*/
|
40 |
+
public function runUpdate($storeId)
|
41 |
+
{
|
42 |
+
$feed = $this->getFeed($storeId);
|
43 |
+
|
44 |
+
if ($feed['status'] != 'OK') {
|
45 |
+
return $feed;
|
46 |
+
}
|
47 |
+
|
48 |
+
$id = $this->getShopIdByFeedbackId($feed['feed']['shop']['id']);
|
49 |
+
$this->saveSummary(
|
50 |
+
array(
|
51 |
+
'id' => $id,
|
52 |
+
'company' => $feed['feed']['shop']['webshop_name'],
|
53 |
+
'shop_id' => $feed['feed']['shop']['id'],
|
54 |
+
'score' => ($feed['feed']['review_summary']['merchant_score'] * 10),
|
55 |
+
'scoremax' => ($feed['feed']['review_summary']['max_score'] * 10),
|
56 |
+
'votes' => $feed['feed']['review_summary']['total_reviews'],
|
57 |
+
'review_url' => $feed['feed']['shop']['review_url'],
|
58 |
+
'recommends' => $feed['feed']['review_summary']['total_recommends'],
|
59 |
+
'client_id' => $this->getClientId($storeId)
|
60 |
+
)
|
61 |
+
);
|
62 |
+
|
63 |
+
return array(
|
64 |
+
'status' => 'OK',
|
65 |
+
'company' => $feed['feed']['shop']['webshop_name']
|
66 |
+
);
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* @param $storeId
|
71 |
+
*
|
72 |
+
* @return array
|
73 |
+
*/
|
74 |
+
public function getFeed($storeId)
|
75 |
+
{
|
76 |
+
$apiResult = $this->makeRequest(self:: FBC_REVIEW_SUMMARY_URL, $storeId);
|
77 |
+
|
78 |
+
if ($apiResult) {
|
79 |
+
if (!empty($apiResult['message']) && $apiResult['message'] == 'OK') {
|
80 |
+
return array(
|
81 |
+
'status' => 'OK',
|
82 |
+
'feed' => $apiResult['data'][0]
|
83 |
+
);
|
84 |
+
}
|
85 |
+
return array(
|
86 |
+
'status' => 'ERROR',
|
87 |
+
'error' => isset($apiResult['error']) ? $apiResult['error'] : ''
|
88 |
+
);
|
89 |
+
} else {
|
90 |
+
return array(
|
91 |
+
'status' => 'ERROR',
|
92 |
+
'error' => Mage::helper('feedbackcompany')->__('Error connect to the API.'),
|
93 |
+
);
|
94 |
+
}
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* @param $feedbackId
|
99 |
+
*
|
100 |
+
* @return mixed
|
101 |
+
*/
|
102 |
+
public function getShopIdByFeedbackId($feedbackId)
|
103 |
+
{
|
104 |
+
$id = $this->getCollection()
|
105 |
+
->addFieldToFilter('shop_id', $feedbackId)
|
106 |
+
->addFieldToSelect('id')
|
107 |
+
->getFirstItem()
|
108 |
+
->getId();
|
109 |
+
|
110 |
+
return $id;
|
111 |
+
}
|
112 |
+
|
113 |
+
/**
|
114 |
+
* @param $data
|
115 |
+
*/
|
116 |
+
public function saveSummary($data)
|
117 |
+
{
|
118 |
+
Mage::getModel('feedbackcompany/stats')->setData($data)->save();
|
119 |
+
}
|
120 |
+
|
121 |
+
/**
|
122 |
+
* @param $storeId
|
123 |
+
*
|
124 |
+
* @return mixed
|
125 |
+
*/
|
126 |
+
public function getShopIdByStoreId($storeId = null)
|
127 |
+
{
|
128 |
+
if (empty($storeId)) {
|
129 |
+
$storeId = Mage::app()->getStore()->getStoreId();
|
130 |
+
}
|
131 |
+
|
132 |
+
if($stats = $this->loadByStoreId($storeId)) {
|
133 |
+
return $stats->getShopId();
|
134 |
+
}
|
135 |
+
|
136 |
+
return false;
|
137 |
+
}
|
138 |
+
|
139 |
+
/**
|
140 |
+
* @param $storeId
|
141 |
+
*
|
142 |
+
* @return mixed
|
143 |
+
*/
|
144 |
+
public function loadByStoreId($storeId)
|
145 |
+
{
|
146 |
+
$clientId = Mage::getStoreConfig('feedbackcompany/general/client_id', $storeId);
|
147 |
+
$stats = $this->getCollection()->addFieldToFilter('client_id', $clientId)->getFirstItem();
|
148 |
+
|
149 |
+
if ($stats->getScore() > 0) {
|
150 |
+
$stats->setPercentage($stats->getScore());
|
151 |
+
$stats->setStarsQty(number_format(($stats->getScore() / 10), 1, ',', ''));
|
152 |
+
return $stats;
|
153 |
+
} else {
|
154 |
+
return false;
|
155 |
+
}
|
156 |
+
}
|
157 |
+
|
158 |
+
/**
|
159 |
+
* @param null $storeId
|
160 |
+
*
|
161 |
+
* @return mixed
|
162 |
+
*/
|
163 |
+
public function getFeedbackUrl($storeId = null)
|
164 |
+
{
|
165 |
+
if (empty($storeId)) {
|
166 |
+
$storeId = Mage::app()->getStore()->getStoreId();
|
167 |
+
}
|
168 |
+
|
169 |
+
$clientId = Mage::getStoreConfig('feedbackcompany/general/client_id', $storeId);
|
170 |
+
$stats = $this->getCollection()->addFieldToFilter('client_id', $clientId)->getFirstItem();
|
171 |
+
|
172 |
+
if($stats) {
|
173 |
+
return $stats->getReviewUrl();
|
174 |
+
}
|
175 |
+
}
|
176 |
+
|
177 |
}
|
app/code/community/Magmodules/Feedbackcompany/Model/System/Config/Source/Attribute.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,34 +11,38 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
-
class Magmodules_Feedbackcompany_Model_System_Config_Source_Attribute {
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
|
|
|
|
30 |
$optionArray[] = array(
|
31 |
'label' => Mage::helper('feedbackcompany')->__('-- Select Yes/No Attribute'),
|
32 |
-
'value' => ''
|
33 |
);
|
34 |
-
|
35 |
-
|
|
|
|
|
|
|
|
|
36 |
$optionArray[] = array(
|
37 |
'label' => $attribute->getData('frontend_label'),
|
38 |
'value' => $attribute->getData('attribute_code')
|
39 |
);
|
40 |
}
|
41 |
-
|
42 |
return $optionArray;
|
43 |
}
|
44 |
-
|
45 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
|
|
|
|
20 |
|
21 |
+
class Magmodules_Feedbackcompany_Model_System_Config_Source_Attribute
|
22 |
+
{
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @return array
|
26 |
+
*/
|
27 |
+
public function toOptionArray()
|
28 |
+
{
|
29 |
$optionArray[] = array(
|
30 |
'label' => Mage::helper('feedbackcompany')->__('-- Select Yes/No Attribute'),
|
31 |
+
'value' => ''
|
32 |
);
|
33 |
+
|
34 |
+
$attributes = Mage::getResourceModel('catalog/product_attribute_collection')
|
35 |
+
->addVisibleFilter()
|
36 |
+
->addFieldToFilter('frontend_input', array('boolean'));
|
37 |
+
|
38 |
+
foreach ($attributes as $attribute) {
|
39 |
$optionArray[] = array(
|
40 |
'label' => $attribute->getData('frontend_label'),
|
41 |
'value' => $attribute->getData('attribute_code')
|
42 |
);
|
43 |
}
|
44 |
+
|
45 |
return $optionArray;
|
46 |
}
|
47 |
+
|
48 |
}
|
app/code/community/Magmodules/Feedbackcompany/Model/System/Config/Source/Category.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,56 +11,68 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
-
class Magmodules_Feedbackcompany_Model_System_Config_Source_Category {
|
23 |
|
24 |
-
|
25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
$options = array();
|
27 |
-
|
28 |
$collection = Mage::getResourceModel('catalog/category_collection');
|
29 |
$collection->addAttributeToSelect('name')->addPathFilter('^1/[0-9/]+')->load();
|
30 |
$cats = array();
|
|
|
31 |
foreach ($collection as $category) {
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
$cats[$cat->value] = $cat;
|
38 |
}
|
39 |
|
40 |
-
foreach($cats as $id => $cat){
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
|
|
47 |
}
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
|
|
|
|
|
|
|
|
62 |
}
|
|
|
63 |
unset($cats);
|
|
|
64 |
return $options;
|
65 |
}
|
66 |
-
|
67 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
|
|
|
|
20 |
|
21 |
+
class Magmodules_Feedbackcompany_Model_System_Config_Source_Category
|
22 |
+
{
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @return array
|
26 |
+
*/
|
27 |
+
public function toOptionArray()
|
28 |
+
{
|
29 |
$options = array();
|
30 |
+
|
31 |
$collection = Mage::getResourceModel('catalog/category_collection');
|
32 |
$collection->addAttributeToSelect('name')->addPathFilter('^1/[0-9/]+')->load();
|
33 |
$cats = array();
|
34 |
+
|
35 |
foreach ($collection as $category) {
|
36 |
+
$cat = new stdClass();
|
37 |
+
$cat->label = $category->getName();
|
38 |
+
$cat->value = $category->getId();
|
39 |
+
$cat->level = $category->getLevel();
|
40 |
+
$cat->parentid = $category->getParentId();
|
41 |
$cats[$cat->value] = $cat;
|
42 |
}
|
43 |
|
44 |
+
foreach ($cats as $id => $cat) {
|
45 |
+
if (isset($cats[$cat->parentid])) {
|
46 |
+
if (!isset($cats[$cat->parentid]->child)) {
|
47 |
+
$cats[$cat->parentid]->child = array();
|
48 |
+
}
|
49 |
+
|
50 |
+
$cats[$cat->parentid]->child[] =& $cats[$id];
|
51 |
+
}
|
52 |
}
|
53 |
+
|
54 |
+
foreach ($cats as $id => $cat) {
|
55 |
+
if (!isset($cats[$cat->parentid])) {
|
56 |
+
$stack = array($cats[$id]);
|
57 |
+
while (count($stack) > 0) {
|
58 |
+
$opt = array_pop($stack);
|
59 |
+
$option = array(
|
60 |
+
'label' => ($opt->level > 1 ? str_repeat('- ', $opt->level - 1) : '') . $opt->label,
|
61 |
+
'value' => $opt->value
|
62 |
+
);
|
63 |
+
array_push($options, $option);
|
64 |
+
if (isset($opt->child) && count($opt->child)) {
|
65 |
+
foreach (array_reverse($opt->child) as $child) {
|
66 |
+
array_push($stack, $child);
|
67 |
+
}
|
68 |
+
}
|
69 |
+
}
|
70 |
+
}
|
71 |
}
|
72 |
+
|
73 |
unset($cats);
|
74 |
+
|
75 |
return $options;
|
76 |
}
|
77 |
+
|
78 |
}
|
app/code/community/Magmodules/Feedbackcompany/Model/System/Config/Source/Cronfrequency.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,26 +11,30 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
-
class Magmodules_Feedbackcompany_Model_System_Config_Source_Cronfrequency {
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
|
37 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
|
|
|
|
20 |
|
21 |
+
class Magmodules_Feedbackcompany_Model_System_Config_Source_Cronfrequency
|
22 |
+
{
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @return array
|
26 |
+
*/
|
27 |
+
public function toOptionArray()
|
28 |
+
{
|
29 |
+
return array(
|
30 |
+
'' => Mage::helper('feedbackcompany')->__('Never'),
|
31 |
+
'0 * * * *' => Mage::helper('feedbackcompany')->__('Every Hour'),
|
32 |
+
'0 */2 * * *' => Mage::helper('feedbackcompany')->__('Every other Hour'),
|
33 |
+
'0 8,20 * * *' => Mage::helper('feedbackcompany')->__('Twice a Day'),
|
34 |
+
'0 2 * * *' => Mage::helper('feedbackcompany')->__('Once a Day'),
|
35 |
+
'0 2 * * 0' => Mage::helper('feedbackcompany')->__('Once a Week'),
|
36 |
+
'0 2 1 * *' => Mage::helper('feedbackcompany')->__('Once a Month'),
|
37 |
+
);
|
38 |
+
}
|
39 |
|
40 |
}
|
app/code/community/Magmodules/Feedbackcompany/Model/System/Config/Source/Cronfrequencylong.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,23 +11,27 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
-
class Magmodules_Feedbackcompany_Model_System_Config_Source_Cronfrequencylong {
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
|
34 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
|
|
|
|
20 |
|
21 |
+
class Magmodules_Feedbackcompany_Model_System_Config_Source_Cronfrequencylong
|
22 |
+
{
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @return array
|
26 |
+
*/
|
27 |
+
public function toOptionArray()
|
28 |
+
{
|
29 |
+
return array(
|
30 |
+
'' => Mage::helper('feedbackcompany')->__('Never'),
|
31 |
+
'0 2 * * *' => Mage::helper('feedbackcompany')->__('Once a Day'),
|
32 |
+
'0 2 * * 0' => Mage::helper('feedbackcompany')->__('Once a Week'),
|
33 |
+
'0 2 1 * *' => Mage::helper('feedbackcompany')->__('Once a Month'),
|
34 |
+
);
|
35 |
+
}
|
36 |
|
37 |
}
|
app/code/community/Magmodules/Feedbackcompany/Model/System/Config/Source/Orderstatus.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,26 +11,33 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
-
class Magmodules_Feedbackcompany_Model_System_Config_Source_Orderstatus {
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
|
37 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
|
|
|
|
20 |
|
21 |
+
class Magmodules_Feedbackcompany_Model_System_Config_Source_Orderstatus
|
22 |
+
{
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @return array
|
26 |
+
*/
|
27 |
+
public function toOptionArray()
|
28 |
+
{
|
29 |
+
$storeModel = Mage::getSingleton('adminhtml/system_store');
|
30 |
+
$statuses = Mage::getSingleton('sales/order_config')->getStatuses();
|
31 |
+
$options = array();
|
32 |
+
|
33 |
+
$this->_options = array(array('value' => 0, 'label' => Mage::helper('feedbackcompany')->__('-- none')));
|
34 |
+
foreach ($statuses as $k => $v) {
|
35 |
+
$options[] = array('label' => $v, 'value' => $k);
|
36 |
+
}
|
37 |
+
|
38 |
+
$this->_options = array_merge($this->_options, $options);
|
39 |
+
|
40 |
+
return $this->_options;
|
41 |
+
}
|
42 |
|
43 |
}
|
app/code/community/Magmodules/Feedbackcompany/Model/System/Config/Source/Position.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,21 +11,26 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
|
22 |
-
class Magmodules_Feedbackcompany_Model_System_Config_Source_Position
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
$position = array();
|
27 |
-
$position[] = array('value'=>'left', 'label' => Mage::helper('feedbackcompany')->__('Left'));
|
28 |
-
$position[] = array('value'=>'right', 'label' => Mage::helper('feedbackcompany')->__('Right'));
|
29 |
-
return $position;
|
30 |
-
}
|
31 |
|
32 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
|
21 |
+
class Magmodules_Feedbackcompany_Model_System_Config_Source_Position
|
22 |
+
{
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @return array
|
26 |
+
*/
|
27 |
+
public function toOptionArray()
|
28 |
+
{
|
29 |
+
$position = array();
|
30 |
+
$position[] = array('value' => 'left', 'label' => Mage::helper('feedbackcompany')->__('Left'));
|
31 |
+
$position[] = array('value' => 'right', 'label' => Mage::helper('feedbackcompany')->__('Right'));
|
32 |
|
33 |
+
return $position;
|
34 |
+
}
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
}
|
app/code/community/Magmodules/Feedbackcompany/Model/System/Config/Source/Reviewlink.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,20 +11,24 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
class Magmodules_Feedbackcompany_Model_System_Config_Source_Reviewlink
|
23 |
{
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
|
|
|
|
|
|
|
|
31 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
+
|
21 |
class Magmodules_Feedbackcompany_Model_System_Config_Source_Reviewlink
|
22 |
{
|
23 |
+
/**
|
24 |
+
* @return array
|
25 |
+
*/
|
26 |
+
public function toOptionArray()
|
27 |
+
{
|
28 |
+
$reviewlink = array();
|
29 |
+
$reviewlink[] = array('value' => '1', 'label' => Mage::helper('feedbackcompany')->__('Product Review Page'));
|
30 |
+
$reviewlink[] = array('value' => '2', 'label' => Mage::helper('feedbackcompany')->__('Product Page'));
|
31 |
+
|
32 |
+
return $reviewlink;
|
33 |
+
}
|
34 |
}
|
app/code/community/Magmodules/Feedbackcompany/Model/System/Config/Source/Reviewrating.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,23 +11,30 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
|
22 |
-
class Magmodules_Feedbackcompany_Model_System_Config_Source_Reviewrating
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
$rating_options = array();
|
27 |
-
$ratings = Mage::getModel('rating/rating')->getResourceCollection()->addEntityFilter(Mage::registry('entityId'));
|
28 |
-
foreach($ratings as $rating) {
|
29 |
-
$rating_options[] = array('value'=> $rating->getRatingId(), 'label' => $rating->getRatingCode());
|
30 |
-
}
|
31 |
-
return $rating_options;
|
32 |
-
}
|
33 |
|
34 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
|
21 |
+
class Magmodules_Feedbackcompany_Model_System_Config_Source_Reviewrating
|
22 |
+
{
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @return array
|
26 |
+
*/
|
27 |
+
public function toOptionArray()
|
28 |
+
{
|
29 |
+
$ratingOptions = array();
|
30 |
+
$ratings = Mage::getModel('rating/rating')
|
31 |
+
->getResourceCollection()
|
32 |
+
->addEntityFilter(Mage::registry('entityId'));
|
33 |
+
foreach ($ratings as $rating) {
|
34 |
+
$ratingOptions[] = array('value' => $rating->getRatingId(), 'label' => $rating->getRatingCode());
|
35 |
+
}
|
36 |
|
37 |
+
return $ratingOptions;
|
38 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
|
40 |
}
|
app/code/community/Magmodules/Feedbackcompany/Model/System/Config/Source/Reviewstatus.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,22 +11,27 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
|
22 |
-
class Magmodules_Feedbackcompany_Model_System_Config_Source_Reviewstatus
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
$status = array();
|
27 |
-
$status[] = array('value'=>'1', 'label' => Mage::helper('feedbackcompany')->__('Approved'));
|
28 |
-
$status[] = array('value'=>'2', 'label' => Mage::helper('feedbackcompany')->__('Pending'));
|
29 |
-
$status[] = array('value'=>'3', 'label' => Mage::helper('feedbackcompany')->__('Not Approved'));
|
30 |
-
return $status;
|
31 |
-
}
|
32 |
|
33 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
|
21 |
+
class Magmodules_Feedbackcompany_Model_System_Config_Source_Reviewstatus
|
22 |
+
{
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @return array
|
26 |
+
*/
|
27 |
+
public function toOptionArray()
|
28 |
+
{
|
29 |
+
$status = array();
|
30 |
+
$status[] = array('value' => '1', 'label' => Mage::helper('feedbackcompany')->__('Approved'));
|
31 |
+
$status[] = array('value' => '2', 'label' => Mage::helper('feedbackcompany')->__('Pending'));
|
32 |
+
$status[] = array('value' => '3', 'label' => Mage::helper('feedbackcompany')->__('Not Approved'));
|
33 |
|
34 |
+
return $status;
|
35 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
|
37 |
}
|
app/code/community/Magmodules/Feedbackcompany/Model/System/Config/Source/Sidebarlink.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,22 +11,26 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
|
22 |
-
class Magmodules_Feedbackcompany_Model_System_Config_Source_Sidebarlink
|
|
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
|
|
|
|
|
|
32 |
|
33 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
|
21 |
+
class Magmodules_Feedbackcompany_Model_System_Config_Source_Sidebarlink
|
22 |
+
{
|
23 |
|
24 |
+
/**
|
25 |
+
* @return array
|
26 |
+
*/
|
27 |
+
public function toOptionArray()
|
28 |
+
{
|
29 |
+
return array(
|
30 |
+
'' => Mage::helper('feedbackcompany')->__('None'),
|
31 |
+
'external' => Mage::helper('feedbackcompany')->__('External (Feedbackcompany.nl)'),
|
32 |
+
'internal' => Mage::helper('feedbackcompany')->__('Internal (/feedbackcompany)'),
|
33 |
+
);
|
34 |
+
}
|
35 |
|
36 |
}
|
app/code/community/Magmodules/Feedbackcompany/controllers/Adminhtml/FeedbacklogController.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
-
<?php
|
|
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,59 +12,83 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
public function indexAction()
|
31 |
-
{
|
32 |
-
$this->_initAction()->renderLayout();
|
33 |
-
}
|
34 |
|
35 |
-
|
36 |
-
|
37 |
-
$LogIds = $this->getRequest()->getParam('logids');
|
38 |
-
if(!is_array($LogIds)) {
|
39 |
-
Mage::getSingleton('adminhtml/session')->addError(Mage::helper('feedbackcompany')->__('Please select item(s)'));
|
40 |
-
} else {
|
41 |
-
try {
|
42 |
-
foreach ($LogIds as $id) {
|
43 |
-
$log = Mage::getModel('feedbackcompany/log')->load($id)->delete();
|
44 |
-
}
|
45 |
-
Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('feedbackcompany')->__('Total of %d log record(s) deleted.', count($LogIds)));
|
46 |
-
} catch (Exception $e) {
|
47 |
-
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
48 |
-
}
|
49 |
-
}
|
50 |
-
$this->_redirect('*/*/index');
|
51 |
-
}
|
52 |
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
|
|
|
|
|
|
65 |
|
66 |
-
|
67 |
-
|
|
|
|
|
|
|
68 |
return Mage::getSingleton('admin/session')->isAllowed('shopreview/feedbackcompany/feedbackcompany_log');
|
69 |
}
|
70 |
|
1 |
+
<?php
|
2 |
+
|
3 |
/**
|
4 |
* Magmodules.eu - http://www.magmodules.eu
|
5 |
*
|
6 |
* NOTICE OF LICENSE
|
|
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
+
* @category Magmodules
|
16 |
+
* @package Magmodules_Feedbackcompany
|
17 |
+
* @author Magmodules <info@magmodules.eu>
|
18 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
+
class Magmodules_Feedbackcompany_Adminhtml_FeedbacklogController extends Mage_Adminhtml_Controller_Action
|
22 |
+
{
|
23 |
+
|
24 |
+
/**
|
25 |
+
*
|
26 |
+
*/
|
27 |
+
public function indexAction()
|
28 |
+
{
|
29 |
+
$this->_initAction()->renderLayout();
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* @return $this
|
34 |
+
*/
|
35 |
+
protected function _initAction()
|
36 |
+
{
|
37 |
+
$this->loadLayout()
|
38 |
+
->_setActiveMenu('feedbackcompany/feedbackreviews')
|
39 |
+
->_addBreadcrumb(
|
40 |
+
Mage::helper('adminhtml')->__('Items Manager'),
|
41 |
+
Mage::helper('adminhtml')->__('Item Manager')
|
42 |
+
);
|
43 |
+
return $this;
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
*
|
48 |
+
*/
|
49 |
+
public function massDeleteAction()
|
50 |
+
{
|
51 |
+
$logIds = $this->getRequest()->getParam('logids');
|
52 |
+
if (!is_array($logIds)) {
|
53 |
+
$msg = Mage::helper('feedbackcompany')->__('Please select item(s)');
|
54 |
+
Mage::getSingleton('adminhtml/session')->addError($msg);
|
55 |
+
} else {
|
56 |
+
try {
|
57 |
+
foreach ($logIds as $id) {
|
58 |
+
Mage::getModel('feedbackcompany/log')->load($id)->delete();
|
59 |
+
}
|
60 |
|
61 |
+
$msg = Mage::helper('feedbackcompany')->__('Total of %d log record(s) deleted.', count($logIds));
|
62 |
+
Mage::getSingleton('adminhtml/session')->addSuccess($msg);
|
63 |
+
} catch (Exception $e) {
|
64 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
65 |
+
}
|
66 |
+
}
|
|
|
|
|
|
|
|
|
67 |
|
68 |
+
$this->_redirect('*/*/index');
|
69 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
|
71 |
+
/**
|
72 |
+
*
|
73 |
+
*/
|
74 |
+
public function cleanAction()
|
75 |
+
{
|
76 |
+
$logmodel = Mage::getModel('feedbackcompany/log');
|
77 |
+
$logs = $logmodel->getCollection();
|
78 |
+
foreach ($logs as $log) {
|
79 |
+
$logmodel->load($log->getId())->delete();
|
80 |
+
}
|
81 |
+
|
82 |
+
$msg = Mage::helper('feedbackcompany')->__('Total of %s log record(s) deleted.', count($logs));
|
83 |
+
Mage::getSingleton('adminhtml/session')->addSuccess($msg);
|
84 |
+
$this->_redirect('*/*/index');
|
85 |
+
}
|
86 |
|
87 |
+
/**
|
88 |
+
* @return mixed
|
89 |
+
*/
|
90 |
+
protected function _isAllowed()
|
91 |
+
{
|
92 |
return Mage::getSingleton('admin/session')->isAllowed('shopreview/feedbackcompany/feedbackcompany_log');
|
93 |
}
|
94 |
|
app/code/community/Magmodules/Feedbackcompany/controllers/Adminhtml/FeedbackreviewsController.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
-
<?php
|
|
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,224 +12,291 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
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 |
-
|
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 |
-
|
231 |
-
|
232 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
233 |
return Mage::getSingleton('admin/session')->isAllowed('shopreview/feedbackcompany/feedbackcompany_reviews');
|
234 |
}
|
235 |
|
1 |
+
<?php
|
2 |
+
|
3 |
/**
|
4 |
* Magmodules.eu - http://www.magmodules.eu
|
5 |
*
|
6 |
* NOTICE OF LICENSE
|
|
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
+
* @category Magmodules
|
16 |
+
* @package Magmodules_Feedbackcompany
|
17 |
+
* @author Magmodules <info@magmodules.eu>
|
18 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
+
class Magmodules_Feedbackcompany_Adminhtml_FeedbackreviewsController extends Mage_Adminhtml_Controller_Action
|
22 |
+
{
|
23 |
+
|
24 |
+
/**
|
25 |
+
*
|
26 |
+
*/
|
27 |
+
public function indexAction()
|
28 |
+
{
|
29 |
+
$this->_initAction()->renderLayout();
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* @return $this
|
34 |
+
*/
|
35 |
+
protected function _initAction()
|
36 |
+
{
|
37 |
+
$this->loadLayout()
|
38 |
+
->_setActiveMenu('feedbackcompany/feedbackreviews')
|
39 |
+
->_addBreadcrumb(
|
40 |
+
Mage::helper('adminhtml')->__('Items Manager'),
|
41 |
+
Mage::helper('adminhtml')->__('Item Manager')
|
42 |
+
);
|
43 |
+
|
44 |
+
return $this;
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Process action, manual import/update all reviews & stats.
|
49 |
+
*/
|
50 |
+
public function processAction()
|
51 |
+
{
|
52 |
+
$startTime = microtime(true);
|
53 |
+
$storeIds = Mage::getModel('feedbackcompany/api')->getStoreIds();
|
54 |
+
foreach ($storeIds as $clientId => $storeId) {
|
55 |
+
$msg = '';
|
56 |
+
$reviews = Mage::getModel('feedbackcompany/reviews')->runUpdate($storeId, 'full');
|
57 |
+
$stats = Mage::getModel('feedbackcompany/stats')->runUpdate($storeId);
|
58 |
+
if (($reviews['new'] > 0) || ($reviews['update'] > 0) || ($reviews['status'] == 'success')) {
|
59 |
+
$msg = $this->__('%s:', $reviews['company']) . ' ';
|
60 |
+
$msg .= $this->__('%s new review(s)', $reviews['new']) . ', ';
|
61 |
+
$msg .= $this->__('%s review(s) updated', $reviews['update']) . ' ';
|
62 |
+
if ($stats['status'] == 'OK') {
|
63 |
+
$msg .= $this->__('and total score updated.');
|
64 |
+
}
|
65 |
+
}
|
66 |
+
|
67 |
+
Mage::getModel('feedbackcompany/log')->addToLog('reviews', $storeId, $reviews, '', $startTime, '', '');
|
68 |
+
if ($msg) {
|
69 |
+
Mage::getSingleton('adminhtml/session')->addSuccess($msg);
|
70 |
+
} else {
|
71 |
+
if (!empty($reviews['msg'])) {
|
72 |
+
$msg = $this->__('ClientId %s: %s', $clientId, $reviews['msg']);
|
73 |
+
Mage::getSingleton('adminhtml/session')->addError($msg);
|
74 |
+
} elseif (!empty($stats['msg'])) {
|
75 |
+
$msg = $this->__('ClientId %s: %s', $clientId, $stats['msg']);
|
76 |
+
Mage::getSingleton('adminhtml/session')->addError($msg);
|
77 |
+
} else {
|
78 |
+
$msg = $this->__('ClientId %s: no updates found, feed is empty or not found!', $clientId);
|
79 |
+
Mage::getSingleton('adminhtml/session')->addError($msg);
|
80 |
+
}
|
81 |
+
}
|
82 |
+
}
|
83 |
+
|
84 |
+
$this->_redirect('adminhtml/system_config/edit/section/feedbackcompany');
|
85 |
+
}
|
86 |
+
|
87 |
+
/**
|
88 |
+
*
|
89 |
+
*/
|
90 |
+
public function productreviewsAction()
|
91 |
+
{
|
92 |
+
$errors = array();
|
93 |
+
$qty = 0;
|
94 |
+
$startTime = microtime(true);
|
95 |
+
$storeIds = Mage::getModel('feedbackcompany/api')->getStoreIds();
|
96 |
+
foreach ($storeIds as $clientId => $storeId) {
|
97 |
+
$reviews = Mage::getModel('feedbackcompany/productreviews')->runUpdate($storeId, 'full');
|
98 |
+
if (isset($reviews['new']) && $reviews['new'] > 0) {
|
99 |
+
$qty += $reviews['new'];
|
100 |
+
$log = Mage::getModel('feedbackcompany/log');
|
101 |
+
$log->addToLog('productreviews', $storeId, $reviews, '', $startTime, '');
|
102 |
+
} else {
|
103 |
+
if (isset($reviews['error'])) {
|
104 |
+
$errors[$clientId] = $reviews['error'];
|
105 |
+
}
|
106 |
+
}
|
107 |
+
}
|
108 |
+
|
109 |
+
if (!empty($errors)) {
|
110 |
+
foreach ($errors as $key => $value) {
|
111 |
+
$msg = $this->__('API Response for client ID: %s => %s', $key, $value);
|
112 |
+
Mage::getSingleton('adminhtml/session')->addError($msg);
|
113 |
+
}
|
114 |
+
} else {
|
115 |
+
if ($qty > 0) {
|
116 |
+
$msg = $this->__('Imported %d new productreview(s).', $qty);
|
117 |
+
Mage::getSingleton('adminhtml/session')->addSuccess($msg);
|
118 |
+
} else {
|
119 |
+
$msg = $this->__('No new reviews found.', $qty);
|
120 |
+
Mage::getSingleton('adminhtml/session')->addSuccess($msg);
|
121 |
+
}
|
122 |
+
}
|
123 |
+
|
124 |
+
$this->_redirect('adminhtml/system_config/edit/section/feedbackcompany');
|
125 |
+
}
|
126 |
+
|
127 |
+
/**
|
128 |
+
*
|
129 |
+
*/
|
130 |
+
public function massDisableAction()
|
131 |
+
{
|
132 |
+
$reviewIds = $this->getRequest()->getParam('reviewids');
|
133 |
+
if (!is_array($reviewIds)) {
|
134 |
+
$msg = Mage::helper('feedbackcompany')->__('Please select item(s)');
|
135 |
+
Mage::getSingleton('adminhtml/session')->addError($msg);
|
136 |
+
} else {
|
137 |
+
try {
|
138 |
+
foreach ($reviewIds as $reviewId) {
|
139 |
+
$reviews = Mage::getModel('feedbackcompany/reviews')->load($reviewId);
|
140 |
+
$reviews->setStatus(0)->save();
|
141 |
+
}
|
142 |
+
|
143 |
+
Mage::getSingleton('adminhtml/session')->addSuccess(
|
144 |
+
Mage::helper('feedbackcompany')->__('Total of %d review(s) were disabled.', count($reviewIds))
|
145 |
+
);
|
146 |
+
} catch (Exception $e) {
|
147 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
148 |
+
}
|
149 |
+
}
|
150 |
+
|
151 |
+
Mage::getModel('feedbackcompany/reviews')->flushCache();
|
152 |
+
$this->_redirect('*/*/index');
|
153 |
+
}
|
154 |
+
|
155 |
+
/**
|
156 |
+
*
|
157 |
+
*/
|
158 |
+
public function massEnableAction()
|
159 |
+
{
|
160 |
+
$reviewIds = $this->getRequest()->getParam('reviewids');
|
161 |
+
if (!is_array($reviewIds)) {
|
162 |
+
$msg = Mage::helper('feedbackcompany')->__('Please select item(s)');
|
163 |
+
Mage::getSingleton('adminhtml/session')->addError($msg);
|
164 |
+
} else {
|
165 |
+
try {
|
166 |
+
foreach ($reviewIds as $reviewId) {
|
167 |
+
$reviews = Mage::getModel('feedbackcompany/reviews')->load($reviewId);
|
168 |
+
$reviews->setStatus(1)->save();
|
169 |
+
}
|
170 |
+
|
171 |
+
$msg = $this->__('Total of %d review(s) were enabled.', count($reviewIds));
|
172 |
+
Mage::getSingleton('adminhtml/session')->addSuccess($msg);
|
173 |
+
} catch (Exception $e) {
|
174 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
175 |
+
}
|
176 |
+
}
|
177 |
+
|
178 |
+
Mage::getModel('feedbackcompany/reviews')->flushCache();
|
179 |
+
$this->_redirect('*/*/index');
|
180 |
+
}
|
181 |
+
|
182 |
+
/**
|
183 |
+
*
|
184 |
+
*/
|
185 |
+
public function massEnableSidebarAction()
|
186 |
+
{
|
187 |
+
$reviewIds = $this->getRequest()->getParam('reviewids');
|
188 |
+
if (!is_array($reviewIds)) {
|
189 |
+
$msg = Mage::helper('feedbackcompany')->__('Please select item(s)');
|
190 |
+
Mage::getSingleton('adminhtml/session')->addError($msg);
|
191 |
+
} else {
|
192 |
+
try {
|
193 |
+
foreach ($reviewIds as $reviewId) {
|
194 |
+
$reviews = Mage::getModel('feedbackcompany/reviews')->load($reviewId);
|
195 |
+
$reviews->setSidebar(1)->save();
|
196 |
+
}
|
197 |
+
|
198 |
+
$msg = $this->__('Total of %d review(s) were added to the sidebar.', count($reviewIds));
|
199 |
+
Mage::getSingleton('adminhtml/session')->addSuccess($msg);
|
200 |
+
} catch (Exception $e) {
|
201 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
202 |
+
}
|
203 |
+
}
|
204 |
+
|
205 |
+
Mage::getModel('feedbackcompany/reviews')->flushCache();
|
206 |
+
$this->_redirect('*/*/index');
|
207 |
+
}
|
208 |
+
|
209 |
+
/**
|
210 |
+
*
|
211 |
+
*/
|
212 |
+
public function massDisableSidebarAction()
|
213 |
+
{
|
214 |
+
$reviewIds = $this->getRequest()->getParam('reviewids');
|
215 |
+
if (!is_array($reviewIds)) {
|
216 |
+
Mage::getSingleton('adminhtml/session')->addError($this->__('Please select item(s)'));
|
217 |
+
} else {
|
218 |
+
try {
|
219 |
+
foreach ($reviewIds as $reviewId) {
|
220 |
+
$reviews = Mage::getModel('feedbackcompany/reviews')->load($reviewId);
|
221 |
+
$reviews->setSidebar(0)->save();
|
222 |
+
}
|
223 |
+
|
224 |
+
$msg = $this->__('Total of %d review(s) were removed from the sidebar.', count($reviewIds));
|
225 |
+
Mage::getSingleton('adminhtml/session')->addSuccess($msg);
|
226 |
+
} catch (Exception $e) {
|
227 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
228 |
+
}
|
229 |
+
}
|
230 |
+
|
231 |
+
Mage::getModel('feedbackcompany/reviews')->flushCache();
|
232 |
+
$this->_redirect('*/*/index');
|
233 |
+
}
|
234 |
+
|
235 |
+
/**
|
236 |
+
*
|
237 |
+
*/
|
238 |
+
public function truncateAction()
|
239 |
+
{
|
240 |
+
$i = 0;
|
241 |
+
$collection = Mage::getModel('feedbackcompany/reviews')->getCollection();
|
242 |
+
foreach ($collection as $item) {
|
243 |
+
$item->delete();
|
244 |
+
$i++;
|
245 |
+
}
|
246 |
+
|
247 |
+
$msg = $this->__('Succefully deleted all %s saved review(s).', $i);
|
248 |
+
|
249 |
+
Mage::getSingleton('adminhtml/session')->addSuccess($msg);
|
250 |
+
Mage::getModel('feedbackcompany/reviews')->flushCache();
|
251 |
+
$this->_redirect('*/*/index');
|
252 |
+
}
|
253 |
+
|
254 |
+
/**
|
255 |
+
*
|
256 |
+
*/
|
257 |
+
public function exportCsvAction()
|
258 |
+
{
|
259 |
+
$reviews = $this->getRequest()->getPost('reviews', array());
|
260 |
+
$filter = $this->getRequest()->getParam('filter');
|
261 |
+
$storeId = '';
|
262 |
+
if ($filter) {
|
263 |
+
parse_str(urldecode(base64_decode($filter)), $params);
|
264 |
+
if (!empty($params['visible_in'])) {
|
265 |
+
$storeId = $params['visible_in'];
|
266 |
+
}
|
267 |
+
}
|
268 |
+
|
269 |
+
if (empty($storeId) && (!Mage::app()->isSingleStoreMode())) {
|
270 |
+
$msg = $this->__('Please select specific storeview in the grid before exporting the reviews.');
|
271 |
+
Mage::getSingleton('adminhtml/session')->addError($msg);
|
272 |
+
$this->_redirect('adminhtml/catalog_product_review');
|
273 |
+
} else {
|
274 |
+
$store = Mage::getModel('core/store')->load($storeId);
|
275 |
+
if ($csvData = Mage::getModel('feedbackcompany/export')->getFeed($reviews, $storeId)) {
|
276 |
+
$fileName = 'product-reviews-' . strtolower($store->getName()) . '.csv';
|
277 |
+
$path = Mage::getBaseDir('var') . DS . 'export';
|
278 |
+
if (!is_dir($path)) {
|
279 |
+
mkdir($path);
|
280 |
+
}
|
281 |
+
|
282 |
+
$file = $path . DS . $fileName;
|
283 |
+
$csv = new Varien_File_Csv();
|
284 |
+
$csv->saveData($file, $csvData);
|
285 |
+
$this->_prepareDownloadResponse($fileName, array('type' => 'filename', 'value' => $file));
|
286 |
+
} else {
|
287 |
+
$msg = $this->__('Error, could not export the csv file.');
|
288 |
+
|
289 |
+
Mage::getSingleton('adminhtml/session')->addError($msg);
|
290 |
+
$this->_redirect('adminhtml/catalog_product_review');
|
291 |
+
}
|
292 |
+
}
|
293 |
+
}
|
294 |
+
|
295 |
+
/**
|
296 |
+
* @return mixed
|
297 |
+
*/
|
298 |
+
protected function _isAllowed()
|
299 |
+
{
|
300 |
return Mage::getSingleton('admin/session')->isAllowed('shopreview/feedbackcompany/feedbackcompany_reviews');
|
301 |
}
|
302 |
|
app/code/community/Magmodules/Feedbackcompany/controllers/IndexController.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
-
<?php
|
|
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,35 +12,38 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
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 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
/**
|
4 |
* Magmodules.eu - http://www.magmodules.eu
|
5 |
*
|
6 |
* NOTICE OF LICENSE
|
|
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
+
* @category Magmodules
|
16 |
+
* @package Magmodules_Feedbackcompany
|
17 |
+
* @author Magmodules <info@magmodules.eu>
|
18 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
*/
|
21 |
+
class Magmodules_Feedbackcompany_IndexController extends Mage_Core_Controller_Front_Action
|
22 |
+
{
|
23 |
|
24 |
+
/**
|
25 |
+
*
|
26 |
+
*/
|
27 |
+
public function indexAction()
|
28 |
+
{
|
29 |
+
$enabled = Mage::getStoreConfig('feedbackcompany/general/enabled');
|
30 |
+
$overview = Mage::getStoreConfig('feedbackcompany/overview/enabled');
|
31 |
+
if ($enabled && $overview) {
|
32 |
+
$this->loadLayout();
|
33 |
+
$head = $this->getLayout()->getBlock('head');
|
34 |
+
if ($title = Mage::getStoreConfig('feedbackcompany/overview/meta_title')):
|
35 |
+
$head->setTitle($title);
|
36 |
+
endif;
|
37 |
+
if ($description = Mage::getStoreConfig('feedbackcompany/overview/meta_description')):
|
38 |
+
$head->setDescription($description);
|
39 |
+
endif;
|
40 |
+
if ($keywords = Mage::getStoreConfig('feedbackcompany/overview/meta_keywords')):
|
41 |
+
$head->setKeywords($keywords);
|
42 |
+
endif;
|
43 |
+
$this->renderLayout();
|
44 |
+
} else {
|
45 |
+
$this->_redirect('/');
|
46 |
+
}
|
47 |
+
}
|
48 |
|
49 |
}
|
app/code/community/Magmodules/Feedbackcompany/data/feedbackcompany_setup/data-upgrade-1.4.1-1.4.2.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,24 +11,26 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
$installer = $this;
|
23 |
-
if(Mage::getModel('admin/block')) {
|
24 |
$connection = $installer->getConnection();
|
25 |
$table = $installer->getTable('admin/permission_block');
|
26 |
$blockNames = array(
|
27 |
'feedbackcompany/custom',
|
28 |
);
|
29 |
foreach ($blockNames as $blockName) {
|
30 |
-
$connection->insertOnDuplicate(
|
31 |
-
|
32 |
-
|
33 |
-
|
|
|
|
|
34 |
}
|
35 |
}
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
+
|
21 |
$installer = $this;
|
22 |
+
if (Mage::getModel('admin/block')) {
|
23 |
$connection = $installer->getConnection();
|
24 |
$table = $installer->getTable('admin/permission_block');
|
25 |
$blockNames = array(
|
26 |
'feedbackcompany/custom',
|
27 |
);
|
28 |
foreach ($blockNames as $blockName) {
|
29 |
+
$connection->insertOnDuplicate(
|
30 |
+
$table, array(
|
31 |
+
'block_name' => $blockName,
|
32 |
+
'is_allowed' => 1,
|
33 |
+
)
|
34 |
+
);
|
35 |
}
|
36 |
}
|
app/code/community/Magmodules/Feedbackcompany/etc/adminhtml.xml
CHANGED
@@ -1,98 +1,94 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
-
<!--
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
* @copyright Copyright (c) 2016 (http://www.magmodules.eu)
|
21 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
22 |
-
*/
|
23 |
-
-->
|
24 |
<config>
|
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 |
</config>
|
1 |
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
~ Magmodules.eu - http://www.magmodules.eu
|
4 |
+
~
|
5 |
+
~ NOTICE OF LICENSE
|
6 |
+
~ This source file is subject to the Open Software License (OSL 3.0)
|
7 |
+
~ that is bundled with this package in the file LICENSE.txt.
|
8 |
+
~ It is also available through the world-wide-web at this URL:
|
9 |
+
~ http://opensource.org/licenses/osl-3.0.php
|
10 |
+
~ If you did not receive a copy of the license and are unable to
|
11 |
+
~ obtain it through the world-wide-web, please send an email
|
12 |
+
~ to info@magmodules.eu so we can send you a copy immediately.
|
13 |
+
~
|
14 |
+
~ @category Magmodules
|
15 |
+
~ @package Magmodules_Feedbackcompany
|
16 |
+
~ @author Magmodules <info@magmodules.eu>
|
17 |
+
~ @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
~ @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
-->
|
|
|
|
|
|
|
|
|
20 |
<config>
|
21 |
+
<menu>
|
22 |
+
<shopreview module="feedbackcompany">
|
23 |
+
<title>Reviews</title>
|
24 |
+
<sort_order>71</sort_order>
|
25 |
+
<children>
|
26 |
+
<feedbackcompany module="feedbackcompany">
|
27 |
+
<title>The Feedback Company</title>
|
28 |
+
<sort_order>11</sort_order>
|
29 |
+
<children>
|
30 |
+
<feedbackcompany_reviews module="feedbackcompany">
|
31 |
+
<title>Manage Reviews</title>
|
32 |
+
<sort_order>100</sort_order>
|
33 |
+
<action>adminhtml/feedbackreviews/</action>
|
34 |
+
</feedbackcompany_reviews>
|
35 |
+
<feedbackcompany_log module="feedbackcompany">
|
36 |
+
<title>Manage Log</title>
|
37 |
+
<sort_order>110</sort_order>
|
38 |
+
<action>adminhtml/feedbacklog/</action>
|
39 |
+
</feedbackcompany_log>
|
40 |
+
<feedbackcompany_config module="feedbackcompany">
|
41 |
+
<title>Config</title>
|
42 |
+
<sort_order>120</sort_order>
|
43 |
+
<action>adminhtml/system_config/edit/section/feedbackcompany</action>
|
44 |
+
</feedbackcompany_config>
|
45 |
+
</children>
|
46 |
+
</feedbackcompany>
|
47 |
+
</children>
|
48 |
+
</shopreview>
|
49 |
+
</menu>
|
50 |
+
<acl>
|
51 |
+
<resources>
|
52 |
+
<all>
|
53 |
+
<title>Allow Everything</title>
|
54 |
+
</all>
|
55 |
+
<admin>
|
56 |
+
<children>
|
57 |
+
<system>
|
58 |
+
<children>
|
59 |
+
<config>
|
60 |
+
<children>
|
61 |
+
<feedbackcompany translate="title" module="feedbackcompany">
|
62 |
+
<title>The Feedback Company</title>
|
63 |
+
</feedbackcompany>
|
64 |
+
</children>
|
65 |
+
</config>
|
66 |
+
</children>
|
67 |
+
</system>
|
68 |
+
<shopreview module="feedbackcompany">
|
69 |
+
<title>Reviews</title>
|
70 |
+
<sort_order>71</sort_order>
|
71 |
+
<children>
|
72 |
+
<feedbackcompany module="feedbackcompany">
|
73 |
+
<title>The Feedback Company</title>
|
74 |
+
<sort_order>60</sort_order>
|
75 |
+
<children>
|
76 |
+
<feedbackcompany_reviews module="feedbackcompany">
|
77 |
+
<title>Reviews</title>
|
78 |
+
<sort_order>100</sort_order>
|
79 |
+
<action>adminhtml/feedbackreviews/</action>
|
80 |
+
</feedbackcompany_reviews>
|
81 |
+
<feedbackcompany_log module="feedbackcompany">
|
82 |
+
<title>Log</title>
|
83 |
+
<sort_order>110</sort_order>
|
84 |
+
<action>adminhtml/feedbacklog/</action>
|
85 |
+
</feedbackcompany_log>
|
86 |
+
</children>
|
87 |
+
</feedbackcompany>
|
88 |
+
</children>
|
89 |
+
</shopreview>
|
90 |
+
</children>
|
91 |
+
</admin>
|
92 |
+
</resources>
|
93 |
+
</acl>
|
94 |
</config>
|
app/code/community/Magmodules/Feedbackcompany/etc/config.xml
CHANGED
@@ -1,153 +1,150 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
-
<!--
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
-
*/
|
22 |
-
-->
|
23 |
<config>
|
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 |
-
<review_resource>
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
<class>Mage_Sales_Model_Mysql4_Setup</class>
|
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 |
<events>
|
152 |
<core_block_abstract_prepare_layout_before>
|
153 |
<observers>
|
@@ -158,108 +155,128 @@
|
|
158 |
</observers>
|
159 |
</core_block_abstract_prepare_layout_before>
|
160 |
</events>
|
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 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
265 |
</config>
|
1 |
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
~ Magmodules.eu - http://www.magmodules.eu
|
4 |
+
~
|
5 |
+
~ NOTICE OF LICENSE
|
6 |
+
~ This source file is subject to the Open Software License (OSL 3.0)
|
7 |
+
~ that is bundled with this package in the file LICENSE.txt.
|
8 |
+
~ It is also available through the world-wide-web at this URL:
|
9 |
+
~ http://opensource.org/licenses/osl-3.0.php
|
10 |
+
~ If you did not receive a copy of the license and are unable to
|
11 |
+
~ obtain it through the world-wide-web, please send an email
|
12 |
+
~ to info@magmodules.eu so we can send you a copy immediately.
|
13 |
+
~
|
14 |
+
~ @category Magmodules
|
15 |
+
~ @package Magmodules_Feedbackcompany
|
16 |
+
~ @author Magmodules <info@magmodules.eu>
|
17 |
+
~ @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
~ @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
-->
|
|
|
|
|
|
|
20 |
<config>
|
21 |
+
<modules>
|
22 |
+
<Magmodules_Feedbackcompany>
|
23 |
+
<version>1.5.0</version>
|
24 |
+
</Magmodules_Feedbackcompany>
|
25 |
+
</modules>
|
26 |
+
<global>
|
27 |
+
<models>
|
28 |
+
<feedbackcompany>
|
29 |
+
<class>Magmodules_Feedbackcompany_Model</class>
|
30 |
+
<resourceModel>feedbackcompany_mysql4</resourceModel>
|
31 |
+
</feedbackcompany>
|
32 |
+
<feedbackcompany_mysql4>
|
33 |
+
<class>Magmodules_Feedbackcompany_Model_Mysql4</class>
|
34 |
+
<entities>
|
35 |
+
<reviews>
|
36 |
+
<table>feedbackcompany_reviews</table>
|
37 |
+
</reviews>
|
38 |
+
<stats>
|
39 |
+
<table>feedbackcompany_stats</table>
|
40 |
+
</stats>
|
41 |
+
<log>
|
42 |
+
<table>feedbackcompany_log</table>
|
43 |
+
</log>
|
44 |
+
</entities>
|
45 |
+
</feedbackcompany_mysql4>
|
46 |
+
<review_resource>
|
47 |
+
<rewrite>
|
48 |
+
<review>Magmodules_Feedbackcompany_Model_Resource_Review</review>
|
49 |
+
</rewrite>
|
50 |
+
</review_resource>
|
51 |
+
</models>
|
52 |
+
<resources>
|
53 |
+
<feedbackcompany_setup>
|
54 |
+
<setup>
|
55 |
+
<module>Magmodules_Feedbackcompany</module>
|
56 |
<class>Mage_Sales_Model_Mysql4_Setup</class>
|
57 |
+
</setup>
|
58 |
+
<connection>
|
59 |
+
<use>core_setup</use>
|
60 |
+
</connection>
|
61 |
+
</feedbackcompany_setup>
|
62 |
+
<feedbackcompany_write>
|
63 |
+
<connection>
|
64 |
+
<use>core_write</use>
|
65 |
+
</connection>
|
66 |
+
</feedbackcompany_write>
|
67 |
+
<feedbackcompany_read>
|
68 |
+
<connection>
|
69 |
+
<use>core_read</use>
|
70 |
+
</connection>
|
71 |
+
</feedbackcompany_read>
|
72 |
+
</resources>
|
73 |
+
<helpers>
|
74 |
+
<feedbackcompany>
|
75 |
+
<class>Magmodules_Feedbackcompany_Helper</class>
|
76 |
+
</feedbackcompany>
|
77 |
+
</helpers>
|
78 |
+
<blocks>
|
79 |
+
<feedbackcompany>
|
80 |
+
<class>Magmodules_Feedbackcompany_Block</class>
|
81 |
+
</feedbackcompany>
|
82 |
+
</blocks>
|
83 |
+
<events>
|
84 |
+
<sales_order_shipment_save_after>
|
85 |
+
<observers>
|
86 |
+
<feedbackcompany>
|
87 |
+
<type>singleton</type>
|
88 |
+
<class>feedbackcompany/observer</class>
|
89 |
+
<method>processFeedbackInvitationcallAfterShipment</method>
|
90 |
+
</feedbackcompany>
|
91 |
+
</observers>
|
92 |
+
</sales_order_shipment_save_after>
|
93 |
+
<sales_order_save_commit_after>
|
94 |
+
<observers>
|
95 |
+
<feedbackcompany>
|
96 |
+
<type>singleton</type>
|
97 |
+
<class>feedbackcompany/observer</class>
|
98 |
+
<method>processFeedbackInvitationcall</method>
|
99 |
+
</feedbackcompany>
|
100 |
+
</observers>
|
101 |
+
</sales_order_save_commit_after>
|
102 |
+
</events>
|
103 |
+
</global>
|
104 |
+
<frontend>
|
105 |
+
<routers>
|
106 |
+
<feedbackcompany>
|
107 |
+
<use>standard</use>
|
108 |
+
<args>
|
109 |
+
<module>Magmodules_Feedbackcompany</module>
|
110 |
+
<frontName>feedbackcompany</frontName>
|
111 |
+
</args>
|
112 |
+
</feedbackcompany>
|
113 |
+
</routers>
|
114 |
+
<layout>
|
115 |
+
<updates>
|
116 |
+
<feedbackcompany>
|
117 |
+
<file>magmodules_feedbackcompany.xml</file>
|
118 |
+
</feedbackcompany>
|
119 |
+
</updates>
|
120 |
+
</layout>
|
121 |
+
<translate>
|
122 |
+
<modules>
|
123 |
+
<magmodules_feedbackcompany>
|
124 |
+
<files>
|
125 |
+
<default>Magmodules_Feedbackcompany.csv</default>
|
126 |
+
</files>
|
127 |
+
</magmodules_feedbackcompany>
|
128 |
+
</modules>
|
129 |
+
</translate>
|
130 |
+
</frontend>
|
131 |
+
<adminhtml>
|
132 |
+
<layout>
|
133 |
+
<updates>
|
134 |
+
<magmodules_feedbackcompany>
|
135 |
+
<file>magmodules_feedbackcompany.xml</file>
|
136 |
+
</magmodules_feedbackcompany>
|
137 |
+
</updates>
|
138 |
+
</layout>
|
139 |
+
<translate>
|
140 |
+
<modules>
|
141 |
+
<magmodules_feedbackcompany>
|
142 |
+
<files>
|
143 |
+
<default>Magmodules_Feedbackcompany.csv</default>
|
144 |
+
</files>
|
145 |
+
</magmodules_feedbackcompany>
|
146 |
+
</modules>
|
147 |
+
</translate>
|
148 |
<events>
|
149 |
<core_block_abstract_prepare_layout_before>
|
150 |
<observers>
|
155 |
</observers>
|
156 |
</core_block_abstract_prepare_layout_before>
|
157 |
</events>
|
158 |
+
</adminhtml>
|
159 |
+
<admin>
|
160 |
+
<routers>
|
161 |
+
<adminhtml>
|
162 |
+
<args>
|
163 |
+
<modules>
|
164 |
+
<magmodules_feedbackcompany after="Mage_Adminhtml">Magmodules_Feedbackcompany_Adminhtml</magmodules_feedbackcompany>
|
165 |
+
</modules>
|
166 |
+
</args>
|
167 |
+
</adminhtml>
|
168 |
+
</routers>
|
169 |
+
</admin>
|
170 |
+
<crontab>
|
171 |
+
<jobs>
|
172 |
+
<magmodules_feedbackcompany_stats>
|
173 |
+
<schedule>
|
174 |
+
<config_path>feedbackcompany/reviews/cron_stats</config_path>
|
175 |
+
</schedule>
|
176 |
+
<run>
|
177 |
+
<model>feedbackcompany/observer::processStats</model>
|
178 |
+
</run>
|
179 |
+
</magmodules_feedbackcompany_stats>
|
180 |
+
<magmodules_feedbackcompany_reviews>
|
181 |
+
<schedule>
|
182 |
+
<config_path>feedbackcompany/reviews/cron_reviews</config_path>
|
183 |
+
</schedule>
|
184 |
+
<run>
|
185 |
+
<model>feedbackcompany/observer::processReviews</model>
|
186 |
+
</run>
|
187 |
+
</magmodules_feedbackcompany_reviews>
|
188 |
+
<magmodules_feedbackcompany_productreviews>
|
189 |
+
<schedule>
|
190 |
+
<config_path>feedbackcompany/productreviews/cron_productreviews</config_path>
|
191 |
+
</schedule>
|
192 |
+
<run>
|
193 |
+
<model>feedbackcompany/observer::processProductreviews</model>
|
194 |
+
</run>
|
195 |
+
</magmodules_feedbackcompany_productreviews>
|
196 |
+
<magmodules_feedbackcompany_reviewhistory>
|
197 |
+
<schedule>
|
198 |
+
<config_path>feedbackcompany/reviews/cron_all</config_path>
|
199 |
+
</schedule>
|
200 |
+
<run>
|
201 |
+
<model>feedbackcompany/observer::processHistory</model>
|
202 |
+
</run>
|
203 |
+
</magmodules_feedbackcompany_reviewhistory>
|
204 |
+
<magmodules_feedbackcompany_cleanlog>
|
205 |
+
<schedule>
|
206 |
+
<cron_expr>0 02 * * *</cron_expr>
|
207 |
+
</schedule>
|
208 |
+
<run>
|
209 |
+
<model>feedbackcompany/observer::cleanLog</model>
|
210 |
+
</run>
|
211 |
+
</magmodules_feedbackcompany_cleanlog>
|
212 |
+
</jobs>
|
213 |
+
</crontab>
|
214 |
+
<default>
|
215 |
+
<feedbackcompany>
|
216 |
+
<general>
|
217 |
+
<enabled>0</enabled>
|
218 |
+
</general>
|
219 |
+
<reviews>
|
220 |
+
<cron>0</cron>
|
221 |
+
<cron_stats>* * * * *</cron_stats>
|
222 |
+
<cron_reviews>0 8,20 * * *</cron_reviews>
|
223 |
+
<cron_all>0 2 1 * *</cron_all>
|
224 |
+
</reviews>
|
225 |
+
<sidebar>
|
226 |
+
<left>0</left>
|
227 |
+
<left_qty>3</left_qty>
|
228 |
+
<left_lenght>150</left_lenght>
|
229 |
+
<left_link>external</left_link>
|
230 |
+
<right>0</right>
|
231 |
+
<right_qty>3</right_qty>
|
232 |
+
<right_lenght>150</right_lenght>
|
233 |
+
<right_link>external</right_link>
|
234 |
+
</sidebar>
|
235 |
+
<block>
|
236 |
+
<sidebar>0</sidebar>
|
237 |
+
<sidebar_qty>3</sidebar_qty>
|
238 |
+
<sidebar_lenght>150</sidebar_lenght>
|
239 |
+
<sidebar_link>external</sidebar_link>
|
240 |
+
<sidebar_snippets>0</sidebar_snippets>
|
241 |
+
<small>0</small>
|
242 |
+
<small_stars>1</small_stars>
|
243 |
+
<small_link>external</small_link>
|
244 |
+
<medium>0</medium>
|
245 |
+
<medium_stars>1</medium_stars>
|
246 |
+
<medium_link>external</medium_link>
|
247 |
+
<medium_lenght>150</medium_lenght>
|
248 |
+
</block>
|
249 |
+
<overview>
|
250 |
+
<enabled>1</enabled>
|
251 |
+
<enable_paging>1</enable_paging>
|
252 |
+
<paging_settings>10,20,30</paging_settings>
|
253 |
+
<meta_title>The Feedback Company Reviews</meta_title>
|
254 |
+
<meta_description>The Feedbackcompany Reviews overview page</meta_description>
|
255 |
+
<meta_keywords>reviews,feedbackcompany</meta_keywords>
|
256 |
+
</overview>
|
257 |
+
<invitation>
|
258 |
+
<enabled>0</enabled>
|
259 |
+
<status>complete</status>
|
260 |
+
<delay>5</delay>
|
261 |
+
<backlog>20</backlog>
|
262 |
+
<remind_delay>0</remind_delay>
|
263 |
+
<resend>1</resend>
|
264 |
+
<productreviews>0</productreviews>
|
265 |
+
<productreviews_text><![CDATA[Write a review about {{name}}]]></productreviews_text>
|
266 |
+
<min_order_total>0</min_order_total>
|
267 |
+
<exclude_category>0</exclude_category>
|
268 |
+
</invitation>
|
269 |
+
<frontend>
|
270 |
+
<enabled>0</enabled>
|
271 |
+
<tooltip>0</tooltip>
|
272 |
+
<sidebar_position>left</sidebar_position>
|
273 |
+
<sidebar_height>120</sidebar_height>
|
274 |
+
</frontend>
|
275 |
+
<log>
|
276 |
+
<enabled>1</enabled>
|
277 |
+
<clean>1</clean>
|
278 |
+
<clean_days>14</clean_days>
|
279 |
+
</log>
|
280 |
+
</feedbackcompany>
|
281 |
+
</default>
|
282 |
</config>
|
app/code/community/Magmodules/Feedbackcompany/etc/system.xml
CHANGED
@@ -1,59 +1,57 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
-
<!--
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
-
*/
|
22 |
-
-->
|
23 |
<config>
|
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 |
<version translate="label">
|
58 |
<label>Extension Version</label>
|
59 |
<frontend_type>text</frontend_type>
|
@@ -63,52 +61,51 @@
|
|
63 |
<show_in_website>0</show_in_website>
|
64 |
<show_in_store>0</show_in_store>
|
65 |
</version>
|
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 |
-
<![CDATA[
|
112 |
<script>
|
113 |
Event.observe(window, 'load', function() {
|
114 |
if ($('feedbackcompany_reviews_lastrun')) {
|
@@ -118,215 +115,244 @@
|
|
118 |
});
|
119 |
</script>
|
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 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
330 |
<sidebar_heading translate="label">
|
331 |
<label>Sidebar Style Block</label>
|
332 |
<frontend_model>feedbackcompany/adminhtml_widget_form_heading</frontend_model>
|
@@ -334,15 +360,16 @@
|
|
334 |
<show_in_default>1</show_in_default>
|
335 |
<show_in_website>1</show_in_website>
|
336 |
<show_in_store>1</show_in_store>
|
337 |
-
</sidebar_heading>
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
|
|
346 |
<sidebar translate="label">
|
347 |
<label>Enabled</label>
|
348 |
<frontend_type>select</frontend_type>
|
@@ -354,24 +381,28 @@
|
|
354 |
</sidebar>
|
355 |
<sidebar_qty translate="label">
|
356 |
<label>Number of Reviews</label>
|
357 |
-
|
358 |
<frontend_type>text</frontend_type>
|
359 |
<sort_order>13</sort_order>
|
360 |
<show_in_default>1</show_in_default>
|
361 |
<show_in_website>1</show_in_website>
|
362 |
<show_in_store>1</show_in_store>
|
363 |
-
|
|
|
|
|
364 |
</sidebar_qty>
|
365 |
-
|
366 |
<label>Length of Reviews</label>
|
367 |
-
|
368 |
<frontend_type>text</frontend_type>
|
369 |
<sort_order>14</sort_order>
|
370 |
<show_in_default>1</show_in_default>
|
371 |
<show_in_website>1</show_in_website>
|
372 |
<show_in_store>1</show_in_store>
|
373 |
-
|
374 |
-
|
|
|
|
|
375 |
<sidebar_link translate="label">
|
376 |
<label>Link to</label>
|
377 |
<frontend_type>select</frontend_type>
|
@@ -380,9 +411,11 @@
|
|
380 |
<show_in_default>1</show_in_default>
|
381 |
<show_in_website>1</show_in_website>
|
382 |
<show_in_store>1</show_in_store>
|
383 |
-
|
384 |
-
|
385 |
-
|
|
|
|
|
386 |
<label>Add Rich Snippets</label>
|
387 |
<frontend_type>select</frontend_type>
|
388 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
@@ -390,8 +423,10 @@
|
|
390 |
<show_in_default>1</show_in_default>
|
391 |
<show_in_website>1</show_in_website>
|
392 |
<show_in_store>1</show_in_store>
|
393 |
-
|
394 |
-
|
|
|
|
|
395 |
<small_heading translate="label">
|
396 |
<label>Small Block</label>
|
397 |
<frontend_model>feedbackcompany/adminhtml_widget_form_heading</frontend_model>
|
@@ -400,14 +435,15 @@
|
|
400 |
<show_in_website>1</show_in_website>
|
401 |
<show_in_store>1</show_in_store>
|
402 |
</small_heading>
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
|
|
411 |
<small translate="label">
|
412 |
<label>Enabled</label>
|
413 |
<frontend_type>select</frontend_type>
|
@@ -417,7 +453,7 @@
|
|
417 |
<show_in_website>1</show_in_website>
|
418 |
<show_in_store>1</show_in_store>
|
419 |
</small>
|
420 |
-
|
421 |
<label>Show stars</label>
|
422 |
<frontend_type>select</frontend_type>
|
423 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
@@ -425,8 +461,10 @@
|
|
425 |
<show_in_default>1</show_in_default>
|
426 |
<show_in_website>1</show_in_website>
|
427 |
<show_in_store>1</show_in_store>
|
428 |
-
|
429 |
-
|
|
|
|
|
430 |
<small_link translate="label">
|
431 |
<label>Link to</label>
|
432 |
<frontend_type>select</frontend_type>
|
@@ -435,9 +473,11 @@
|
|
435 |
<show_in_default>1</show_in_default>
|
436 |
<show_in_website>1</show_in_website>
|
437 |
<show_in_store>1</show_in_store>
|
438 |
-
|
439 |
-
|
440 |
-
|
|
|
|
|
441 |
<label>Add Rich Snippets</label>
|
442 |
<frontend_type>select</frontend_type>
|
443 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
@@ -445,9 +485,11 @@
|
|
445 |
<show_in_default>1</show_in_default>
|
446 |
<show_in_website>1</show_in_website>
|
447 |
<show_in_store>1</show_in_store>
|
448 |
-
|
449 |
-
|
450 |
-
|
|
|
|
|
451 |
<label>Medium Block</label>
|
452 |
<frontend_model>feedbackcompany/adminhtml_widget_form_heading</frontend_model>
|
453 |
<sort_order>40</sort_order>
|
@@ -455,14 +497,15 @@
|
|
455 |
<show_in_website>1</show_in_website>
|
456 |
<show_in_store>1</show_in_store>
|
457 |
</medium_heading>
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
|
|
466 |
<medium translate="label">
|
467 |
<label>Enabled</label>
|
468 |
<frontend_type>select</frontend_type>
|
@@ -471,8 +514,8 @@
|
|
471 |
<show_in_default>1</show_in_default>
|
472 |
<show_in_website>1</show_in_website>
|
473 |
<show_in_store>1</show_in_store>
|
474 |
-
</medium>
|
475 |
-
|
476 |
<label>Show stars</label>
|
477 |
<frontend_type>select</frontend_type>
|
478 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
@@ -480,8 +523,10 @@
|
|
480 |
<show_in_default>1</show_in_default>
|
481 |
<show_in_website>1</show_in_website>
|
482 |
<show_in_store>1</show_in_store>
|
483 |
-
|
484 |
-
|
|
|
|
|
485 |
<medium_link translate="label">
|
486 |
<label>Link to</label>
|
487 |
<frontend_type>select</frontend_type>
|
@@ -490,8 +535,10 @@
|
|
490 |
<show_in_default>1</show_in_default>
|
491 |
<show_in_website>1</show_in_website>
|
492 |
<show_in_store>1</show_in_store>
|
493 |
-
|
494 |
-
|
|
|
|
|
495 |
<medium_review translate="label">
|
496 |
<label>Add latest review</label>
|
497 |
<frontend_type>select</frontend_type>
|
@@ -500,19 +547,23 @@
|
|
500 |
<show_in_default>1</show_in_default>
|
501 |
<show_in_website>1</show_in_website>
|
502 |
<show_in_store>1</show_in_store>
|
503 |
-
|
|
|
|
|
504 |
</medium_review>
|
505 |
-
|
506 |
<label>Length of Reviews</label>
|
507 |
-
|
508 |
<frontend_type>text</frontend_type>
|
509 |
<sort_order>46</sort_order>
|
510 |
<show_in_default>1</show_in_default>
|
511 |
<show_in_website>1</show_in_website>
|
512 |
<show_in_store>1</show_in_store>
|
513 |
-
|
514 |
-
|
515 |
-
|
|
|
|
|
516 |
<label>Add Rich Snippets</label>
|
517 |
<frontend_type>select</frontend_type>
|
518 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
@@ -520,9 +571,11 @@
|
|
520 |
<show_in_default>1</show_in_default>
|
521 |
<show_in_website>1</show_in_website>
|
522 |
<show_in_store>1</show_in_store>
|
523 |
-
|
|
|
|
|
524 |
</medium_snippets>
|
525 |
-
|
526 |
<label>Header Block</label>
|
527 |
<frontend_model>feedbackcompany/adminhtml_widget_form_heading</frontend_model>
|
528 |
<sort_order>50</sort_order>
|
@@ -530,14 +583,15 @@
|
|
530 |
<show_in_website>1</show_in_website>
|
531 |
<show_in_store>1</show_in_store>
|
532 |
</header_heading>
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
|
|
541 |
<header translate="label">
|
542 |
<label>Enabled</label>
|
543 |
<frontend_type>select</frontend_type>
|
@@ -546,7 +600,7 @@
|
|
546 |
<show_in_default>1</show_in_default>
|
547 |
<show_in_website>1</show_in_website>
|
548 |
<show_in_store>1</show_in_store>
|
549 |
-
</header>
|
550 |
<header_link translate="label">
|
551 |
<label>Link to</label>
|
552 |
<frontend_type>select</frontend_type>
|
@@ -555,9 +609,11 @@
|
|
555 |
<show_in_default>1</show_in_default>
|
556 |
<show_in_website>1</show_in_website>
|
557 |
<show_in_store>1</show_in_store>
|
558 |
-
|
559 |
-
|
560 |
-
|
|
|
|
|
561 |
<label>Add Rich Snippets</label>
|
562 |
<frontend_type>select</frontend_type>
|
563 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
@@ -565,197 +621,230 @@
|
|
565 |
<show_in_default>1</show_in_default>
|
566 |
<show_in_website>1</show_in_website>
|
567 |
<show_in_store>1</show_in_store>
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
759 |
<min_order_total translate="label">
|
760 |
<label>Minimum Order Total</label>
|
761 |
<frontend_type>text</frontend_type>
|
@@ -763,39 +852,43 @@
|
|
763 |
<show_in_default>1</show_in_default>
|
764 |
<show_in_website>1</show_in_website>
|
765 |
<show_in_store>1</show_in_store>
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
|
|
777 |
<exclude_categories>
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
|
|
|
|
|
|
799 |
<script>
|
800 |
Event.observe(window, 'load', function() {
|
801 |
if ($('feedbackcompany_productreviews_lastrun')) {
|
@@ -805,157 +898,167 @@
|
|
805 |
});
|
806 |
</script>
|
807 |
]]>
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
961 |
</config>
|
1 |
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
~ Magmodules.eu - http://www.magmodules.eu
|
4 |
+
~
|
5 |
+
~ NOTICE OF LICENSE
|
6 |
+
~ This source file is subject to the Open Software License (OSL 3.0)
|
7 |
+
~ that is bundled with this package in the file LICENSE.txt.
|
8 |
+
~ It is also available through the world-wide-web at this URL:
|
9 |
+
~ http://opensource.org/licenses/osl-3.0.php
|
10 |
+
~ If you did not receive a copy of the license and are unable to
|
11 |
+
~ obtain it through the world-wide-web, please send an email
|
12 |
+
~ to info@magmodules.eu so we can send you a copy immediately.
|
13 |
+
~
|
14 |
+
~ @category Magmodules
|
15 |
+
~ @package Magmodules_Feedbackcompany
|
16 |
+
~ @author Magmodules <info@magmodules.eu>
|
17 |
+
~ @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
~ @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
-->
|
|
|
|
|
|
|
20 |
<config>
|
21 |
+
<tabs>
|
22 |
+
<magmodules translate="label" module="feedbackcompany">
|
23 |
+
<label>Magmodules</label>
|
24 |
+
<sort_order>200</sort_order>
|
25 |
+
</magmodules>
|
26 |
+
</tabs>
|
27 |
+
<sections>
|
28 |
+
<feedbackcompany translate="label" module="feedbackcompany">
|
29 |
+
<label>The Feedback Company</label>
|
30 |
+
<tab>magmodules</tab>
|
31 |
+
<frontend_type>text</frontend_type>
|
32 |
+
<sort_order>120</sort_order>
|
33 |
+
<show_in_default>1</show_in_default>
|
34 |
+
<show_in_website>1</show_in_website>
|
35 |
+
<show_in_store>1</show_in_store>
|
36 |
+
<groups>
|
37 |
+
<info>
|
38 |
+
<frontend_model>feedbackcompany/adminhtml_widget_info_info</frontend_model>
|
39 |
+
<sort_order>1</sort_order>
|
40 |
+
<show_in_default>1</show_in_default>
|
41 |
+
<show_in_website>1</show_in_website>
|
42 |
+
<show_in_store>1</show_in_store>
|
43 |
+
</info>
|
44 |
+
<general translate="label" module="feedbackcompany">
|
45 |
+
<label>General configuration</label>
|
46 |
+
<frontend_type>text</frontend_type>
|
47 |
+
<sort_order>2</sort_order>
|
48 |
+
<show_in_default>1</show_in_default>
|
49 |
+
<show_in_website>1</show_in_website>
|
50 |
+
<show_in_store>1</show_in_store>
|
51 |
+
<expanded>1</expanded>
|
52 |
+
<comment>
|
53 |
+
<![CDATA[You can find the necessary information in your The Feedback Company dashboard.<br/> As addition next to the activation of this extension we also recommend you to place the appropriate The Feedback Company logo.<br/><br/>]]></comment>
|
54 |
+
<fields>
|
55 |
<version translate="label">
|
56 |
<label>Extension Version</label>
|
57 |
<frontend_type>text</frontend_type>
|
61 |
<show_in_website>0</show_in_website>
|
62 |
<show_in_store>0</show_in_store>
|
63 |
</version>
|
64 |
+
<enabled translate="label">
|
65 |
+
<label>Enabled</label>
|
66 |
+
<frontend_type>select</frontend_type>
|
67 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
68 |
+
<sort_order>2</sort_order>
|
69 |
+
<show_in_default>1</show_in_default>
|
70 |
+
<show_in_website>1</show_in_website>
|
71 |
+
<show_in_store>1</show_in_store>
|
72 |
+
</enabled>
|
73 |
+
<heading_api translate="label">
|
74 |
+
<label>API CREDENTIALS</label>
|
75 |
+
<frontend_model>feedbackcompany/adminhtml_widget_form_heading</frontend_model>
|
76 |
+
<sort_order>3</sort_order>
|
77 |
+
<show_in_default>1</show_in_default>
|
78 |
+
<show_in_website>0</show_in_website>
|
79 |
+
<show_in_store>1</show_in_store>
|
80 |
+
</heading_api>
|
81 |
+
<client_id translate="label">
|
82 |
+
<label>Oauth2 Client ID</label>
|
83 |
+
<frontend_type>text</frontend_type>
|
84 |
+
<sort_order>4</sort_order>
|
85 |
+
<show_in_default>1</show_in_default>
|
86 |
+
<show_in_website>1</show_in_website>
|
87 |
+
<show_in_store>1</show_in_store>
|
88 |
+
</client_id>
|
89 |
+
<client_secret translate="label">
|
90 |
+
<label>Oauth2 Client Secret</label>
|
91 |
+
<frontend_type>text</frontend_type>
|
92 |
+
<sort_order>5</sort_order>
|
93 |
+
<show_in_default>1</show_in_default>
|
94 |
+
<show_in_website>1</show_in_website>
|
95 |
+
<show_in_store>1</show_in_store>
|
96 |
+
</client_secret>
|
97 |
+
</fields>
|
98 |
+
</general>
|
99 |
+
<reviews translate="label" module="feedbackcompany">
|
100 |
+
<label>The Feedbackcompany Shop Reviews</label>
|
101 |
+
<frontend_type>text</frontend_type>
|
102 |
+
<sort_order>3</sort_order>
|
103 |
+
<show_in_default>1</show_in_default>
|
104 |
+
<show_in_website>1</show_in_website>
|
105 |
+
<show_in_store>1</show_in_store>
|
106 |
+
<expanded>1</expanded>
|
107 |
+
<comment>
|
108 |
+
<![CDATA[
|
|
|
109 |
<script>
|
110 |
Event.observe(window, 'load', function() {
|
111 |
if ($('feedbackcompany_reviews_lastrun')) {
|
115 |
});
|
116 |
</script>
|
117 |
]]>
|
118 |
+
</comment>
|
119 |
+
<fields>
|
120 |
+
<cron translate="label">
|
121 |
+
<label>Use Cronjob</label>
|
122 |
+
<frontend_type>select</frontend_type>
|
123 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
124 |
+
<sort_order>1</sort_order>
|
125 |
+
<show_in_default>1</show_in_default>
|
126 |
+
<show_in_website>1</show_in_website>
|
127 |
+
<show_in_store>1</show_in_store>
|
128 |
+
<tooltip>Use the Magento Cronjob to use the automatically import. A cronjob is a daemon
|
129 |
+
which keeps running and gets activated at a said interval (time period). Please make
|
130 |
+
sure your default Magento Cron is working. If not, contact your hosting company for
|
131 |
+
help.
|
132 |
+
</tooltip>
|
133 |
+
</cron>
|
134 |
+
<cron_stats translate="label">
|
135 |
+
<label>Update Summary</label>
|
136 |
+
<frontend_type>select</frontend_type>
|
137 |
+
<source_model>feedbackcompany/system_config_source_cronfrequency</source_model>
|
138 |
+
<sort_order>2</sort_order>
|
139 |
+
<show_in_default>1</show_in_default>
|
140 |
+
<show_in_website>0</show_in_website>
|
141 |
+
<show_in_store>0</show_in_store>
|
142 |
+
<depends>
|
143 |
+
<cron>1</cron>
|
144 |
+
</depends>
|
145 |
+
<tooltip>Select the schedule for automatic updating</tooltip>
|
146 |
+
</cron_stats>
|
147 |
+
<cron_reviews translate="label">
|
148 |
+
<label>Update Reviews</label>
|
149 |
+
<frontend_type>select</frontend_type>
|
150 |
+
<source_model>feedbackcompany/system_config_source_cronfrequency</source_model>
|
151 |
+
<sort_order>3</sort_order>
|
152 |
+
<show_in_default>1</show_in_default>
|
153 |
+
<show_in_website>0</show_in_website>
|
154 |
+
<show_in_store>0</show_in_store>
|
155 |
+
<depends>
|
156 |
+
<cron>1</cron>
|
157 |
+
</depends>
|
158 |
+
<tooltip>Select the schedule for automatic updating</tooltip>
|
159 |
+
</cron_reviews>
|
160 |
+
<cron_all translate="label">
|
161 |
+
<label>Update Review History</label>
|
162 |
+
<frontend_type>select</frontend_type>
|
163 |
+
<source_model>feedbackcompany/system_config_source_cronfrequencylong</source_model>
|
164 |
+
<sort_order>4</sort_order>
|
165 |
+
<show_in_default>1</show_in_default>
|
166 |
+
<show_in_website>0</show_in_website>
|
167 |
+
<show_in_store>0</show_in_store>
|
168 |
+
<depends>
|
169 |
+
<cron>1</cron>
|
170 |
+
</depends>
|
171 |
+
<tooltip>Select the schedule for automatic updating</tooltip>
|
172 |
+
</cron_all>
|
173 |
+
<flushcache translate="label">
|
174 |
+
<label>Flush Block Cache after import</label>
|
175 |
+
<frontend_type>select</frontend_type>
|
176 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
177 |
+
<sort_order>5</sort_order>
|
178 |
+
<show_in_default>1</show_in_default>
|
179 |
+
<show_in_website>0</show_in_website>
|
180 |
+
<show_in_store>0</show_in_store>
|
181 |
+
<tooltip>If set to yes, the cms block cache will be flushed after the import of Reviews,
|
182 |
+
Review History and after editing a review from the admin
|
183 |
+
</tooltip>
|
184 |
+
</flushcache>
|
185 |
+
<lastrun translate="label">
|
186 |
+
<label>Last Update</label>
|
187 |
+
<frontend_type>text</frontend_type>
|
188 |
+
<sort_order>100</sort_order>
|
189 |
+
<show_in_default>1</show_in_default>
|
190 |
+
<show_in_website>0</show_in_website>
|
191 |
+
<show_in_store>0</show_in_store>
|
192 |
+
</lastrun>
|
193 |
+
<process translate="label">
|
194 |
+
<label>Process Manually</label>
|
195 |
+
<frontend_type>button</frontend_type>
|
196 |
+
<frontend_model>feedbackcompany/adminhtml_widget_buttons_process</frontend_model>
|
197 |
+
<sort_order>101</sort_order>
|
198 |
+
<show_in_default>1</show_in_default>
|
199 |
+
<show_in_website>0</show_in_website>
|
200 |
+
<show_in_store>0</show_in_store>
|
201 |
+
</process>
|
202 |
+
</fields>
|
203 |
+
</reviews>
|
204 |
+
<sidebar translate="label">
|
205 |
+
<label>The Feedbackcompany Reviews Sidebar</label>
|
206 |
+
<frontend_type>text</frontend_type>
|
207 |
+
<sort_order>4</sort_order>
|
208 |
+
<show_in_default>1</show_in_default>
|
209 |
+
<show_in_website>1</show_in_website>
|
210 |
+
<show_in_store>1</show_in_store>
|
211 |
+
<expanded>1</expanded>
|
212 |
+
<comment>
|
213 |
+
<![CDATA[Show the latest reviews directly in the right or left area of your store to gain trust and directly show your client reviews.<br/><br/>]]></comment>
|
214 |
+
<fields>
|
215 |
+
<left_heading translate="label">
|
216 |
+
<label>Left Sidebar</label>
|
217 |
+
<frontend_model>feedbackcompany/adminhtml_widget_form_heading</frontend_model>
|
218 |
+
<sort_order>50</sort_order>
|
219 |
+
<show_in_default>1</show_in_default>
|
220 |
+
<show_in_website>1</show_in_website>
|
221 |
+
<show_in_store>1</show_in_store>
|
222 |
+
</left_heading>
|
223 |
+
<left translate="label">
|
224 |
+
<label>Enabled</label>
|
225 |
+
<frontend_type>select</frontend_type>
|
226 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
227 |
+
<sort_order>51</sort_order>
|
228 |
+
<show_in_default>1</show_in_default>
|
229 |
+
<show_in_website>1</show_in_website>
|
230 |
+
<show_in_store>1</show_in_store>
|
231 |
+
</left>
|
232 |
+
<left_qty translate="label">
|
233 |
+
<label>Number of Reviews</label>
|
234 |
+
<validate>validate-number</validate>
|
235 |
+
<frontend_type>text</frontend_type>
|
236 |
+
<sort_order>52</sort_order>
|
237 |
+
<show_in_default>1</show_in_default>
|
238 |
+
<show_in_website>1</show_in_website>
|
239 |
+
<show_in_store>1</show_in_store>
|
240 |
+
<depends>
|
241 |
+
<left>1</left>
|
242 |
+
</depends>
|
243 |
+
</left_qty>
|
244 |
+
<left_lenght translate="label">
|
245 |
+
<label>Length of Reviews</label>
|
246 |
+
<validate>validate-number</validate>
|
247 |
+
<frontend_type>text</frontend_type>
|
248 |
+
<sort_order>53</sort_order>
|
249 |
+
<show_in_default>1</show_in_default>
|
250 |
+
<show_in_website>1</show_in_website>
|
251 |
+
<show_in_store>1</show_in_store>
|
252 |
+
<depends>
|
253 |
+
<left>1</left>
|
254 |
+
</depends>
|
255 |
+
</left_lenght>
|
256 |
+
<left_snippets translate="label">
|
257 |
+
<label>Add Rich Snippets</label>
|
258 |
+
<frontend_type>select</frontend_type>
|
259 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
260 |
+
<sort_order>56</sort_order>
|
261 |
+
<show_in_default>1</show_in_default>
|
262 |
+
<show_in_website>1</show_in_website>
|
263 |
+
<show_in_store>1</show_in_store>
|
264 |
+
<depends>
|
265 |
+
<left>1</left>
|
266 |
+
</depends>
|
267 |
+
</left_snippets>
|
268 |
+
<left_link translate="label">
|
269 |
+
<label>Link to</label>
|
270 |
+
<frontend_type>select</frontend_type>
|
271 |
+
<source_model>feedbackcompany/system_config_source_sidebarlink</source_model>
|
272 |
+
<sort_order>55</sort_order>
|
273 |
+
<show_in_default>1</show_in_default>
|
274 |
+
<show_in_website>1</show_in_website>
|
275 |
+
<show_in_store>1</show_in_store>
|
276 |
+
<depends>
|
277 |
+
<left>1</left>
|
278 |
+
</depends>
|
279 |
+
</left_link>
|
280 |
+
<right_heading translate="label">
|
281 |
+
<label>Right Sidebar</label>
|
282 |
+
<frontend_model>feedbackcompany/adminhtml_widget_form_heading</frontend_model>
|
283 |
+
<sort_order>60</sort_order>
|
284 |
+
<show_in_default>1</show_in_default>
|
285 |
+
<show_in_website>1</show_in_website>
|
286 |
+
<show_in_store>1</show_in_store>
|
287 |
+
</right_heading>
|
288 |
+
<right translate="label">
|
289 |
+
<label>Enabled</label>
|
290 |
+
<frontend_type>select</frontend_type>
|
291 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
292 |
+
<sort_order>61</sort_order>
|
293 |
+
<show_in_default>1</show_in_default>
|
294 |
+
<show_in_website>1</show_in_website>
|
295 |
+
<show_in_store>1</show_in_store>
|
296 |
+
</right>
|
297 |
+
<right_qty translate="label">
|
298 |
+
<label>Number of Reviews</label>
|
299 |
+
<validate>validate-number</validate>
|
300 |
+
<frontend_type>text</frontend_type>
|
301 |
+
<sort_order>62</sort_order>
|
302 |
+
<show_in_default>1</show_in_default>
|
303 |
+
<show_in_website>1</show_in_website>
|
304 |
+
<show_in_store>1</show_in_store>
|
305 |
+
<depends>
|
306 |
+
<right>1</right>
|
307 |
+
</depends>
|
308 |
+
</right_qty>
|
309 |
+
<right_lenght translate="label">
|
310 |
+
<label>Length of Reviews</label>
|
311 |
+
<validate>validate-number</validate>
|
312 |
+
<frontend_type>text</frontend_type>
|
313 |
+
<sort_order>63</sort_order>
|
314 |
+
<show_in_default>1</show_in_default>
|
315 |
+
<show_in_website>1</show_in_website>
|
316 |
+
<show_in_store>1</show_in_store>
|
317 |
+
<depends>
|
318 |
+
<right>1</right>
|
319 |
+
</depends>
|
320 |
+
</right_lenght>
|
321 |
+
<right_link>
|
322 |
+
<label>Link to</label>
|
323 |
+
<frontend_type>select</frontend_type>
|
324 |
+
<source_model>feedbackcompany/system_config_source_sidebarlink</source_model>
|
325 |
+
<sort_order>65</sort_order>
|
326 |
+
<show_in_default>1</show_in_default>
|
327 |
+
<show_in_website>1</show_in_website>
|
328 |
+
<show_in_store>1</show_in_store>
|
329 |
+
<depends>
|
330 |
+
<right>1</right>
|
331 |
+
</depends>
|
332 |
+
</right_link>
|
333 |
+
<right_snippets translate="label">
|
334 |
+
<label>Add Rich Snippets</label>
|
335 |
+
<frontend_type>select</frontend_type>
|
336 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
337 |
+
<sort_order>66</sort_order>
|
338 |
+
<show_in_default>1</show_in_default>
|
339 |
+
<show_in_website>1</show_in_website>
|
340 |
+
<show_in_store>1</show_in_store>
|
341 |
+
<depends>
|
342 |
+
<right>1</right>
|
343 |
+
</depends>
|
344 |
+
</right_snippets>
|
345 |
+
</fields>
|
346 |
+
</sidebar>
|
347 |
+
<block translate="label">
|
348 |
+
<label>The Feedbackcompany Blocks</label>
|
349 |
+
<frontend_type>text</frontend_type>
|
350 |
+
<sort_order>5</sort_order>
|
351 |
+
<show_in_default>1</show_in_default>
|
352 |
+
<show_in_website>1</show_in_website>
|
353 |
+
<show_in_store>1</show_in_store>
|
354 |
+
<expanded>1</expanded>
|
355 |
+
<fields>
|
356 |
<sidebar_heading translate="label">
|
357 |
<label>Sidebar Style Block</label>
|
358 |
<frontend_model>feedbackcompany/adminhtml_widget_form_heading</frontend_model>
|
360 |
<show_in_default>1</show_in_default>
|
361 |
<show_in_website>1</show_in_website>
|
362 |
<show_in_store>1</show_in_store>
|
363 |
+
</sidebar_heading>
|
364 |
+
<sidebar_note translate="label">
|
365 |
+
<label>
|
366 |
+
<![CDATA[You can add this custom block by pasting the following code into your CMS page or Static Block.<br/>{{block type="feedbackcompany/custom" name="feedbackcompany" blocktype="sidebar"}}]]></label>
|
367 |
+
<frontend_model>feedbackcompany/adminhtml_widget_form_note</frontend_model>
|
368 |
+
<sort_order>11</sort_order>
|
369 |
+
<show_in_default>1</show_in_default>
|
370 |
+
<show_in_website>1</show_in_website>
|
371 |
+
<show_in_store>1</show_in_store>
|
372 |
+
</sidebar_note>
|
373 |
<sidebar translate="label">
|
374 |
<label>Enabled</label>
|
375 |
<frontend_type>select</frontend_type>
|
381 |
</sidebar>
|
382 |
<sidebar_qty translate="label">
|
383 |
<label>Number of Reviews</label>
|
384 |
+
<validate>validate-number</validate>
|
385 |
<frontend_type>text</frontend_type>
|
386 |
<sort_order>13</sort_order>
|
387 |
<show_in_default>1</show_in_default>
|
388 |
<show_in_website>1</show_in_website>
|
389 |
<show_in_store>1</show_in_store>
|
390 |
+
<depends>
|
391 |
+
<sidebar>1</sidebar>
|
392 |
+
</depends>
|
393 |
</sidebar_qty>
|
394 |
+
<sidebar_lenght translate="label">
|
395 |
<label>Length of Reviews</label>
|
396 |
+
<validate>validate-number</validate>
|
397 |
<frontend_type>text</frontend_type>
|
398 |
<sort_order>14</sort_order>
|
399 |
<show_in_default>1</show_in_default>
|
400 |
<show_in_website>1</show_in_website>
|
401 |
<show_in_store>1</show_in_store>
|
402 |
+
<depends>
|
403 |
+
<sidebar>1</sidebar>
|
404 |
+
</depends>
|
405 |
+
</sidebar_lenght>
|
406 |
<sidebar_link translate="label">
|
407 |
<label>Link to</label>
|
408 |
<frontend_type>select</frontend_type>
|
411 |
<show_in_default>1</show_in_default>
|
412 |
<show_in_website>1</show_in_website>
|
413 |
<show_in_store>1</show_in_store>
|
414 |
+
<depends>
|
415 |
+
<sidebar>1</sidebar>
|
416 |
+
</depends>
|
417 |
+
</sidebar_link>
|
418 |
+
<sidebar_snippets translate="label">
|
419 |
<label>Add Rich Snippets</label>
|
420 |
<frontend_type>select</frontend_type>
|
421 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
423 |
<show_in_default>1</show_in_default>
|
424 |
<show_in_website>1</show_in_website>
|
425 |
<show_in_store>1</show_in_store>
|
426 |
+
<depends>
|
427 |
+
<sidebar>1</sidebar>
|
428 |
+
</depends>
|
429 |
+
</sidebar_snippets>
|
430 |
<small_heading translate="label">
|
431 |
<label>Small Block</label>
|
432 |
<frontend_model>feedbackcompany/adminhtml_widget_form_heading</frontend_model>
|
435 |
<show_in_website>1</show_in_website>
|
436 |
<show_in_store>1</show_in_store>
|
437 |
</small_heading>
|
438 |
+
<small_note translate="label">
|
439 |
+
<label>
|
440 |
+
<![CDATA[You can add this custom block by pasting the following code in your CMS page or Static Block.<br/>{{block type="feedbackcompany/custom" name="feedbackcompany" blocktype="small"}}]]></label>
|
441 |
+
<frontend_model>feedbackcompany/adminhtml_widget_form_note</frontend_model>
|
442 |
+
<sort_order>21</sort_order>
|
443 |
+
<show_in_default>1</show_in_default>
|
444 |
+
<show_in_website>1</show_in_website>
|
445 |
+
<show_in_store>1</show_in_store>
|
446 |
+
</small_note>
|
447 |
<small translate="label">
|
448 |
<label>Enabled</label>
|
449 |
<frontend_type>select</frontend_type>
|
453 |
<show_in_website>1</show_in_website>
|
454 |
<show_in_store>1</show_in_store>
|
455 |
</small>
|
456 |
+
<small_stars translate="label">
|
457 |
<label>Show stars</label>
|
458 |
<frontend_type>select</frontend_type>
|
459 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
461 |
<show_in_default>1</show_in_default>
|
462 |
<show_in_website>1</show_in_website>
|
463 |
<show_in_store>1</show_in_store>
|
464 |
+
<depends>
|
465 |
+
<small>1</small>
|
466 |
+
</depends>
|
467 |
+
</small_stars>
|
468 |
<small_link translate="label">
|
469 |
<label>Link to</label>
|
470 |
<frontend_type>select</frontend_type>
|
473 |
<show_in_default>1</show_in_default>
|
474 |
<show_in_website>1</show_in_website>
|
475 |
<show_in_store>1</show_in_store>
|
476 |
+
<depends>
|
477 |
+
<small>1</small>
|
478 |
+
</depends>
|
479 |
+
</small_link>
|
480 |
+
<small_snippets translate="label">
|
481 |
<label>Add Rich Snippets</label>
|
482 |
<frontend_type>select</frontend_type>
|
483 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
485 |
<show_in_default>1</show_in_default>
|
486 |
<show_in_website>1</show_in_website>
|
487 |
<show_in_store>1</show_in_store>
|
488 |
+
<depends>
|
489 |
+
<small>1</small>
|
490 |
+
</depends>
|
491 |
+
</small_snippets>
|
492 |
+
<medium_heading translate="label">
|
493 |
<label>Medium Block</label>
|
494 |
<frontend_model>feedbackcompany/adminhtml_widget_form_heading</frontend_model>
|
495 |
<sort_order>40</sort_order>
|
497 |
<show_in_website>1</show_in_website>
|
498 |
<show_in_store>1</show_in_store>
|
499 |
</medium_heading>
|
500 |
+
<medium_note translate="label">
|
501 |
+
<label>
|
502 |
+
<![CDATA[You can add this custom block by pasting the following code in your CMS page or Static Block.<br/>{{block type="feedbackcompany/custom" name="feedbackcompany" blocktype="medium"}}]]></label>
|
503 |
+
<frontend_model>feedbackcompany/adminhtml_widget_form_note</frontend_model>
|
504 |
+
<sort_order>41</sort_order>
|
505 |
+
<show_in_default>1</show_in_default>
|
506 |
+
<show_in_website>1</show_in_website>
|
507 |
+
<show_in_store>1</show_in_store>
|
508 |
+
</medium_note>
|
509 |
<medium translate="label">
|
510 |
<label>Enabled</label>
|
511 |
<frontend_type>select</frontend_type>
|
514 |
<show_in_default>1</show_in_default>
|
515 |
<show_in_website>1</show_in_website>
|
516 |
<show_in_store>1</show_in_store>
|
517 |
+
</medium>
|
518 |
+
<medium_stars translate="label">
|
519 |
<label>Show stars</label>
|
520 |
<frontend_type>select</frontend_type>
|
521 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
523 |
<show_in_default>1</show_in_default>
|
524 |
<show_in_website>1</show_in_website>
|
525 |
<show_in_store>1</show_in_store>
|
526 |
+
<depends>
|
527 |
+
<medium>1</medium>
|
528 |
+
</depends>
|
529 |
+
</medium_stars>
|
530 |
<medium_link translate="label">
|
531 |
<label>Link to</label>
|
532 |
<frontend_type>select</frontend_type>
|
535 |
<show_in_default>1</show_in_default>
|
536 |
<show_in_website>1</show_in_website>
|
537 |
<show_in_store>1</show_in_store>
|
538 |
+
<depends>
|
539 |
+
<medium>1</medium>
|
540 |
+
</depends>
|
541 |
+
</medium_link>
|
542 |
<medium_review translate="label">
|
543 |
<label>Add latest review</label>
|
544 |
<frontend_type>select</frontend_type>
|
547 |
<show_in_default>1</show_in_default>
|
548 |
<show_in_website>1</show_in_website>
|
549 |
<show_in_store>1</show_in_store>
|
550 |
+
<depends>
|
551 |
+
<medium>1</medium>
|
552 |
+
</depends>
|
553 |
</medium_review>
|
554 |
+
<medium_lenght translate="label">
|
555 |
<label>Length of Reviews</label>
|
556 |
+
<validate>validate-number</validate>
|
557 |
<frontend_type>text</frontend_type>
|
558 |
<sort_order>46</sort_order>
|
559 |
<show_in_default>1</show_in_default>
|
560 |
<show_in_website>1</show_in_website>
|
561 |
<show_in_store>1</show_in_store>
|
562 |
+
<depends>
|
563 |
+
<medium>1</medium>
|
564 |
+
</depends>
|
565 |
+
</medium_lenght>
|
566 |
+
<medium_snippets translate="label">
|
567 |
<label>Add Rich Snippets</label>
|
568 |
<frontend_type>select</frontend_type>
|
569 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
571 |
<show_in_default>1</show_in_default>
|
572 |
<show_in_website>1</show_in_website>
|
573 |
<show_in_store>1</show_in_store>
|
574 |
+
<depends>
|
575 |
+
<medium>1</medium>
|
576 |
+
</depends>
|
577 |
</medium_snippets>
|
578 |
+
<header_heading translate="label">
|
579 |
<label>Header Block</label>
|
580 |
<frontend_model>feedbackcompany/adminhtml_widget_form_heading</frontend_model>
|
581 |
<sort_order>50</sort_order>
|
583 |
<show_in_website>1</show_in_website>
|
584 |
<show_in_store>1</show_in_store>
|
585 |
</header_heading>
|
586 |
+
<header_note translate="label">
|
587 |
+
<label>
|
588 |
+
<![CDATA[The documentation to implement The Feedback Company header widget can be found <a href="http://www.magmodules.eu/help/feedbackcompany/the-feedback-company-header-widget/">here</a>.]]></label>
|
589 |
+
<frontend_model>feedbackcompany/adminhtml_widget_form_note</frontend_model>
|
590 |
+
<sort_order>51</sort_order>
|
591 |
+
<show_in_default>1</show_in_default>
|
592 |
+
<show_in_website>1</show_in_website>
|
593 |
+
<show_in_store>1</show_in_store>
|
594 |
+
</header_note>
|
595 |
<header translate="label">
|
596 |
<label>Enabled</label>
|
597 |
<frontend_type>select</frontend_type>
|
600 |
<show_in_default>1</show_in_default>
|
601 |
<show_in_website>1</show_in_website>
|
602 |
<show_in_store>1</show_in_store>
|
603 |
+
</header>
|
604 |
<header_link translate="label">
|
605 |
<label>Link to</label>
|
606 |
<frontend_type>select</frontend_type>
|
609 |
<show_in_default>1</show_in_default>
|
610 |
<show_in_website>1</show_in_website>
|
611 |
<show_in_store>1</show_in_store>
|
612 |
+
<depends>
|
613 |
+
<header>1</header>
|
614 |
+
</depends>
|
615 |
+
</header_link>
|
616 |
+
<header_snippets translate="label">
|
617 |
<label>Add Rich Snippets</label>
|
618 |
<frontend_type>select</frontend_type>
|
619 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
621 |
<show_in_default>1</show_in_default>
|
622 |
<show_in_website>1</show_in_website>
|
623 |
<show_in_store>1</show_in_store>
|
624 |
+
<depends>
|
625 |
+
<header>1</header>
|
626 |
+
</depends>
|
627 |
+
</header_snippets>
|
628 |
+
</fields>
|
629 |
+
</block>
|
630 |
+
<overview translate="label">
|
631 |
+
<label>Feedbackcompany Overview Page</label>
|
632 |
+
<frontend_type>text</frontend_type>
|
633 |
+
<sort_order>6</sort_order>
|
634 |
+
<show_in_default>1</show_in_default>
|
635 |
+
<show_in_website>1</show_in_website>
|
636 |
+
<show_in_store>1</show_in_store>
|
637 |
+
<expanded>1</expanded>
|
638 |
+
<comment>
|
639 |
+
<![CDATA[You can import your customer reviews and display them in your store as new content.<br>Link: http://www.mywebshop.com/<strong>feedbackcompany</strong><br><br>]]></comment>
|
640 |
+
<fields>
|
641 |
+
<enabled translate="label">
|
642 |
+
<label>Enabled</label>
|
643 |
+
<frontend_type>select</frontend_type>
|
644 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
645 |
+
<sort_order>1</sort_order>
|
646 |
+
<show_in_default>1</show_in_default>
|
647 |
+
<show_in_website>1</show_in_website>
|
648 |
+
<show_in_store>1</show_in_store>
|
649 |
+
</enabled>
|
650 |
+
<intro translate="lable">
|
651 |
+
<label>Intro</label>
|
652 |
+
<frontend_type>textarea</frontend_type>
|
653 |
+
<sort_order>2</sort_order>
|
654 |
+
<show_in_default>1</show_in_default>
|
655 |
+
<show_in_website>1</show_in_website>
|
656 |
+
<show_in_store>1</show_in_store>
|
657 |
+
<depends>
|
658 |
+
<enabled>1</enabled>
|
659 |
+
</depends>
|
660 |
+
</intro>
|
661 |
+
<enable_paging>
|
662 |
+
<label>Paging</label>
|
663 |
+
<frontend_type>select</frontend_type>
|
664 |
+
<source_model>adminhtml/system_config_source_enabledisable</source_model>
|
665 |
+
<sort_order>3</sort_order>
|
666 |
+
<show_in_default>1</show_in_default>
|
667 |
+
<show_in_website>1</show_in_website>
|
668 |
+
<show_in_store>1</show_in_store>
|
669 |
+
</enable_paging>
|
670 |
+
<paging_settings>
|
671 |
+
<label>Reviews per page</label>
|
672 |
+
<frontend_type>text</frontend_type>
|
673 |
+
<sort_order>4</sort_order>
|
674 |
+
<show_in_default>1</show_in_default>
|
675 |
+
<show_in_website>1</show_in_website>
|
676 |
+
<show_in_store>1</show_in_store>
|
677 |
+
<tooltip>Comma Separated, as: 10,20,30</tooltip>
|
678 |
+
<depends>
|
679 |
+
<enable_paging>1</enable_paging>
|
680 |
+
</depends>
|
681 |
+
</paging_settings>
|
682 |
+
<heading_meta translate="label">
|
683 |
+
<label>Meta Data</label>
|
684 |
+
<frontend_model>feedbackcompany/adminhtml_widget_form_heading</frontend_model>
|
685 |
+
<sort_order>10</sort_order>
|
686 |
+
<show_in_default>1</show_in_default>
|
687 |
+
<show_in_website>1</show_in_website>
|
688 |
+
<show_in_store>1</show_in_store>
|
689 |
+
</heading_meta>
|
690 |
+
<meta_title translate="lable">
|
691 |
+
<label>Meta Title</label>
|
692 |
+
<frontend_type>text</frontend_type>
|
693 |
+
<sort_order>11</sort_order>
|
694 |
+
<show_in_default>1</show_in_default>
|
695 |
+
<show_in_website>1</show_in_website>
|
696 |
+
<show_in_store>1</show_in_store>
|
697 |
+
<depends>
|
698 |
+
<enabled>1</enabled>
|
699 |
+
</depends>
|
700 |
+
</meta_title>
|
701 |
+
<meta_description translate="lable">
|
702 |
+
<label>Meta Description</label>
|
703 |
+
<frontend_type>textarea</frontend_type>
|
704 |
+
<sort_order>12</sort_order>
|
705 |
+
<show_in_default>1</show_in_default>
|
706 |
+
<show_in_website>1</show_in_website>
|
707 |
+
<show_in_store>1</show_in_store>
|
708 |
+
<depends>
|
709 |
+
<enabled>1</enabled>
|
710 |
+
</depends>
|
711 |
+
</meta_description>
|
712 |
+
<meta_keywords translate="label">
|
713 |
+
<label>Meta Keywords</label>
|
714 |
+
<frontend_type>textarea</frontend_type>
|
715 |
+
<sort_order>13</sort_order>
|
716 |
+
<show_in_default>1</show_in_default>
|
717 |
+
<show_in_website>1</show_in_website>
|
718 |
+
<show_in_store>1</show_in_store>
|
719 |
+
<depends>
|
720 |
+
<enabled>1</enabled>
|
721 |
+
</depends>
|
722 |
+
</meta_keywords>
|
723 |
+
</fields>
|
724 |
+
</overview>
|
725 |
+
<invitation translate="label">
|
726 |
+
<label>The Feedback Company Invitation Email</label>
|
727 |
+
<frontend_type>text</frontend_type>
|
728 |
+
<sort_order>7</sort_order>
|
729 |
+
<show_in_default>1</show_in_default>
|
730 |
+
<show_in_website>1</show_in_website>
|
731 |
+
<show_in_store>1</show_in_store>
|
732 |
+
<expanded>1</expanded>
|
733 |
+
<comment><![CDATA[You can invite your customers to write customer reviews.]]></comment>
|
734 |
+
<fields>
|
735 |
+
<heading_setup translate="label">
|
736 |
+
<label>Invitation Emails</label>
|
737 |
+
<frontend_model>feedbackcompany/adminhtml_widget_form_heading</frontend_model>
|
738 |
+
<sort_order>10</sort_order>
|
739 |
+
<show_in_default>1</show_in_default>
|
740 |
+
<show_in_website>0</show_in_website>
|
741 |
+
<show_in_store>1</show_in_store>
|
742 |
+
</heading_setup>
|
743 |
+
<enabled translate="label">
|
744 |
+
<label>Activate</label>
|
745 |
+
<frontend_type>select</frontend_type>
|
746 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
747 |
+
<sort_order>11</sort_order>
|
748 |
+
<show_in_default>1</show_in_default>
|
749 |
+
<show_in_website>1</show_in_website>
|
750 |
+
<show_in_store>1</show_in_store>
|
751 |
+
<comment>Send invitation?</comment>
|
752 |
+
<tooltip>Send customers automatically receive an invitation to share a customer
|
753 |
+
experience.
|
754 |
+
</tooltip>
|
755 |
+
</enabled>
|
756 |
+
<connector>
|
757 |
+
<label>Connector Code</label>
|
758 |
+
<frontend_type>text</frontend_type>
|
759 |
+
<sort_order>12</sort_order>
|
760 |
+
<show_in_default>1</show_in_default>
|
761 |
+
<show_in_website>1</show_in_website>
|
762 |
+
<show_in_store>1</show_in_store>
|
763 |
+
<comment>Can be obtained from the Feedbackcompany Dashboard</comment>
|
764 |
+
<depends>
|
765 |
+
<enabled>1</enabled>
|
766 |
+
</depends>
|
767 |
+
</connector>
|
768 |
+
<status>
|
769 |
+
<label>Order completed with status</label>
|
770 |
+
<frontend_type>select</frontend_type>
|
771 |
+
<source_model>feedbackcompany/system_config_source_orderstatus</source_model>
|
772 |
+
<sort_order>13</sort_order>
|
773 |
+
<show_in_default>1</show_in_default>
|
774 |
+
<show_in_website>1</show_in_website>
|
775 |
+
<show_in_store>1</show_in_store>
|
776 |
+
<can_be_empty>1</can_be_empty>
|
777 |
+
<comment>Invitation e-mail is sent after such status is achieved</comment>
|
778 |
+
<tooltip>Specify at which status you want to send the invitation. Default is "Completed"
|
779 |
+
</tooltip>
|
780 |
+
<depends>
|
781 |
+
<enabled>1</enabled>
|
782 |
+
</depends>
|
783 |
+
</status>
|
784 |
+
<delay translate="label">
|
785 |
+
<label>Delay</label>
|
786 |
+
<frontend_type>text</frontend_type>
|
787 |
+
<sort_order>14</sort_order>
|
788 |
+
<show_in_default>1</show_in_default>
|
789 |
+
<show_in_website>1</show_in_website>
|
790 |
+
<show_in_store>1</show_in_store>
|
791 |
+
<comment>Send the invitation x days after the order is completed</comment>
|
792 |
+
<tooltip>This will ensure that the customer receives the invitation shortly after receiving
|
793 |
+
the product and not before. This increases the opportunity that the client will share
|
794 |
+
his experience.
|
795 |
+
</tooltip>
|
796 |
+
<depends>
|
797 |
+
<enabled>1</enabled>
|
798 |
+
</depends>
|
799 |
+
</delay>
|
800 |
+
<remind_delay translate="label">
|
801 |
+
<label>Remind Delay</label>
|
802 |
+
<frontend_type>text</frontend_type>
|
803 |
+
<sort_order>15</sort_order>
|
804 |
+
<show_in_default>1</show_in_default>
|
805 |
+
<show_in_website>1</show_in_website>
|
806 |
+
<show_in_store>1</show_in_store>
|
807 |
+
<comment>Send the invitation reminder x days after the previous reminder. 0 = none</comment>
|
808 |
+
<depends>
|
809 |
+
<enabled>1</enabled>
|
810 |
+
</depends>
|
811 |
+
</remind_delay>
|
812 |
+
<backlog translate="label">
|
813 |
+
<label>Maximum Delay</label>
|
814 |
+
<frontend_type>text</frontend_type>
|
815 |
+
<sort_order>16</sort_order>
|
816 |
+
<show_in_default>1</show_in_default>
|
817 |
+
<show_in_website>1</show_in_website>
|
818 |
+
<show_in_store>1</show_in_store>
|
819 |
+
<comment>Change only if necessary</comment>
|
820 |
+
<tooltip>Number of days to complete order may last, if it takes longer then no invitation
|
821 |
+
will be sent. Read more about this feature on Feedbackcompany.nl.
|
822 |
+
</tooltip>
|
823 |
+
<depends>
|
824 |
+
<enabled>1</enabled>
|
825 |
+
</depends>
|
826 |
+
</backlog>
|
827 |
+
<resend translate="label">
|
828 |
+
<label>Resend if Double</label>
|
829 |
+
<frontend_type>select</frontend_type>
|
830 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
831 |
+
<sort_order>17</sort_order>
|
832 |
+
<show_in_default>1</show_in_default>
|
833 |
+
<show_in_website>1</show_in_website>
|
834 |
+
<show_in_store>1</show_in_store>
|
835 |
+
<depends>
|
836 |
+
<enabled>1</enabled>
|
837 |
+
</depends>
|
838 |
+
<comment>If yes, customers will get new review reminders for every new order.</comment>
|
839 |
+
</resend>
|
840 |
+
<heading_filter translate="label">
|
841 |
+
<label>Filter options</label>
|
842 |
+
<frontend_model>feedbackcompany/adminhtml_widget_form_heading</frontend_model>
|
843 |
+
<sort_order>40</sort_order>
|
844 |
+
<show_in_default>1</show_in_default>
|
845 |
+
<show_in_website>0</show_in_website>
|
846 |
+
<show_in_store>1</show_in_store>
|
847 |
+
</heading_filter>
|
848 |
<min_order_total translate="label">
|
849 |
<label>Minimum Order Total</label>
|
850 |
<frontend_type>text</frontend_type>
|
852 |
<show_in_default>1</show_in_default>
|
853 |
<show_in_website>1</show_in_website>
|
854 |
<show_in_store>1</show_in_store>
|
855 |
+
<comment>
|
856 |
+
<![CDATA[Invitation e-mail is sent only for order above this value. Use 0 for no minimum.]]></comment>
|
857 |
+
</min_order_total>
|
858 |
+
<exclude_category translate="label">
|
859 |
+
<label>Exclude by Category</label>
|
860 |
+
<frontend_type>select</frontend_type>
|
861 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
862 |
+
<sort_order>42</sort_order>
|
863 |
+
<show_in_default>1</show_in_default>
|
864 |
+
<show_in_website>1</show_in_website>
|
865 |
+
<show_in_store>1</show_in_store>
|
866 |
+
</exclude_category>
|
867 |
<exclude_categories>
|
868 |
+
<label>Exclude following Categories</label>
|
869 |
+
<frontend_type>multiselect</frontend_type>
|
870 |
+
<source_model>feedbackcompany/system_config_source_category</source_model>
|
871 |
+
<sort_order>43</sort_order>
|
872 |
+
<show_in_default>1</show_in_default>
|
873 |
+
<show_in_website>1</show_in_website>
|
874 |
+
<show_in_store>1</show_in_store>
|
875 |
+
<depends>
|
876 |
+
<exclude_category>1</exclude_category>
|
877 |
+
</depends>
|
878 |
+
<comment>
|
879 |
+
<![CDATA[The invitation e-mail will not be sent whenever there is ordered a product from one of the selected categories.]]></comment>
|
880 |
+
</exclude_categories>
|
881 |
+
</fields>
|
882 |
+
</invitation>
|
883 |
+
<productreviews translate="label">
|
884 |
+
<label>The Feedbackcompany Productreviews</label>
|
885 |
+
<frontend_type>text</frontend_type>
|
886 |
+
<sort_order>8</sort_order>
|
887 |
+
<show_in_default>1</show_in_default>
|
888 |
+
<show_in_website>1</show_in_website>
|
889 |
+
<show_in_store>1</show_in_store>
|
890 |
+
<comment>
|
891 |
+
<![CDATA[
|
892 |
<script>
|
893 |
Event.observe(window, 'load', function() {
|
894 |
if ($('feedbackcompany_productreviews_lastrun')) {
|
898 |
});
|
899 |
</script>
|
900 |
]]>
|
901 |
+
</comment>
|
902 |
+
<expanded>1</expanded>
|
903 |
+
<fields>
|
904 |
+
<products_note translate="label">
|
905 |
+
<label>
|
906 |
+
<![CDATA[This option is still in beta, contact The Feedback Company for more information.<br/>]]></label>
|
907 |
+
<frontend_model>feedbackcompany/adminhtml_widget_form_note</frontend_model>
|
908 |
+
<sort_order>1</sort_order>
|
909 |
+
<show_in_default>1</show_in_default>
|
910 |
+
<show_in_website>1</show_in_website>
|
911 |
+
<show_in_store>1</show_in_store>
|
912 |
+
</products_note>
|
913 |
+
<enabled translate="label">
|
914 |
+
<label>Enabled</label>
|
915 |
+
<frontend_type>select</frontend_type>
|
916 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
917 |
+
<sort_order>2</sort_order>
|
918 |
+
<show_in_default>1</show_in_default>
|
919 |
+
<show_in_website>1</show_in_website>
|
920 |
+
<show_in_store>1</show_in_store>
|
921 |
+
</enabled>
|
922 |
+
<!--
|
923 |
+
<client_id translate="label">
|
924 |
+
<label>Oauth2 Client ID</label>
|
925 |
+
<frontend_type>text</frontend_type>
|
926 |
+
<sort_order>3</sort_order>
|
927 |
+
<show_in_default>1</show_in_default>
|
928 |
+
<show_in_website>1</show_in_website>
|
929 |
+
<show_in_store>1</show_in_store>
|
930 |
+
</client_id>
|
931 |
+
<client_secret translate="label">
|
932 |
+
<label>Oauth2 Client Secret</label>
|
933 |
+
<frontend_type>text</frontend_type>
|
934 |
+
<sort_order>4</sort_order>
|
935 |
+
<show_in_default>1</show_in_default>
|
936 |
+
<show_in_website>1</show_in_website>
|
937 |
+
<show_in_store>1</show_in_store>
|
938 |
+
</client_secret>
|
939 |
+
-->
|
940 |
+
<heading_reviews translate="label">
|
941 |
+
<label>Review Settings</label>
|
942 |
+
<frontend_model>feedbackcompany/adminhtml_widget_form_heading</frontend_model>
|
943 |
+
<sort_order>20</sort_order>
|
944 |
+
<show_in_default>1</show_in_default>
|
945 |
+
<show_in_website>0</show_in_website>
|
946 |
+
<show_in_store>0</show_in_store>
|
947 |
+
</heading_reviews>
|
948 |
+
<review_import_status translate="label">
|
949 |
+
<label>Default Review Status</label>
|
950 |
+
<frontend_type>select</frontend_type>
|
951 |
+
<source_model>feedbackcompany/system_config_source_reviewstatus</source_model>
|
952 |
+
<sort_order>21</sort_order>
|
953 |
+
<show_in_default>1</show_in_default>
|
954 |
+
<show_in_website>1</show_in_website>
|
955 |
+
<show_in_store>1</show_in_store>
|
956 |
+
</review_import_status>
|
957 |
+
<review_import_rating translate="label">
|
958 |
+
<label>Default Review Rating</label>
|
959 |
+
<frontend_type>select</frontend_type>
|
960 |
+
<source_model>feedbackcompany/system_config_source_reviewrating</source_model>
|
961 |
+
<sort_order>22</sort_order>
|
962 |
+
<show_in_default>1</show_in_default>
|
963 |
+
<show_in_website>1</show_in_website>
|
964 |
+
<show_in_store>1</show_in_store>
|
965 |
+
</review_import_rating>
|
966 |
+
<heading_import translate="label">
|
967 |
+
<label>Import Settings</label>
|
968 |
+
<frontend_model>feedbackcompany/adminhtml_widget_form_heading</frontend_model>
|
969 |
+
<sort_order>30</sort_order>
|
970 |
+
<show_in_default>1</show_in_default>
|
971 |
+
<show_in_website>0</show_in_website>
|
972 |
+
<show_in_store>0</show_in_store>
|
973 |
+
</heading_import>
|
974 |
+
<cron translate="label">
|
975 |
+
<label>Use Cronjob</label>
|
976 |
+
<frontend_type>select</frontend_type>
|
977 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
978 |
+
<sort_order>31</sort_order>
|
979 |
+
<show_in_default>1</show_in_default>
|
980 |
+
<show_in_website>0</show_in_website>
|
981 |
+
<show_in_store>0</show_in_store>
|
982 |
+
</cron>
|
983 |
+
<cron_productreviews translate="label">
|
984 |
+
<label>Update Reviews</label>
|
985 |
+
<frontend_type>select</frontend_type>
|
986 |
+
<source_model>feedbackcompany/system_config_source_cronfrequency</source_model>
|
987 |
+
<sort_order>32</sort_order>
|
988 |
+
<show_in_default>1</show_in_default>
|
989 |
+
<show_in_website>0</show_in_website>
|
990 |
+
<show_in_store>0</show_in_store>
|
991 |
+
<tooltip>Select the schedule for automatic updating</tooltip>
|
992 |
+
</cron_productreviews>
|
993 |
+
<lastrun translate="label">
|
994 |
+
<label>Last Update</label>
|
995 |
+
<frontend_type>text</frontend_type>
|
996 |
+
<sort_order>33</sort_order>
|
997 |
+
<show_in_default>1</show_in_default>
|
998 |
+
<show_in_website>0</show_in_website>
|
999 |
+
<show_in_store>0</show_in_store>
|
1000 |
+
</lastrun>
|
1001 |
+
<process translate="label">
|
1002 |
+
<label>Process Manually</label>
|
1003 |
+
<frontend_type>button</frontend_type>
|
1004 |
+
<frontend_model>feedbackcompany/adminhtml_widget_buttons_productreviews</frontend_model>
|
1005 |
+
<sort_order>34</sort_order>
|
1006 |
+
<show_in_default>1</show_in_default>
|
1007 |
+
<show_in_website>0</show_in_website>
|
1008 |
+
<show_in_store>0</show_in_store>
|
1009 |
+
<depends>
|
1010 |
+
<enabled>1</enabled>
|
1011 |
+
</depends>
|
1012 |
+
</process>
|
1013 |
+
</fields>
|
1014 |
+
</productreviews>
|
1015 |
+
<log translate="label">
|
1016 |
+
<label>The Feedbackcompany Log Settings</label>
|
1017 |
+
<frontend_type>text</frontend_type>
|
1018 |
+
<sort_order>9</sort_order>
|
1019 |
+
<show_in_default>1</show_in_default>
|
1020 |
+
<show_in_website>0</show_in_website>
|
1021 |
+
<show_in_store>0</show_in_store>
|
1022 |
+
<expanded>1</expanded>
|
1023 |
+
<comment>
|
1024 |
+
<![CDATA[Logs can be activated in order to detect errors.<br/> This feature is particularly for developers.<br/><br/>]]></comment>
|
1025 |
+
<fields>
|
1026 |
+
<enabled translate="label">
|
1027 |
+
<label>Enable Log Function</label>
|
1028 |
+
<frontend_type>select</frontend_type>
|
1029 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
1030 |
+
<sort_order>1</sort_order>
|
1031 |
+
<show_in_default>1</show_in_default>
|
1032 |
+
<show_in_website>0</show_in_website>
|
1033 |
+
<show_in_store>0</show_in_store>
|
1034 |
+
</enabled>
|
1035 |
+
<clean translate="label">
|
1036 |
+
<label>Auto Cleaning</label>
|
1037 |
+
<frontend_type>select</frontend_type>
|
1038 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
1039 |
+
<sort_order>2</sort_order>
|
1040 |
+
<show_in_default>1</show_in_default>
|
1041 |
+
<show_in_website>0</show_in_website>
|
1042 |
+
<show_in_store>0</show_in_store>
|
1043 |
+
<depends>
|
1044 |
+
<enabled>1</enabled>
|
1045 |
+
</depends>
|
1046 |
+
</clean>
|
1047 |
+
<clean_days translate="label">
|
1048 |
+
<label>Clean after Days</label>
|
1049 |
+
<validate>validate-number</validate>
|
1050 |
+
<frontend_type>text</frontend_type>
|
1051 |
+
<sort_order>3</sort_order>
|
1052 |
+
<show_in_default>1</show_in_default>
|
1053 |
+
<show_in_website>0</show_in_website>
|
1054 |
+
<show_in_store>0</show_in_store>
|
1055 |
+
<depends>
|
1056 |
+
<enabled>1</enabled>
|
1057 |
+
</depends>
|
1058 |
+
</clean_days>
|
1059 |
+
</fields>
|
1060 |
+
</log>
|
1061 |
+
</groups>
|
1062 |
+
</feedbackcompany>
|
1063 |
+
</sections>
|
1064 |
</config>
|
app/code/community/Magmodules/Feedbackcompany/sql/feedbackcompany_setup/mysql4-install-0.9.0.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,16 +11,17 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
$installer = $this;
|
23 |
$installer->startSetup();
|
24 |
-
$installer->run(
|
|
|
25 |
DROP TABLE IF EXISTS {$this->getTable('feedbackcompany_reviews')};
|
26 |
CREATE TABLE IF NOT EXISTS {$this->getTable('feedbackcompany_reviews')} (
|
27 |
`review_id` int(10) NOT NULL AUTO_INCREMENT,
|
@@ -80,5 +80,6 @@ $installer->run("
|
|
80 |
`votes` int(5) DEFAULT '0',
|
81 |
PRIMARY KEY (`id`)
|
82 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
83 |
-
"
|
|
|
84 |
$installer->endSetup();
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
+
|
21 |
$installer = $this;
|
22 |
$installer->startSetup();
|
23 |
+
$installer->run(
|
24 |
+
"
|
25 |
DROP TABLE IF EXISTS {$this->getTable('feedbackcompany_reviews')};
|
26 |
CREATE TABLE IF NOT EXISTS {$this->getTable('feedbackcompany_reviews')} (
|
27 |
`review_id` int(10) NOT NULL AUTO_INCREMENT,
|
80 |
`votes` int(5) DEFAULT '0',
|
81 |
PRIMARY KEY (`id`)
|
82 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
83 |
+
"
|
84 |
+
);
|
85 |
$installer->endSetup();
|
app/code/community/Magmodules/Feedbackcompany/sql/feedbackcompany_setup/mysql4-upgrade-1.2.1-1.2.2.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,21 +11,23 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
$installer = $this;
|
23 |
$installer->startSetup();
|
24 |
-
$this->addAttribute(
|
25 |
-
'
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
|
|
|
|
32 |
$installer->endSetup();
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
+
|
21 |
$installer = $this;
|
22 |
$installer->startSetup();
|
23 |
+
$this->addAttribute(
|
24 |
+
'order', 'feedback_sent', array(
|
25 |
+
'type' => 'date',
|
26 |
+
'label' => 'Feedbackcompany Connect',
|
27 |
+
'visible' => false,
|
28 |
+
'required' => false,
|
29 |
+
'visible_on_front' => false,
|
30 |
+
'user_defined' => false
|
31 |
+
)
|
32 |
+
);
|
33 |
$installer->endSetup();
|
app/code/community/Magmodules/Feedbackcompany/sql/feedbackcompany_setup/mysql4-upgrade-1.2.5-1.2.6.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,17 +11,15 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
$installer = $this;
|
23 |
$installer->startSetup();
|
24 |
-
$installer->run("
|
25 |
-
ALTER TABLE {$this->getTable('feedbackcompany_reviews')} ADD `company_response` text NULL AFTER `text_improvements`;
|
26 |
-
");
|
27 |
|
28 |
$installer->endSetup();
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
+
|
21 |
$installer = $this;
|
22 |
$installer->startSetup();
|
23 |
+
$installer->run("ALTER TABLE {$this->getTable('feedbackcompany_reviews')} ADD `company_response` text NULL AFTER `text_improvements`;");
|
|
|
|
|
24 |
|
25 |
$installer->endSetup();
|
app/code/community/Magmodules/Feedbackcompany/sql/feedbackcompany_setup/mysql4-upgrade-1.3.0-1.3.1.php
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
-
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,13 +11,13 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
$installer = $this;
|
23 |
$installer->startSetup();
|
24 |
$installer->run("ALTER TABLE {$this->getTable('review')} ADD `feedbackcompany_id` INT(11) NULL AFTER `status_id`");
|
1 |
+
<?php
|
2 |
/**
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
+
|
21 |
$installer = $this;
|
22 |
$installer->startSetup();
|
23 |
$installer->run("ALTER TABLE {$this->getTable('review')} ADD `feedbackcompany_id` INT(11) NULL AFTER `status_id`");
|
app/code/community/Magmodules/Feedbackcompany/sql/feedbackcompany_setup/mysql4-upgrade-1.4.9-1.5.0.php
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
+
* that is bundled with this package in the file LICENSE.txt.
|
8 |
+
* It is also available through the world-wide-web at this URL:
|
9 |
+
* http://opensource.org/licenses/osl-3.0.php
|
10 |
+
* If you did not receive a copy of the license and are unable to
|
11 |
+
* obtain it through the world-wide-web, please send an email
|
12 |
+
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
+
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
|
21 |
+
$installer = $this;
|
22 |
+
$installer->startSetup();
|
23 |
+
|
24 |
+
// 1) UPDATE client_id path
|
25 |
+
$collection = Mage::getModel('core/config_data')->getCollection()
|
26 |
+
->addFieldToFilter('path', 'feedbackcompany/productreviews/client_id');
|
27 |
+
|
28 |
+
foreach ($collection as $row) {
|
29 |
+
$row->setPath('feedbackcompany/general/client_id')->save();
|
30 |
+
}
|
31 |
+
|
32 |
+
// 2) UPDATE client_secret path
|
33 |
+
$collection = Mage::getModel('core/config_data')->getCollection()
|
34 |
+
->addFieldToFilter('path', 'feedbackcompany/productreviews/client_secret');
|
35 |
+
|
36 |
+
foreach ($collection as $row) {
|
37 |
+
$row->setPath('feedbackcompany/general/client_secret')->save();
|
38 |
+
}
|
39 |
+
|
40 |
+
// 3) UNSET OLD VALUES
|
41 |
+
$unset = array(
|
42 |
+
'feedbackcompany/productreviews/client_secret',
|
43 |
+
'feedbackcompany/productreviews/client_id',
|
44 |
+
'feedbackcompany/productreviews/client_token',
|
45 |
+
'feedbackcompany/general/api_id',
|
46 |
+
'feedbackcompany/general/url',
|
47 |
+
'feedbackcompany/general/company'
|
48 |
+
);
|
49 |
+
|
50 |
+
$collection = Mage::getModel('core/config_data')->getCollection()->addFieldToFilter('path', array('in' => $unset));
|
51 |
+
foreach ($collection as $row) {
|
52 |
+
$row->delete();
|
53 |
+
}
|
54 |
+
|
55 |
+
// 4) ALTER STATS & REVIEW TABLE
|
56 |
+
$installer->run("ALTER TABLE {$this->getTable('feedbackcompany_stats')} ADD `review_url` VARCHAR(255) NULL AFTER `votes`");
|
57 |
+
$installer->run("ALTER TABLE {$this->getTable('feedbackcompany_stats')} ADD `recommends` INT(11) NULL AFTER `votes`");
|
58 |
+
$installer->run("ALTER TABLE {$this->getTable('feedbackcompany_stats')} ADD `client_id` VARCHAR(255) NULL AFTER `shop_id`");
|
59 |
+
$installer->run("ALTER TABLE {$this->getTable('feedbackcompany_reviews')} ADD `customer_city` VARCHAR(255) NULL AFTER `customer_age`");
|
60 |
+
$installer->run("ALTER TABLE {$this->getTable('feedbackcompany_reviews')} ADD `customer_email` VARCHAR(255) NULL AFTER `customer_city`");
|
61 |
+
$installer->run("ALTER TABLE {$this->getTable('feedbackcompany_reviews')} ADD `customer_country` VARCHAR(255) NULL AFTER `customer_email`");
|
62 |
+
$installer->run("ALTER TABLE {$this->getTable('feedbackcompany_reviews')} ADD `buy_online` VARCHAR(255) NULL AFTER `customer_country`");
|
63 |
+
$installer->run("ALTER TABLE {$this->getTable('feedbackcompany_reviews')} ADD `questions` TEXT NULL AFTER `status`");
|
64 |
+
|
65 |
+
$this->endSetup();
|
app/design/adminhtml/default/default/layout/magmodules_feedbackcompany.xml
CHANGED
@@ -1,16 +1,37 @@
|
|
1 |
<?xml version="1.0"?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
<layout version="0.1.0">
|
3 |
<adminhtml_feedbackreviews_index>
|
4 |
<reference name="head">
|
5 |
-
<action method="addCss"
|
|
|
|
|
6 |
</reference>
|
7 |
<reference name="content">
|
8 |
-
<block type="feedbackcompany/adminhtml_feedbackreviews" name="feedbackcompany"
|
9 |
</reference>
|
10 |
</adminhtml_feedbackreviews_index>
|
11 |
<adminhtml_feedbacklog_index>
|
12 |
<reference name="content">
|
13 |
-
<block type="feedbackcompany/adminhtml_feedbacklog" name="feedbacklog"
|
14 |
</reference>
|
15 |
</adminhtml_feedbacklog_index>
|
16 |
</layout>
|
1 |
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
~ Magmodules.eu - http://www.magmodules.eu
|
4 |
+
~
|
5 |
+
~ NOTICE OF LICENSE
|
6 |
+
~ This source file is subject to the Open Software License (OSL 3.0)
|
7 |
+
~ that is bundled with this package in the file LICENSE.txt.
|
8 |
+
~ It is also available through the world-wide-web at this URL:
|
9 |
+
~ http://opensource.org/licenses/osl-3.0.php
|
10 |
+
~ If you did not receive a copy of the license and are unable to
|
11 |
+
~ obtain it through the world-wide-web, please send an email
|
12 |
+
~ to info@magmodules.eu so we can send you a copy immediately.
|
13 |
+
~
|
14 |
+
~ @category Magmodules
|
15 |
+
~ @package Magmodules_Feedbackcompany
|
16 |
+
~ @author Magmodules <info@magmodules.eu>
|
17 |
+
~ @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
~ @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
-->
|
20 |
+
|
21 |
<layout version="0.1.0">
|
22 |
<adminhtml_feedbackreviews_index>
|
23 |
<reference name="head">
|
24 |
+
<action method="addCss">
|
25 |
+
<name>magmodules/feedbackcompany/grid.css</name>
|
26 |
+
</action>
|
27 |
</reference>
|
28 |
<reference name="content">
|
29 |
+
<block type="feedbackcompany/adminhtml_feedbackreviews" name="feedbackcompany"/>
|
30 |
</reference>
|
31 |
</adminhtml_feedbackreviews_index>
|
32 |
<adminhtml_feedbacklog_index>
|
33 |
<reference name="content">
|
34 |
+
<block type="feedbackcompany/adminhtml_feedbacklog" name="feedbacklog"/>
|
35 |
</reference>
|
36 |
</adminhtml_feedbacklog_index>
|
37 |
</layout>
|
app/design/frontend/base/default/layout/magmodules_feedbackcompany.xml
CHANGED
@@ -1,35 +1,65 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
|
3 |
-
|
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 |
</layout>
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
~ Magmodules.eu - http://www.magmodules.eu
|
4 |
+
~
|
5 |
+
~ NOTICE OF LICENSE
|
6 |
+
~ This source file is subject to the Open Software License (OSL 3.0)
|
7 |
+
~ that is bundled with this package in the file LICENSE.txt.
|
8 |
+
~ It is also available through the world-wide-web at this URL:
|
9 |
+
~ http://opensource.org/licenses/osl-3.0.php
|
10 |
+
~ If you did not receive a copy of the license and are unable to
|
11 |
+
~ obtain it through the world-wide-web, please send an email
|
12 |
+
~ to info@magmodules.eu so we can send you a copy immediately.
|
13 |
+
~
|
14 |
+
~ @category Magmodules
|
15 |
+
~ @package Magmodules_Feedbackcompany
|
16 |
+
~ @author Magmodules <info@magmodules.eu>
|
17 |
+
~ @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
~ @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
-->
|
20 |
+
|
21 |
+
<layout version="0.1.0">
|
22 |
+
<default>
|
23 |
+
<reference name="head">
|
24 |
+
<action method="addCss" ifconfig="feedbackcompany/general/enabled">
|
25 |
+
<stylesheet>magmodules/feedbackcompany/sidebar.css</stylesheet>
|
26 |
+
</action>
|
27 |
+
</reference>
|
28 |
+
<reference name="left">
|
29 |
+
<block type="feedbackcompany/sidebar" name="left.feedbackcompany"
|
30 |
+
template="magmodules/feedbackcompany/sidebar/left.phtml"/>
|
31 |
+
</reference>
|
32 |
+
<reference name="right">
|
33 |
+
<block type="feedbackcompany/sidebar" name="right.feedbackcompany"
|
34 |
+
template="magmodules/feedbackcompany/sidebar/right.phtml"/>
|
35 |
+
</reference>
|
36 |
+
<reference name="header">
|
37 |
+
<block type="feedbackcompany/header" name="header.feedbackcompany" as="topFeedbackcompany"/>
|
38 |
+
</reference>
|
39 |
+
</default>
|
40 |
+
<feedbackcompany_index_index>
|
41 |
+
<reference name="root">
|
42 |
+
<action method="setTemplate">
|
43 |
+
<template>page/2columns-left.phtml</template>
|
44 |
+
</action>
|
45 |
+
</reference>
|
46 |
+
<reference name="head">
|
47 |
+
<action method="addCss">
|
48 |
+
<stylesheet>magmodules/feedbackcompany/style.css</stylesheet>
|
49 |
+
</action>
|
50 |
+
<action method="addCss">
|
51 |
+
<stylesheet>magmodules/feedbackcompany/glyphicons-free.css</stylesheet>
|
52 |
+
</action>
|
53 |
+
</reference>
|
54 |
+
<reference name="content">
|
55 |
+
<block type="feedbackcompany/reviews" name="feedbackcompany.index"
|
56 |
+
template="magmodules/feedbackcompany/index.phtml"/>
|
57 |
+
</reference>
|
58 |
+
<reference name="left">
|
59 |
+
<remove name="left.feedbackcompany"/>
|
60 |
+
</reference>
|
61 |
+
<reference name="right">
|
62 |
+
<remove name="right.feedbackcompany"/>
|
63 |
+
</reference>
|
64 |
+
</feedbackcompany_index_index>
|
65 |
</layout>
|
app/design/frontend/base/default/template/magmodules/feedbackcompany/index.phtml
CHANGED
@@ -3,7 +3,6 @@
|
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,129 +11,147 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
-
|
|
|
23 |
?>
|
24 |
<div class="feedbackcompany" itemscope itemtype="http://schema.org/Organization">
|
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 |
-
<div class="total-feedbackcompany total-feedbackcompany-mobile">
|
53 |
-
<?php if($stats->getVotes()): ?>
|
54 |
-
<?php echo $this->__('%s/%s with %s reviews', '<span>' . $stats->getScore() . '</span>', '<span>100</span>', '<span>' . $stats->getVotes() . '</span>'); ?>
|
55 |
-
<div class="total-block-stars"><span style="width: <?php echo $stats->getScore(); ?>%"></span></div>
|
56 |
-
<?php endif; ?>
|
57 |
-
</div>
|
58 |
-
<!-- END Mobile only -->
|
59 |
-
|
60 |
-
<?php if($reviews->getSize()): ?>
|
61 |
-
<div class="content-feedbackcompany">
|
62 |
-
<div class="about-feedbackcompany">
|
63 |
-
<?php echo $this->getPageIntro(); ?>
|
64 |
-
</div>
|
65 |
-
</div>
|
66 |
-
<?php foreach($reviews as $review): ?>
|
67 |
-
<div class="review-list" itemprop="review" itemscope itemtype="http://schema.org/Review">
|
68 |
-
<div class="review-header">
|
69 |
-
<?php if($review->getScore()): ?>
|
70 |
-
<ul class="overall">
|
71 |
-
<li>
|
72 |
-
<div class="total-block-stars-small" itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating">
|
73 |
-
<span style="width: <?php echo $review->getScore() * 20; ?>%"></span>
|
74 |
-
<meta itemprop="worstRating" content="1" />
|
75 |
-
<meta itemprop="ratingValue" content="<?php echo $review->getScore(); ?>" />
|
76 |
-
<meta itemprop="bestRating" content="5" />
|
77 |
-
</div>
|
78 |
-
</li>
|
79 |
-
</ul>
|
80 |
-
<?php endif; ?>
|
81 |
-
<h4><span itemprop="author"><?php echo ($review->getCustomerName() ?: $this->__('Anonymous')); ?></span> - <meta itemprop="datePublished" content="<?php echo $review->getDateCreated(); ?>"><?php echo Mage::helper('core')->formatDate($review->getDateCreated(), 'long', false); ?></h4>
|
82 |
-
</div>
|
83 |
-
<div class="review-content">
|
84 |
-
<div class="experience">
|
85 |
-
<p>
|
86 |
-
<?php if($review->getReviewText()): ?>
|
87 |
-
<span itemprop="description"><?php echo nl2br($review->getReviewText()); ?></span>
|
88 |
-
<?php else: ?>
|
89 |
-
|
90 |
-
<?php endif; ?>
|
91 |
-
<?php if($response = $review->getCompanyResponse()): ?>
|
92 |
-
<div class="company_response top"><?php echo $response; ?></div>
|
93 |
-
<?php endif; ?>
|
94 |
-
</p>
|
95 |
-
</div>
|
96 |
-
<dl class="dl-feedback">
|
97 |
-
<?php if($text_comment = $review->getTextComment()): ?>
|
98 |
-
<dt class="upper"><span class="sprites-icon sprites-icon-comment"></span><?php echo $this->__('Store Comment'); ?></dt><dd class="upper"><?php echo ucfirst($text_comment); ?></dd>
|
99 |
-
<?php endif; ?>
|
100 |
-
|
101 |
-
<?php if($text_positive = $review->getTextPositive()): ?>
|
102 |
-
<dt class="upper"><span class="sprites-icon sprites-icon-tick"></span><?php echo $this->__('Positive'); ?></dt><dd class="upper"><?php echo ucfirst($text_positive); ?></dd>
|
103 |
-
<?php endif; ?>
|
104 |
-
|
105 |
-
<?php if($text_improvements = $review->getTextImprovements()): ?>
|
106 |
-
<dt class="upper"><span class="sprites-icon sprites-icon-brush"></span><?php echo $this->__('Improvements'); ?></dt><dd class="upper"><?php echo ucfirst($text_improvements); ?></dd>
|
107 |
-
<?php endif; ?>
|
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 |
</div>
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
+
$reviews = $this->getReviews();
|
21 |
+
$stats = $this->getStats();
|
22 |
+
$helper = Mage::helper('feedbackcompany');
|
23 |
?>
|
24 |
<div class="feedbackcompany" itemscope itemtype="http://schema.org/Organization">
|
25 |
+
<div class="page-title">
|
26 |
+
<div class="flexbox-container">
|
27 |
+
<h1><?php echo $this->__('The Feedback Company'); ?></h1>
|
28 |
+
<div class="header-floating-feedbackcompany">
|
29 |
+
<!-- Desktop only -->
|
30 |
+
<div class="total-feedbackcompany" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
|
31 |
+
<?php if ($stats->getVotes()) { ?>
|
32 |
+
<div class="total-block-stars-medium">
|
33 |
+
<span style="width: <?php echo $stats->getScore(); ?>%;"></span>
|
34 |
+
</div>
|
35 |
+
<div class="total-description">
|
36 |
+
<?php echo $this->__('%s/%s with %s reviews',
|
37 |
+
'<span itemprop="ratingValue">' . $stats->getScore() . '</span>',
|
38 |
+
'<span itemprop="bestRating">100</span>',
|
39 |
+
'<span itemprop="ratingCount">' . $stats->getVotes() . '</span>'); ?>
|
40 |
+
</div>
|
41 |
+
<?php } ?>
|
42 |
+
</div>
|
43 |
+
<!-- END Desktop only -->
|
44 |
+
<?php if ($review_url = $this->getReviewUrl()) { ?>
|
45 |
+
<button class="button" onclick="setLocation('<?php echo $review_url; ?>')">
|
46 |
+
<span><?php echo $this->__('Write review'); ?></span>
|
47 |
+
</button>
|
48 |
+
<?php } ?>
|
49 |
+
</div>
|
50 |
+
</div>
|
51 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
|
53 |
+
<!-- Mobile only -->
|
54 |
+
<div class="total-feedbackcompany total-feedbackcompany-mobile">
|
55 |
+
<?php if ($stats->getVotes()) { ?>
|
56 |
+
<?php echo $this->__('%s/%s with %s reviews', '<span>' . $stats->getScore() . '</span>', '<span>100</span>',
|
57 |
+
'<span>' . $stats->getVotes() . '</span>'); ?>
|
58 |
+
<div class="total-block-stars"><span style="width: <?php echo $stats->getScore(); ?>%"></span></div>
|
59 |
+
<?php } ?>
|
60 |
+
</div>
|
61 |
+
<!-- END Mobile only -->
|
62 |
|
63 |
+
<?php if ($reviews->getSize()) { ?>
|
64 |
+
<div class="content-feedbackcompany">
|
65 |
+
<div class="about-feedbackcompany">
|
66 |
+
<?php echo $this->getPageIntro(); ?>
|
67 |
+
</div>
|
68 |
+
</div>
|
69 |
+
<?php foreach ($reviews as $review): ?>
|
70 |
+
<div class="review-list" itemprop="review" itemscope itemtype="http://schema.org/Review">
|
71 |
+
<div class="review-header">
|
72 |
+
<?php if ($review->getScore()) { ?>
|
73 |
+
<ul class="overall">
|
74 |
+
<li>
|
75 |
+
<div class="total-block-stars-small" itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating">
|
76 |
+
<span style="width: <?php echo $review->getScore() * 20; ?>%"></span>
|
77 |
+
<meta itemprop="worstRating" content="1"/>
|
78 |
+
<meta itemprop="ratingValue" content="<?php echo $review->getScore(); ?>"/>
|
79 |
+
<meta itemprop="bestRating" content="5"/>
|
80 |
+
</div>
|
81 |
+
</li>
|
82 |
+
</ul>
|
83 |
+
<?php } ?>
|
84 |
+
<h4>
|
85 |
+
<span itemprop="author">
|
86 |
+
<?php echo($review->getCustomerName() ?: $this->__('Anonymous')); ?>
|
87 |
+
</span>
|
88 |
+
-
|
89 |
+
<meta itemprop="datePublished" content="<?php echo $review->getDateCreated(); ?>">
|
90 |
+
<?php echo Mage::helper('core')->formatDate($review->getDateCreated(), 'long', false); ?>
|
91 |
+
</h4>
|
92 |
+
</div>
|
93 |
+
<div class="review-content">
|
94 |
+
<div class="experience">
|
95 |
+
<?php if ($review->getReviewText()) { ?>
|
96 |
+
<span itemprop="description">
|
97 |
+
<?php echo nl2br($review->getReviewText()); ?>
|
98 |
+
</span>
|
99 |
+
<?php } ?>
|
100 |
+
<?php if ($response = $review->getCompanyResponse()) { ?>
|
101 |
+
<div class="company_response top">
|
102 |
+
<?php echo $response; ?>
|
103 |
+
</div>
|
104 |
+
<?php } ?>
|
105 |
+
</div>
|
106 |
+
<dl class="dl-feedback">
|
107 |
+
<?php if ($buyOnline = $review->getBuyOnline()) { ?>
|
108 |
+
<dt><?php echo $this->__('Buy Online'); ?></dt>
|
109 |
+
<dd><?php echo ucfirst($buyOnline); ?></dd>
|
110 |
+
<?php } ?>
|
111 |
+
<?php if ($sex = $review->getCustomerSex()) { ?>
|
112 |
+
<dt><?php echo $this->__('Gender'); ?></dt>
|
113 |
+
<dd><?php echo ucfirst($sex); ?></dd>
|
114 |
+
<?php } ?>
|
115 |
+
<?php if ($city = $review->getCustomerCiy()) { ?>
|
116 |
+
<dt><?php echo $this->__('City'); ?></dt>
|
117 |
+
<dd><?php echo ucfirst($city); ?></dd>
|
118 |
+
<?php } ?>
|
119 |
+
<?php if ($country = $review->getCustomerCountry()) { ?>
|
120 |
+
<dt><?php echo $this->__('Country'); ?></dt>
|
121 |
+
<dd><?php echo ucfirst($country); ?></dd>
|
122 |
+
<?php } ?>
|
123 |
+
<?php if ($customer_recommend = $helper->getCustomerRecommend($review->getCustomerRecommend())) { ?>
|
124 |
+
<dt><?php echo $this->__('Recommend'); ?></dt>
|
125 |
+
<dd><?php echo ucfirst($customer_recommend); ?></dd>
|
126 |
+
<?php } ?>
|
127 |
+
</dl>
|
128 |
+
<dl class="summary-index">
|
129 |
+
<div class="column">
|
130 |
+
<?php
|
131 |
+
$questions = $helper->getQuestions($review->getQuestions(), true, 'score');
|
132 |
+
$half = ceil(count($questions) / 2);
|
133 |
+
$i = 0;
|
134 |
+
?>
|
135 |
+
<?php foreach ($questions as $question) { ?>
|
136 |
+
<dt><?php echo $question['Reviewtitle'] ?></dt>
|
137 |
+
<dd>
|
138 |
+
<div class="total-block-stars-grey">
|
139 |
+
<span style="width: <?php echo($question['value'] * 20); ?>%"></span>
|
140 |
+
</div>
|
141 |
+
</dd>
|
142 |
+
<?php if (++$i == $half) {
|
143 |
+
echo '</div><div class="column">';
|
144 |
+
} ?>
|
145 |
+
<?php } ?>
|
146 |
+
</div>
|
147 |
+
</dl>
|
148 |
+
</div>
|
149 |
+
</div>
|
150 |
+
<?php endforeach; ?>
|
151 |
+
<?php echo $this->getPagerHtml(); ?>
|
152 |
+
<?php } else { ?>
|
153 |
+
<p class="note-msg">
|
154 |
+
<?php echo $this->__('No reviews found...'); ?>
|
155 |
+
</p>
|
156 |
+
<?php } ?>
|
157 |
</div>
|
app/design/frontend/base/default/template/magmodules/feedbackcompany/sidebar/left.phtml
CHANGED
@@ -1,10 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Magmodules.eu
|
4 |
-
* http://www.magmodules.eu
|
5 |
*
|
6 |
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
* that is bundled with this package in the file LICENSE.txt.
|
10 |
* It is also available through the world-wide-web at this URL:
|
@@ -13,58 +11,85 @@
|
|
13 |
* obtain it through the world-wide-web, please send an email
|
14 |
* to info@magmodules.eu so we can send you a copy immediately.
|
15 |
*
|
16 |
-
* @category
|
17 |
-
* @package
|
18 |
-
* @author
|
19 |
-
* @copyright
|
20 |
-
* @license
|
21 |
*/
|
22 |
-
|
23 |
-
|
24 |
-
?>
|
25 |
-
<?php if($sidebarreviews && $total): ?>
|
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 |
<?php endif; ?>
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu
|
|
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
+
$sidebarreviews = $this->getSidebarCollection('left');
|
21 |
+
$total = $this->getTotalScore();
|
22 |
+
?>
|
23 |
+
<?php if ($sidebarreviews && $total): ?>
|
24 |
+
<div class="block feedbackcompany-sidebar">
|
25 |
+
<div class="block-title">
|
26 |
+
<strong>
|
27 |
+
<span><?php echo $this->__('Feedbackcompany') ?></span>
|
28 |
+
</strong>
|
29 |
+
</div>
|
30 |
+
<?php if ($total->getPercentage() > 0): ?>
|
31 |
+
<?php if ($this->getSnippetsEnabled('left')): ?>
|
32 |
+
<div class="block-content" itemscope itemtype="http://schema.org/WebPage">
|
33 |
+
<div class="total-block-stars">
|
34 |
+
<span style="width: <?php echo $total->getPercentage(); ?>%"></span>
|
35 |
+
</div>
|
36 |
+
<div class="total-block-text" itemprop="aggregateRating" itemscope
|
37 |
+
itemtype="http://schema.org/AggregateRating">
|
38 |
+
<p>
|
39 |
+
<strong>
|
40 |
+
<span itemprop="ratingValue"><?php echo $total->getStarsQty(); ?></span> /
|
41 |
+
<span itemprop="bestRating">10</span>
|
42 |
+
</strong>
|
43 |
+
</p>
|
44 |
+
<p class="based-on">
|
45 |
+
<?php echo $this->__('Based on %s reviews', '<span itemprop="ratingCount">' . $total->getVotes() . '</span>'); ?>
|
46 |
+
</p>
|
47 |
+
</div>
|
48 |
+
</div>
|
49 |
+
<?php else: ?>
|
50 |
+
<div class="block-content">
|
51 |
+
<div class="total-block-stars">
|
52 |
+
<span style="width: <?php echo $total->getPercentage(); ?>%"></span>
|
53 |
+
</div>
|
54 |
+
<div class="total-block-text">
|
55 |
+
<p>
|
56 |
+
<strong>
|
57 |
+
<?php echo $total->getStarsQty(); ?> / 10
|
58 |
+
</strong>
|
59 |
+
</p>
|
60 |
+
<p class="based-on">
|
61 |
+
<?php echo $this->__('Based on %s reviews', '<span itemprop="ratingCount">' . $total->getVotes() . '</span>'); ?>
|
62 |
+
</p>
|
63 |
+
</div>
|
64 |
+
</div>
|
65 |
+
<?php endif; ?>
|
66 |
+
<?php endif; ?>
|
67 |
+
<?php $i = 0;
|
68 |
+
foreach ($sidebarreviews as $sidebarreview): ?>
|
69 |
+
<?php $content = $this->formatContent($sidebarreview, 'left'); ?>
|
70 |
+
<div class="block-content">
|
71 |
+
<div class="feedbackcompany-sidebar-block">
|
72 |
+
<p>
|
73 |
+
<u><?php echo $sidebarreview->getCustomerName(); ?></u>: "<?php echo $content; ?>"
|
74 |
+
</p>
|
75 |
+
<span class="rating-name">
|
76 |
+
<?php echo Mage::helper('core')->formatDate($sidebarreview->getDateCreated(), 'medium', false); ?>
|
77 |
+
</span>
|
78 |
+
<?php if ($sidebarreview->getScore()): ?>
|
79 |
+
<span class="rating-empty">
|
80 |
+
<span class="rating-star-<?php echo $sidebarreview->getScore(); ?>"></span>
|
81 |
+
</span>
|
82 |
+
<?php endif; ?>
|
83 |
+
</div>
|
84 |
+
</div>
|
85 |
+
<?php endforeach; ?>
|
86 |
+
<?php if ($reviewurl = $this->getReviewsUrl('left')): ?>
|
87 |
+
<div class="block-content">
|
88 |
+
<img src="<?php echo $this->getSkinUrl('magmodules/feedbackcompany/images/logo.png'); ?>" class="feedbackcompany-logo">
|
89 |
+
<div class="actions">
|
90 |
+
<?php echo $reviewurl; ?>
|
91 |
+
</div>
|
92 |
+
</div>
|
93 |
+
<?php endif; ?>
|
94 |
+
</div>
|
95 |
<?php endif; ?>
|
app/design/frontend/base/default/template/magmodules/feedbackcompany/sidebar/right.phtml
CHANGED
@@ -1,10 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Magmodules.eu
|
4 |
-
* http://www.magmodules.eu
|
5 |
*
|
6 |
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
* that is bundled with this package in the file LICENSE.txt.
|
10 |
* It is also available through the world-wide-web at this URL:
|
@@ -13,58 +11,85 @@
|
|
13 |
* obtain it through the world-wide-web, please send an email
|
14 |
* to info@magmodules.eu so we can send you a copy immediately.
|
15 |
*
|
16 |
-
* @category
|
17 |
-
* @package
|
18 |
-
* @author
|
19 |
-
* @copyright
|
20 |
-
* @license
|
21 |
*/
|
22 |
-
|
23 |
-
|
24 |
-
?>
|
25 |
-
<?php if($sidebarreviews && $total): ?>
|
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 |
<?php endif; ?>
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu
|
|
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
+
$sidebarreviews = $this->getSidebarCollection('right');
|
21 |
+
$total = $this->getTotalScore();
|
22 |
+
?>
|
23 |
+
<?php if ($sidebarreviews && $total): ?>
|
24 |
+
<div class="block feedbackcompany-sidebar">
|
25 |
+
<div class="block-title">
|
26 |
+
<strong>
|
27 |
+
<span><?php echo $this->__('Feedbackcompany') ?></span>
|
28 |
+
</strong>
|
29 |
+
</div>
|
30 |
+
<?php if ($total->getPercentage() > 0): ?>
|
31 |
+
<?php if ($this->getSnippetsEnabled('right')): ?>
|
32 |
+
<div class="block-content" itemscope itemtype="http://schema.org/WebPage">
|
33 |
+
<div class="total-block-stars">
|
34 |
+
<span style="width: <?php echo $total->getPercentage(); ?>%"></span>
|
35 |
+
</div>
|
36 |
+
<div class="total-block-text" itemprop="aggregateRating" itemscope
|
37 |
+
itemtype="http://schema.org/AggregateRating">
|
38 |
+
<p>
|
39 |
+
<strong>
|
40 |
+
<span itemprop="ratingValue"><?php echo $total->getStarsQty(); ?></span> /
|
41 |
+
<span itemprop="bestRating">10</span>
|
42 |
+
</strong>
|
43 |
+
</p>
|
44 |
+
<p class="based-on">
|
45 |
+
<?php echo $this->__('Based on %s reviews', '<span itemprop="ratingCount">' . $total->getVotes() . '</span>'); ?>
|
46 |
+
</p>
|
47 |
+
</div>
|
48 |
+
</div>
|
49 |
+
<?php else: ?>
|
50 |
+
<div class="block-content">
|
51 |
+
<div class="total-block-stars">
|
52 |
+
<span style="width: <?php echo $total->getPercentage(); ?>%"></span>
|
53 |
+
</div>
|
54 |
+
<div class="total-block-text">
|
55 |
+
<p>
|
56 |
+
<strong>
|
57 |
+
<?php echo $total->getStarsQty(); ?> / 10
|
58 |
+
</strong>
|
59 |
+
</p>
|
60 |
+
<p class="based-on">
|
61 |
+
<?php echo $this->__('Based on %s reviews', '<span itemprop="ratingCount">' . $total->getVotes() . '</span>'); ?>
|
62 |
+
</p>
|
63 |
+
</div>
|
64 |
+
</div>
|
65 |
+
<?php endif; ?>
|
66 |
+
<?php endif; ?>
|
67 |
+
<?php $i = 0;
|
68 |
+
foreach ($sidebarreviews as $sidebarreview): ?>
|
69 |
+
<?php $content = $this->formatContent($sidebarreview, 'right'); ?>
|
70 |
+
<div class="block-content">
|
71 |
+
<div class="feedbackcompany-sidebar-block">
|
72 |
+
<p>
|
73 |
+
<u><?php echo $sidebarreview->getCustomerName(); ?></u>: "<?php echo $content; ?>"
|
74 |
+
</p>
|
75 |
+
<span class="rating-name">
|
76 |
+
<?php echo Mage::helper('core')->formatDate($sidebarreview->getDateCreated(), 'medium', false); ?>
|
77 |
+
</span>
|
78 |
+
<?php if ($sidebarreview->getScore()): ?>
|
79 |
+
<span class="rating-empty">
|
80 |
+
<span class="rating-star-<?php echo $sidebarreview->getScore(); ?>"></span>
|
81 |
+
</span>
|
82 |
+
<?php endif; ?>
|
83 |
+
</div>
|
84 |
+
</div>
|
85 |
+
<?php endforeach; ?>
|
86 |
+
<?php if ($reviewurl = $this->getReviewsUrl('right')): ?>
|
87 |
+
<div class="block-content">
|
88 |
+
<img src="<?php echo $this->getSkinUrl('magmodules/feedbackcompany/images/logo.png'); ?>" class="feedbackcompany-logo">
|
89 |
+
<div class="actions">
|
90 |
+
<?php echo $reviewurl; ?>
|
91 |
+
</div>
|
92 |
+
</div>
|
93 |
+
<?php endif; ?>
|
94 |
+
</div>
|
95 |
<?php endif; ?>
|
app/design/frontend/base/default/template/magmodules/feedbackcompany/widget/header.phtml
CHANGED
@@ -1,10 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Magmodules.eu
|
4 |
-
* http://www.magmodules.eu
|
5 |
*
|
6 |
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
* that is bundled with this package in the file LICENSE.txt.
|
10 |
* It is also available through the world-wide-web at this URL:
|
@@ -13,29 +11,53 @@
|
|
13 |
* obtain it through the world-wide-web, please send an email
|
14 |
* to info@magmodules.eu so we can send you a copy immediately.
|
15 |
*
|
16 |
-
* @category
|
17 |
-
* @package
|
18 |
-
* @author
|
19 |
-
* @copyright
|
20 |
-
* @license
|
21 |
*/
|
22 |
-
|
23 |
-
|
24 |
?>
|
25 |
<div id="feedbackcompany-header-widget" class="skip-content">
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
</div>
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu
|
|
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
+
$stats = $this->getTotals();
|
21 |
+
$link = $this->getReviewsUrl();
|
22 |
?>
|
23 |
<div id="feedbackcompany-header-widget" class="skip-content">
|
24 |
+
<?php if ($this->getSnippetsEnabled()): ?>
|
25 |
+
<div itemscope itemtype="http://schema.org/WebPage">
|
26 |
+
<div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
|
27 |
+
<?php
|
28 |
+
if ($link) {
|
29 |
+
echo '<a href="' . $link . '" target="_blank">';
|
30 |
+
}
|
31 |
+
?>
|
32 |
+
<?php
|
33 |
+
echo $this->__('%s/%s with %s reviews',
|
34 |
+
'<span itemprop="ratingValue">' . $stats->getScore() . '</span>',
|
35 |
+
'<span itemprop="bestRating">' . $stats->getScoremax() . '</span>',
|
36 |
+
'<span itemprop="ratingCount">' . $stats->getVotes() . '</span>');
|
37 |
+
?>
|
38 |
+
<div class="total-block-stars-small">
|
39 |
+
<span style="width: <?php echo $stats->getPercentage(); ?>%"></span></div>
|
40 |
+
<?php
|
41 |
+
if ($link) {
|
42 |
+
echo '</a>';
|
43 |
+
}
|
44 |
+
?>
|
45 |
+
</div>
|
46 |
+
</div>
|
47 |
+
<?php else: ?>
|
48 |
+
<?php
|
49 |
+
if ($link) {
|
50 |
+
echo '<a href="' . $link . '" target="_blank">';
|
51 |
+
}
|
52 |
+
?>
|
53 |
+
<?php echo $this->__('%s/%s with %s reviews', $stats->getScore(), $stats->getScoremax(), $stats->getVotes()); ?>
|
54 |
+
<div class="total-block-stars-small">
|
55 |
+
<span style="width: <?php echo $stats->getPercentage(); ?>%"></span>
|
56 |
+
</div>
|
57 |
+
<?php
|
58 |
+
if ($link) {
|
59 |
+
echo '</a>';
|
60 |
+
}
|
61 |
+
?>
|
62 |
+
<?php endif; ?>
|
63 |
</div>
|
app/design/frontend/base/default/template/magmodules/feedbackcompany/widget/medium.phtml
CHANGED
@@ -3,7 +3,6 @@
|
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,57 +11,66 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
-
|
23 |
-
|
|
|
24 |
<div class="feedbackcompany-medium-widget">
|
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 |
</div>
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
+
$total = $this->getTotals();
|
21 |
+
$link = $this->getReviewsUrl('medium');
|
22 |
+
$logo = $this->getSkinUrl('magmodules/feedbackcompany/images/logo.png', array('_secure' => true));
|
23 |
+
?>
|
24 |
<div class="feedbackcompany-medium-widget">
|
25 |
+
<div class="feedbackcompany-medium-widget-content">
|
26 |
+
<?php if ($this->getSnippetsEnabled('medium')) { ?>
|
27 |
+
<div itemscope itemtype="http://schema.org/WebPage">
|
28 |
+
<?php if ($link) { ?>
|
29 |
+
<a href="<?php echo $link; ?>" target="_blank">
|
30 |
+
<img src="<?php echo $logo; ?>" class="feedbackcompany-medium-image">
|
31 |
+
</a>
|
32 |
+
<?php } else { ?>
|
33 |
+
<img src="<?php echo $logo; ?>" class="feedbackcompany-medium-image">
|
34 |
+
<?php } ?>
|
35 |
+
<div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
|
36 |
+
<?php echo $this->getHtmlStars($total->getPercentage(), 'medium'); ?>
|
37 |
+
<p class="feedbackcompany-small-text">
|
38 |
+
<?php if ($link) { ?>
|
39 |
+
<?php echo $this->__('Reviews from customers: %s - <a href="%s" target="_blank">%s reviews</a>', '<span itemprop="ratingValue">' . $total->getStarsQty() . '</span> / <span itemprop="bestRating">10</span>', $link, '<span itemprop="ratingCount">' . $total->getVotes() . '</span>'); ?>
|
40 |
+
<?php } else { ?>
|
41 |
+
<?php echo $this->__('Reviews from customers: %s - %s reviews', '<span itemprop="ratingValue">' . $total->getStarsQty() . '</span> / <span itemprop="bestRating">10</span>', '<span itemprop="ratingCount">' . $total->getVotes() . '</span>'); ?>
|
42 |
+
<?php } ?>
|
43 |
+
</p>
|
44 |
+
<?php if ($review = $this->getLatestReview()) { ?>
|
45 |
+
<?php echo $this->formatContent($review, 'medium'); ?>
|
46 |
+
<p class="client-details">
|
47 |
+
<?php echo $review->getCustomerName() . ', ' . Mage::helper('core')->formatDate($review->getDateCreated(), 'medium', false); ?>
|
48 |
+
</p>
|
49 |
+
<?php } ?>
|
50 |
+
</div>
|
51 |
+
</div>
|
52 |
+
<?php } else { ?>
|
53 |
+
<?php if ($link) { ?>
|
54 |
+
<a href="<?php echo $link; ?>" target="_blank">
|
55 |
+
<img src="<?php echo $logo; ?>" class="feedbackcompany-medium-image">
|
56 |
+
</a>
|
57 |
+
<?php } else { ?>
|
58 |
+
<img src="<?php echo $logo; ?>" class="feedbackcompany-medium-image">
|
59 |
+
<?php } ?>
|
60 |
+
<?php echo $this->getHtmlStars($total->getPercentage(), 'medium'); ?>
|
61 |
+
<p class="feedbackcompany-small-text">
|
62 |
+
<?php if ($link) { ?>
|
63 |
+
<?php echo $this->__('Reviews from customers: %s - <a href="%s" target="_blank">%s reviews</a>', $total->getStarsQty() . ' / 10', $link, $total->getVotes()); ?>
|
64 |
+
<?php } else { ?>
|
65 |
+
<?php echo $this->__('Reviews from customers: %s - %s reviews', $total->getStarsQty() . ' / 10', $total->getVotes()); ?>
|
66 |
+
<?php } ?>
|
67 |
+
</p>
|
68 |
+
<?php if ($review = $this->getLatestReview()) { ?>
|
69 |
+
<?php echo $this->formatContent($review, 'medium'); ?>
|
70 |
+
<p class="client-details">
|
71 |
+
<?php echo $review->getCustomerName() . ', ' . Mage::helper('core')->formatDate($review->getDateCreated(), 'medium', false); ?>
|
72 |
+
</p>
|
73 |
+
<?php } ?>
|
74 |
+
<?php } ?>
|
75 |
+
</div>
|
76 |
</div>
|
app/design/frontend/base/default/template/magmodules/feedbackcompany/widget/sidebar.phtml
CHANGED
@@ -3,7 +3,6 @@
|
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,58 +11,83 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
|
|
25 |
<div>
|
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 |
</div>
|
3 |
* Magmodules.eu - http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
+
$sidebarreviews = $this->getReviews();
|
21 |
+
$total = $this->getTotals();
|
22 |
+
$link = $this->getReviewsUrl('sidebar');
|
23 |
+
$logo = $this->getSkinUrl('magmodules/feedbackcompany/images/logo.png');
|
24 |
+
?>
|
25 |
<div>
|
26 |
+
<div class="block feedbackcompany-sidebar">
|
27 |
+
<div class="block-title">
|
28 |
+
<strong><span><?php echo $this->__('Feedbackcompany') ?></span></strong>
|
29 |
+
</div>
|
30 |
+
<?php if ($total->getPercentage() > 0): ?>
|
31 |
+
<?php if ($this->getSnippetsEnabled('block')): ?>
|
32 |
+
<div class="block-content" itemscope itemtype="http://schema.org/WebPage">
|
33 |
+
<div class="total-block-stars">
|
34 |
+
<span style="width: <?php echo $total->getPercentage(); ?>%"></span>
|
35 |
+
</div>
|
36 |
+
<div class="total-block-text" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
|
37 |
+
<p>
|
38 |
+
<strong>
|
39 |
+
<span itemprop="ratingValue"><?php echo $total->getStarsQty(); ?></span> / <span itemprop="bestRating">10</span>
|
40 |
+
</strong>
|
41 |
+
</p>
|
42 |
+
<p class="based-on">
|
43 |
+
<?php echo $this->__('Based on %s reviews', '<span itemprop="ratingCount">' . $total->getVotes() . '</span>'); ?>
|
44 |
+
</p>
|
45 |
+
</div>
|
46 |
+
</div>
|
47 |
+
<?php else: ?>
|
48 |
+
<div class="block-content">
|
49 |
+
<div class="total-block-stars">
|
50 |
+
<span style="width: <?php echo $total->getPercentage(); ?>%"></span>
|
51 |
+
</div>
|
52 |
+
<div class="total-block-text">
|
53 |
+
<p>
|
54 |
+
<strong>
|
55 |
+
<?php echo $total->getStarsQty(); ?> / 10
|
56 |
+
</strong>
|
57 |
+
</p>
|
58 |
+
<p class="based-on">
|
59 |
+
<?php echo $this->__('Based on %s reviews', '<span>' . $total->getVotes() . '</span>'); ?>
|
60 |
+
</p>
|
61 |
+
</div>
|
62 |
+
</div>
|
63 |
+
<?php endif; ?>
|
64 |
+
<?php endif; ?>
|
65 |
+
<?php $i = 0;
|
66 |
+
foreach ($sidebarreviews as $sidebarreview): ?>
|
67 |
+
<?php $content = $this->formatContent($sidebarreview, 'block'); ?>
|
68 |
+
<div class="block-content">
|
69 |
+
<div class="feedbackcompany-sidebar-block">
|
70 |
+
<p>
|
71 |
+
<u><?php echo $sidebarreview->getCustomerName(); ?></u>: "<?php echo $content; ?>"
|
72 |
+
</p>
|
73 |
+
<span class="rating-name">
|
74 |
+
<?php echo Mage::helper('core')->formatDate($sidebarreview->getDateCreated(), 'medium', false); ?>
|
75 |
+
</span>
|
76 |
+
<?php if ($sidebarreview->getScore()): ?>
|
77 |
+
<span class="rating-empty">
|
78 |
+
<span class="rating-star-<?php echo $sidebarreview->getScore(); ?>"></span>
|
79 |
+
</span>
|
80 |
+
<?php endif; ?>
|
81 |
+
</div>
|
82 |
+
</div>
|
83 |
+
<?php endforeach; ?>
|
84 |
+
<div class="block-content">
|
85 |
+
<?php if ($link) { ?>
|
86 |
+
<a href="<?php echo $link; ?>" target="_blank">
|
87 |
+
<img src="<?php echo $logo; ?>" class="feedbackcompany-logo"></a>
|
88 |
+
<?php } else { ?>
|
89 |
+
<img src="<?php echo $logo; ?>" class="feedbackcompany-logo">
|
90 |
+
<?php } ?>
|
91 |
+
</div>
|
92 |
+
</div>
|
93 |
</div>
|
app/design/frontend/base/default/template/magmodules/feedbackcompany/widget/small.phtml
CHANGED
@@ -1,10 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Magmodules.eu
|
4 |
-
* http://www.magmodules.eu
|
5 |
*
|
6 |
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
* that is bundled with this package in the file LICENSE.txt.
|
10 |
* It is also available through the world-wide-web at this URL:
|
@@ -13,39 +11,39 @@
|
|
13 |
* obtain it through the world-wide-web, please send an email
|
14 |
* to info@magmodules.eu so we can send you a copy immediately.
|
15 |
*
|
16 |
-
* @category
|
17 |
-
* @package
|
18 |
-
* @author
|
19 |
-
* @copyright
|
20 |
-
* @license
|
21 |
*/
|
22 |
-
|
23 |
-
|
24 |
-
?>
|
25 |
<div class="feedbackcompany-small-widget">
|
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 |
</div>
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu
|
|
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
+
$total = $this->getTotals();
|
21 |
+
$link = $this->getReviewsUrl('small');
|
22 |
+
?>
|
23 |
<div class="feedbackcompany-small-widget">
|
24 |
+
<?php if ($this->getSnippetsEnabled('small')) { ?>
|
25 |
+
<div itemscope itemtype="http://schema.org/WebPage">
|
26 |
+
<div class="feedbackcompany-small-score">
|
27 |
+
<div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
|
28 |
+
<?php echo $this->getHtmlStars($total->getPercentage(), 'small'); ?>
|
29 |
+
<p class="feedbackcompany-small-text">
|
30 |
+
<?php if ($link) { ?>
|
31 |
+
<?php echo $this->__('Reviews from customers: %s - <a href="%s" target="_blank">%s reviews</a>', '<span itemprop="ratingValue">' . $total->getStarsQty() . '</span> / <span itemprop="bestRating">10</span>', $link, '<span itemprop="ratingCount">' . $total->getVotes() . '</span>'); ?>
|
32 |
+
<?php } else { ?>
|
33 |
+
<?php echo $this->__('Reviews from customers: %s - %s reviews', '<span itemprop="ratingValue">' . $total->getStarsQty() . '</span> / <span itemprop="bestRating">10</span>', '<span itemprop="ratingCount">' . $total->getVotes() . '</span>'); ?>
|
34 |
+
<?php } ?>
|
35 |
+
</p>
|
36 |
+
</div>
|
37 |
+
</div>
|
38 |
+
</div>
|
39 |
+
<?php } else { ?>
|
40 |
+
<?php echo $this->getHtmlStars($total->getPercentage(), 'small'); ?>
|
41 |
+
<p class="feedbackcompany-small-text">
|
42 |
+
<?php if ($link) { ?>
|
43 |
+
<?php echo $this->__('Reviews from customers: %s - <a href="%s" target="_blank">%s reviews</a>', $total->getStarsQty() . ' / 10', $link, $total->getVotes()); ?>
|
44 |
+
<?php } else { ?>
|
45 |
+
<?php echo $this->__('Reviews from customers: %s - %s reviews', $total->getStarsQty() . ' / 10', $total->getVotes()); ?>
|
46 |
+
<?php } ?>
|
47 |
+
</p>
|
48 |
+
<?php } ?>
|
49 |
</div>
|
app/design/frontend/rwd/default/template/magmodules/feedbackcompany/widget/header.phtml
CHANGED
@@ -1,10 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Magmodules.eu
|
4 |
-
* http://www.magmodules.eu
|
5 |
*
|
6 |
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
* that is bundled with this package in the file LICENSE.txt.
|
10 |
* It is also available through the world-wide-web at this URL:
|
@@ -13,29 +11,30 @@
|
|
13 |
* obtain it through the world-wide-web, please send an email
|
14 |
* to info@magmodules.eu so we can send you a copy immediately.
|
15 |
*
|
16 |
-
* @category
|
17 |
-
* @package
|
18 |
-
* @author
|
19 |
-
* @copyright
|
20 |
-
* @license
|
21 |
*/
|
22 |
-
|
23 |
-
|
24 |
?>
|
25 |
<div id="feedbackcompany-header-widget" class="feedbackcompany-header-widget-searchbar skip-content">
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
|
|
41 |
</div>
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Magmodules.eu - http://www.magmodules.eu
|
|
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
|
|
6 |
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
* that is bundled with this package in the file LICENSE.txt.
|
8 |
* It is also available through the world-wide-web at this URL:
|
11 |
* obtain it through the world-wide-web, please send an email
|
12 |
* to info@magmodules.eu so we can send you a copy immediately.
|
13 |
*
|
14 |
+
* @category Magmodules
|
15 |
+
* @package Magmodules_Feedbackcompany
|
16 |
+
* @author Magmodules <info@magmodules.eu>
|
17 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
*/
|
20 |
+
$stats = $this->getTotals();
|
21 |
+
$link = $this->getReviewsUrl();
|
22 |
?>
|
23 |
<div id="feedbackcompany-header-widget" class="feedbackcompany-header-widget-searchbar skip-content">
|
24 |
+
<?php if ($this->getSnippetsEnabled()): ?>
|
25 |
+
<div itemscope itemtype="http://schema.org/WebPage">
|
26 |
+
<div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
|
27 |
+
<?php if ($link) echo '<a href="' . $link . '" target="_blank">'; ?>
|
28 |
+
<?php echo $this->__('%s/%s with %s reviews', '<span itemprop="ratingValue">' . $stats->getScore() . '</span>', '<span itemprop="bestRating">' . $stats->getScoremax() . '</span>', '<span itemprop="ratingCount">' . $stats->getVotes() . '</span>'); ?>
|
29 |
+
<div class="total-block-stars-small"><span
|
30 |
+
style="width: <?php echo $stats->getPercentage(); ?>%"></span></div>
|
31 |
+
<?php if ($link) echo '</a>'; ?>
|
32 |
+
</div>
|
33 |
+
</div>
|
34 |
+
<?php else: ?>
|
35 |
+
<?php if ($link) echo '<a href="' . $link . '" target="_blank">'; ?>
|
36 |
+
<?php echo $this->__('%s/%s with %s reviews', $stats->getScore(), $stats->getScoremax(), $stats->getVotes()); ?>
|
37 |
+
<div class="total-block-stars-small"><span style="width: <?php echo $stats->getPercentage(); ?>%"></span></div>
|
38 |
+
<?php if ($link) echo '</a>'; ?>
|
39 |
+
<?php endif; ?>
|
40 |
</div>
|
app/etc/modules/Magmodules_Feedbackcompany.xml
CHANGED
@@ -1,9 +1,27 @@
|
|
1 |
<?xml version="1.0"?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
<config>
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
</config>
|
1 |
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
~ Magmodules.eu - http://www.magmodules.eu
|
4 |
+
~
|
5 |
+
~ NOTICE OF LICENSE
|
6 |
+
~ This source file is subject to the Open Software License (OSL 3.0)
|
7 |
+
~ that is bundled with this package in the file LICENSE.txt.
|
8 |
+
~ It is also available through the world-wide-web at this URL:
|
9 |
+
~ http://opensource.org/licenses/osl-3.0.php
|
10 |
+
~ If you did not receive a copy of the license and are unable to
|
11 |
+
~ obtain it through the world-wide-web, please send an email
|
12 |
+
~ to info@magmodules.eu so we can send you a copy immediately.
|
13 |
+
~
|
14 |
+
~ @category Magmodules
|
15 |
+
~ @package Magmodules_Feedbackcompany
|
16 |
+
~ @author Magmodules <info@magmodules.eu>
|
17 |
+
~ @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
18 |
+
~ @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
-->
|
20 |
<config>
|
21 |
+
<modules>
|
22 |
+
<Magmodules_Feedbackcompany>
|
23 |
+
<active>true</active>
|
24 |
+
<codePool>community</codePool>
|
25 |
+
</Magmodules_Feedbackcompany>
|
26 |
+
</modules>
|
27 |
</config>
|
app/locale/nl_NL/Magmodules_Feedbackcompany.csv
CHANGED
@@ -46,7 +46,7 @@
|
|
46 |
"The Feedbackcompany Overview Page","The Feedbackcompany Pagina"
|
47 |
"The Feedbackcompany Reviews Sidebar","The Feedbackcompany Sidebar"
|
48 |
"The Feedback Company Invitation Email","The Feedback Company Email Uitnodiging"
|
49 |
-
"The Feedbackcompany Shop Reviews,"The Feedbackcompany Winkelreviews"
|
50 |
"There is an older version detected on the server, please remove the directory <u>app/code/local/Magmodules/Feedbackcompany</u> from your server using FTP and flush cache.","Er is een oudere versie van de extensie aangetroffen op de server, verwijder de directory <u>app/code/local/Magmodules/Feedbackcompany</u> van uw server middels FTP en flush de cache."
|
51 |
"Female","Vrouwlijk"
|
52 |
"Filter Options","Filter opties"
|
@@ -62,7 +62,7 @@
|
|
62 |
"Invitation Call","Herinnering e-mail"
|
63 |
"Import all reviews","Importeer alle beoordelingen"
|
64 |
"The Feedback Company Invitation email","The Feedback Company - Email uitnodigingen"
|
65 |
-
"Invitation
|
66 |
"Last Update","Laatste Update"
|
67 |
"Leadtime:","Doorlooptijd:"
|
68 |
"Left","Links"
|
@@ -99,6 +99,7 @@
|
|
99 |
"Repsonsetime:","Reactietijd:"
|
100 |
"Resend if Double","Stuur opnieuw indien dubbel"
|
101 |
"Review","Beoordeling"
|
|
|
102 |
"Reviews","Beoordelingen"
|
103 |
"Reviews from customers: %s - %s reviews","Klantenscore %s op basis van %s beoordelingen"
|
104 |
"Reviews from customers: %s - <a href=""%s"" target=""_blank"">%s reviews</a>","Klantenscore: %s op basis van <a href=""%s"" target=""_blank"">%s beoordelingen</a>"
|
@@ -118,7 +119,7 @@
|
|
118 |
"Sometimes","Soms"
|
119 |
"Stats Cron","Statistieken Cron"
|
120 |
"Strong:","Sterk:"
|
121 |
-
"Specify at which status you want to send the invitation. Default is ""Completed"","Specificeer vanaf welke status de herinnering verzonden dient te worden. Standaard is ""Completed""
|
122 |
"Succefully deleted all %s saved review(s).","Alle %s opgeslagen beoordelingen zijn succesvol verwijdert."
|
123 |
"Test API","Test API"
|
124 |
"Text of the product link, use {{name}} to show the productname.","Tekst van de productlink, gebruik {{name}} om de productnaam weer te geven."
|
@@ -142,7 +143,7 @@
|
|
142 |
"Type","Type"
|
143 |
"The Feedbackcompany Blocks","The Feedbackcompany Blokken"
|
144 |
"Update Review History","Update Beoordeling historie"
|
145 |
-
"Update Reviews","Update beoordelingen"
|
146 |
"Update Summary","Update samenvatting"
|
147 |
"Use Cronjob","Gebruik Cronjob"
|
148 |
"Use the Magento Cronjob to use the automatically import. A cronjob is a daemon which keeps running and gets activated at a said interval (time period). Please make sure your default Magento Cron is working. If not, contact your hosting company for help.","Gebruik de Magento Cronjob om de beoordelingen automatisch te importeren. Controleer hiervoor wel of de Magento cronjob juist functioneert, mocht dit niet het geval zijn dan raden wij u aan contact op te nemen met uw hostingpartij."
|
46 |
"The Feedbackcompany Overview Page","The Feedbackcompany Pagina"
|
47 |
"The Feedbackcompany Reviews Sidebar","The Feedbackcompany Sidebar"
|
48 |
"The Feedback Company Invitation Email","The Feedback Company Email Uitnodiging"
|
49 |
+
"The Feedbackcompany Shop Reviews","The Feedbackcompany Winkelreviews"
|
50 |
"There is an older version detected on the server, please remove the directory <u>app/code/local/Magmodules/Feedbackcompany</u> from your server using FTP and flush cache.","Er is een oudere versie van de extensie aangetroffen op de server, verwijder de directory <u>app/code/local/Magmodules/Feedbackcompany</u> van uw server middels FTP en flush de cache."
|
51 |
"Female","Vrouwlijk"
|
52 |
"Filter Options","Filter opties"
|
62 |
"Invitation Call","Herinnering e-mail"
|
63 |
"Import all reviews","Importeer alle beoordelingen"
|
64 |
"The Feedback Company Invitation email","The Feedback Company - Email uitnodigingen"
|
65 |
+
"Invitation mail is sent only for order above this value. Use 0 for no minimum.","De herinnering wordt alleen verstuurd boven deze orderwaarde. Gebruik 0 om geen minimum in te stellen."
|
66 |
"Last Update","Laatste Update"
|
67 |
"Leadtime:","Doorlooptijd:"
|
68 |
"Left","Links"
|
99 |
"Repsonsetime:","Reactietijd:"
|
100 |
"Resend if Double","Stuur opnieuw indien dubbel"
|
101 |
"Review","Beoordeling"
|
102 |
+
"Read More","Lees meer"
|
103 |
"Reviews","Beoordelingen"
|
104 |
"Reviews from customers: %s - %s reviews","Klantenscore %s op basis van %s beoordelingen"
|
105 |
"Reviews from customers: %s - <a href=""%s"" target=""_blank"">%s reviews</a>","Klantenscore: %s op basis van <a href=""%s"" target=""_blank"">%s beoordelingen</a>"
|
119 |
"Sometimes","Soms"
|
120 |
"Stats Cron","Statistieken Cron"
|
121 |
"Strong:","Sterk:"
|
122 |
+
"Specify at which status you want to send the invitation. Default is ""Completed"".","Specificeer vanaf welke status de herinnering verzonden dient te worden. Standaard is ""Completed""."
|
123 |
"Succefully deleted all %s saved review(s).","Alle %s opgeslagen beoordelingen zijn succesvol verwijdert."
|
124 |
"Test API","Test API"
|
125 |
"Text of the product link, use {{name}} to show the productname.","Tekst van de productlink, gebruik {{name}} om de productnaam weer te geven."
|
143 |
"Type","Type"
|
144 |
"The Feedbackcompany Blocks","The Feedbackcompany Blokken"
|
145 |
"Update Review History","Update Beoordeling historie"
|
146 |
+
"Update Reviews","Update beoordelingen"
|
147 |
"Update Summary","Update samenvatting"
|
148 |
"Use Cronjob","Gebruik Cronjob"
|
149 |
"Use the Magento Cronjob to use the automatically import. A cronjob is a daemon which keeps running and gets activated at a said interval (time period). Please make sure your default Magento Cron is working. If not, contact your hosting company for help.","Gebruik de Magento Cronjob om de beoordelingen automatisch te importeren. Controleer hiervoor wel of de Magento cronjob juist functioneert, mocht dit niet het geval zijn dan raden wij u aan contact op te nemen met uw hostingpartij."
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Magmodules_Feedbackcompany</name>
|
4 |
-
<version>1.
|
5 |
<stability>stable</stability>
|
6 |
<license>OSL 3.0</license>
|
7 |
<channel>community</channel>
|
@@ -10,9 +10,9 @@
|
|
10 |
<description>Connect your Magento shop to The Feedback Company</description>
|
11 |
<notes>First stable release</notes>
|
12 |
<authors><author><name>Magmodules</name><user>magmodules</user><email>info@magmodules.nl</email></author></authors>
|
13 |
-
<date>
|
14 |
-
<time>18:
|
15 |
-
<contents><target name="magecommunity"><dir name="Magmodules"><dir name="Feedbackcompany"><dir name="Block"><dir name="Adminhtml"><dir name="Feedbacklog"><file name="Grid.php" hash="
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.1.0</min><max>7.9.9</max></php></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Magmodules_Feedbackcompany</name>
|
4 |
+
<version>1.5.0</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>OSL 3.0</license>
|
7 |
<channel>community</channel>
|
10 |
<description>Connect your Magento shop to The Feedback Company</description>
|
11 |
<notes>First stable release</notes>
|
12 |
<authors><author><name>Magmodules</name><user>magmodules</user><email>info@magmodules.nl</email></author></authors>
|
13 |
+
<date>2017-04-18</date>
|
14 |
+
<time>18:24:49</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Magmodules"><dir name="Feedbackcompany"><dir name="Block"><dir name="Adminhtml"><dir name="Feedbacklog"><file name="Grid.php" hash="c52f8b4078104065afe0466fc6673ee7"/></dir><file name="Feedbacklog.php" hash="33d41b9b1d3fb50cfda578ae1d8341ce"/><dir name="Feedbackreviews"><file name="Grid.php" hash="b238f2622c144c5fddb70fa6462c6978"/></dir><file name="Feedbackreviews.php" hash="13aaf0170d53498c11eadc65aa91e6df"/><dir name="Widget"><dir name="Buttons"><file name="Process.php" hash="e31f4a0080968516ea021ab314851adc"/><file name="Productreviews.php" hash="b628b751d0a6a43252825a0f926d0ef4"/></dir><dir name="Field"><file name="Version.php" hash="740f7a5c64b3e17470f1a3df001fb8e0"/></dir><dir name="Form"><file name="Heading.php" hash="03a6513f1132603b3571e08a8d7859ee"/><file name="Note.php" hash="d68e01b1691361c36df486bd6bacaf56"/></dir><dir name="Grid"><file name="Experience.php" hash="cdd7d44a95ae745ab37d46f52c2e7d8c"/><file name="Log.php" hash="6fc53eff6f6c4aeabc7642c37d12c779"/><file name="Seconds.php" hash="f5a04ec6fa3e4a5c592765eb98cc6095"/><file name="Stars.php" hash="903a2e8577a23fccd3c660771eb3b2de"/></dir><dir name="Info"><file name="Info.php" hash="bcbd2e5aefbfc62b66cd022291fafd5d"/></dir></dir></dir><file name="Custom.php" hash="36718a3e1081a873778969db844e9097"/><file name="Header.php" hash="675929066739f737121475b630303d1a"/><file name="Reviews.php" hash="9a04ed5b778a5d6d919c18792c4e9af2"/><file name="Sidebar.php" hash="187ff40e378e4c27bce46e4da2b9d5b7"/></dir><dir name="Helper"><file name="Data.php" hash="ae96d97fd1ba115731375fd3af23bcd9"/></dir><dir name="Model"><file name="Api.php" hash="599da979763407af68d3a02178856122"/><file name="Export.php" hash="7395e1522469351b60fdc0c8e198e2ba"/><file name="Log.php" hash="28ba9d308e1deb39d8531c3ba0e72179"/><dir name="Mysql4"><dir name="Log"><file name="Collection.php" hash="160b474f4f0f8a0694e1a58b48a08bb7"/></dir><file name="Log.php" hash="7f3274e718a40b86f0a65b2e43868236"/><dir name="Reviews"><file name="Collection.php" hash="3bc4fb661a490de6bcaabf47cb28b5ef"/></dir><file name="Reviews.php" hash="b6a8289c9166a108770ccd7a6ebaa1ca"/><dir name="Stats"><file name="Collection.php" hash="4b32264f25244bea8271035ba6fdcd11"/></dir><file name="Stats.php" hash="f39e3e5985176166f90d1efad8f6f9e1"/></dir><file name="Observer.php" hash="dd5bfc77a728e0c3573c063a37ade422"/><file name="Productreviews.php" hash="c47ca5b246bca9952afe89153fec0fb4"/><dir name="Resource"><file name="Review.php" hash="642185efdb13e3352569de8db5143dc3"/></dir><file name="Reviews.php" hash="99d1ee9c3eaf72f094d4be316edb0215"/><file name="Stats.php" hash="e2f8277856b5cd140e45d0d80c544f35"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Attribute.php" hash="76a5bcbca7b7116cb41dc3e93b28cd8d"/><file name="Category.php" hash="2581c316eac00170e8e2f64b750cc90b"/><file name="Cronfrequency.php" hash="df64f62f3ad05ec7384726b520a06b99"/><file name="Cronfrequencylong.php" hash="377b7774a51e5ce764a362dedb05c42c"/><file name="Orderstatus.php" hash="2ea6375138086f45bee35ed77e9ba5f1"/><file name="Position.php" hash="a0d3b0ac4b983ed5d51860567df9dde9"/><file name="Reviewlink.php" hash="8e65991e47e15c1e5d0307b838c8f4ed"/><file name="Reviewrating.php" hash="9a1b339777ae59b2a6c18e91ff80fbd9"/><file name="Reviewstatus.php" hash="5c256fc8f818c5adae9935f6aaad4a01"/><file name="Sidebarlink.php" hash="d857edcecafb47cc50afe657e57becfc"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="FeedbacklogController.php" hash="d5fabbb3cd2dd226972442ef37277051"/><file name="FeedbackreviewsController.php" hash="3de544d2a5d0db51869a7440ec61b483"/></dir><file name="IndexController.php" hash="f8147b0e9c4c17d1a788794d3c1b92ab"/></dir><dir name="data"><dir name="feedbackcompany_setup"><file name="data-upgrade-1.4.1-1.4.2.php" hash="8f6a22826fad0ac549a6262b9345c5c9"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="491214b7edde15fb9aec6e14b4864284"/><file name="config.xml" hash="1defd3c509b0eff53a1df58072043957"/><file name="system.xml" hash="b0c6b53fe6d8a7910f48937804a84862"/></dir><dir name="sql"><dir name="feedbackcompany_setup"><file name="mysql4-install-0.9.0.php" hash="8b38f6cf0eab984143428a2f91244567"/><file name="mysql4-upgrade-1.2.1-1.2.2.php" hash="e82d4f1401aceb89f9f7915564b1366c"/><file name="mysql4-upgrade-1.2.5-1.2.6.php" hash="f01b88c2ce763220c9258e06159e6eeb"/><file name="mysql4-upgrade-1.3.0-1.3.1.php" hash="fc219a71e11dbedcf3539ce9bc02a983"/><file name="mysql4-upgrade-1.4.9-1.5.0.php" hash="782aba5fa8cbe615b66d31e345c037f4"/></dir></dir><file name=".DS_Store" hash="9378dd7fa55de90b8f93165c4b0f1319"/></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="magmodules_feedbackcompany.xml" hash="09b9bc0853764353f794ad6c2a103473"/></dir><dir name="template"><dir name="magmodules"><dir name="feedbackcompany"><file name="index.phtml" hash="e310eeb5bc3db89d1e9a4e1961652399"/><dir name="sidebar"><file name="left.phtml" hash="e469e9dc8f8712b7e30587d660264df5"/><file name="right.phtml" hash="1569639a2862ac91aee96d75ab6fbfc6"/></dir><dir name="widget"><file name="header.phtml" hash="de352dede5eea6f3fd4c73c5e2dd35c9"/><file name="medium.phtml" hash="e28a5036ecb7a628c9df711e31419883"/><file name="sidebar.phtml" hash="4e15d5cba5e32e144f280bd023eb787e"/><file name="small.phtml" hash="a0e649191fce61a37f785c0def04c44f"/></dir></dir></dir></dir></dir></dir><dir name="rwd"><dir name="default"><dir name="template"><dir name="magmodules"><dir name="feedbackcompany"><dir name="widget"><file name="header.phtml" hash="d8d41baef56624250ce596d84ee4d45b"/></dir></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="magmodules_feedbackcompany.xml" hash="756a3b389541d165da00719a018fda50"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Magmodules_Feedbackcompany.xml" hash="4d2ded61e090cc4abee4e42f4dbbe450"/></dir></target><target name="magelocale"><dir><dir name="en_US"><file name="Magmodules_Feedbackcompany.csv" hash="2d07c75d815c0838db646329853c7ca6"/></dir><dir name="nl_NL"><file name="Magmodules_Feedbackcompany.csv" hash="e2bb7a1b54da2f8151c8f7e2c3c6a675"/></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="magmodules"><dir name="feedbackcompany"><dir name="images"><file name="5-stars-empty.png" hash="799c499ca785331e7e69d892df52dd48"/><file name="5-stars-full.png" hash="1d06151a2c4da6bb71381538c8a903a5"/><file name="bkg_rating.gif" hash="83c843697e71cbe94ddd75bdedcbcf95"/><file name="bkg_rating2x.gif" hash="f71a52080752ca47b4c19810afd72e54"/><file name="greystar.png" hash="ab99888c7a8f47826ad7a83bcabf9130"/><file name="logo.png" hash="6aaa31c8d465a70e007cbf00c7e093dc"/><file name="small_fill.png" hash="2fa2ce516dddb74497ada0ae8be94380"/><file name="small_grey.png" hash="685735e666b7938f19ffe3b420152572"/><file name="sprites.png" hash="5f048cd5c6faf107782a5356678c2800"/><file name="sprites@2x.png" hash="8bbeceb34cb88a53f8e0222025368149"/><file name="star.png" hash="1a0bff565b441621cfa141ea1359e42d"/><file name="stars-colorful-big-empty.png" hash="0c39b599f3711387f3ab73c2c866db5e"/><file name="stars-colorful-big-empty@2x.png" hash="91968a209183fa94981aa1a4f4b881ac"/><file name="stars-colorful-big-filling.png" hash="4e44da064ac05c020a0390be58378c70"/><file name="stars-colorful-big-filling@2x.png" hash="d884648d75c3d39ede9d3b9d152fa377"/><file name="stars-colorful-medium-empty.png" hash="348115c8fcb76a0fdad35adf373c372d"/><file name="stars-colorful-medium-empty@2x.png" hash="80597abaaf487d85b37b38242fd280fd"/><file name="stars-colorful-medium-filling.png" hash="bdabd08dd42a28ffac96c0426cc31f75"/><file name="stars-colorful-medium-filling@2x.png" hash="95d3c2484dea0e65ef3764cca92d7546"/><file name="stars-colorful-small-empty.png" hash="0810018964beb0d0ff758346ea48f380"/><file name="stars-colorful-small-empty@2x.png" hash="95e3450bc9019b50497a07edd36da76a"/><file name="stars-colorful-small-filling.png" hash="7dea18dd80f75e5957ddfff107a5b14b"/><file name="stars-colorful-small-filling@2x.png" hash="c78b5d4766bdba9144333e8420e78e30"/><file name="stars-grayscale-small-empty.png" hash="0810018964beb0d0ff758346ea48f380"/><file name="stars-grayscale-small-empty@2x.png" hash="95e3450bc9019b50497a07edd36da76a"/><file name="stars-grayscale-small-filling.png" hash="5b36c38e55237b3b2932cb46a238ca66"/><file name="stars-grayscale-small-filling@2x.png" hash="a7fad2bb4a7ba031134e60f2b682ec6e"/></dir><file name="richsnippets.css" hash="3660775b91557d874d8f014e07a77d1b"/><file name="sidebar.css" hash="c9393a8e730b016b811a5edde49b354e"/><file name="style.css" hash="6efbfa1e9dd3280315faa26b9d60f379"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="magmodules"><dir name="feedbackcompany"><file name="grid.css" hash="ff36b552e8096ab0453af7579ff55499"/><file name="star.png" hash="4beacfb62ebdd5feecd946494e895f4c"/></dir></dir></dir></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.1.0</min><max>7.9.9</max></php></required></dependencies>
|
18 |
</package>
|
skin/adminhtml/default/default/magmodules/feedbackcompany/grid.css
CHANGED
@@ -1,9 +1,7 @@
|
|
1 |
-
|
2 |
-
* Magmodules.eu
|
3 |
-
* http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,65 +10,66 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
|
22 |
/** RATINGS ORDER GRID **/
|
23 |
.rating-empty, .rating-star-1, .rating-star-2, .rating-star-3, .rating-star-4, .rating-star-5 {
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
}
|
30 |
|
31 |
-
.rating-star-1 {
|
32 |
-
|
33 |
}
|
34 |
|
35 |
-
.rating-star-2 {
|
36 |
-
|
37 |
}
|
38 |
|
39 |
-
.rating-star-3 {
|
40 |
-
|
41 |
}
|
42 |
|
43 |
-
.rating-star-4 {
|
44 |
-
|
45 |
}
|
46 |
|
47 |
-
.rating-star-5 {
|
48 |
-
|
49 |
}
|
50 |
|
51 |
-
.rating-empty {
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
}
|
56 |
|
57 |
a.magtooltip span {
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
}
|
63 |
|
64 |
a.magtooltip:hover span {
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
|
|
71 |
}
|
72 |
|
73 |
.magtooltip hr {
|
74 |
-
|
75 |
-
|
76 |
}
|
1 |
+
/*
|
2 |
+
* Magmodules.eu - http://www.magmodules.eu
|
|
|
3 |
*
|
4 |
* NOTICE OF LICENSE
|
|
|
5 |
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
* that is bundled with this package in the file LICENSE.txt.
|
7 |
* It is also available through the world-wide-web at this URL:
|
10 |
* obtain it through the world-wide-web, please send an email
|
11 |
* to info@magmodules.eu so we can send you a copy immediately.
|
12 |
*
|
13 |
+
* @category Magmodules
|
14 |
+
* @package Magmodules_Feedbackcompany
|
15 |
+
* @author Magmodules <info@magmodules.eu>
|
16 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
17 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
18 |
*/
|
19 |
|
20 |
/** RATINGS ORDER GRID **/
|
21 |
.rating-empty, .rating-star-1, .rating-star-2, .rating-star-3, .rating-star-4, .rating-star-5 {
|
22 |
+
background: url('star.png') 0 0;
|
23 |
+
margin-right: 5px;
|
24 |
+
height: 16px;
|
25 |
+
float: left;
|
26 |
+
width: 80px;
|
27 |
}
|
28 |
|
29 |
+
.rating-star-1 {
|
30 |
+
width: 16px;
|
31 |
}
|
32 |
|
33 |
+
.rating-star-2 {
|
34 |
+
width: 32px;
|
35 |
}
|
36 |
|
37 |
+
.rating-star-3 {
|
38 |
+
width: 48px;
|
39 |
}
|
40 |
|
41 |
+
.rating-star-4 {
|
42 |
+
width: 64px;
|
43 |
}
|
44 |
|
45 |
+
.rating-star-5 {
|
46 |
+
width: 80px;
|
47 |
}
|
48 |
|
49 |
+
.rating-empty {
|
50 |
+
float: left;
|
51 |
+
width: 80px;
|
52 |
+
background: url('star.png') 0 -16px;
|
53 |
}
|
54 |
|
55 |
a.magtooltip span {
|
56 |
+
display: none;
|
57 |
+
padding: 2px 3px;
|
58 |
+
margin-left: 8px;
|
59 |
+
width: 550px;
|
60 |
}
|
61 |
|
62 |
a.magtooltip:hover span {
|
63 |
+
display: block;
|
64 |
+
position: absolute;
|
65 |
+
background: #ffffff;
|
66 |
+
width: 265px;
|
67 |
+
border: 1px solid #cccccc;
|
68 |
+
color: #000;
|
69 |
+
padding: 10px;
|
70 |
}
|
71 |
|
72 |
.magtooltip hr {
|
73 |
+
height: 1px;
|
74 |
+
border: 1px dotted #606;
|
75 |
}
|
skin/frontend/base/default/magmodules/feedbackcompany/richsnippets.css
CHANGED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* Magmodules.eu - http://www.magmodules.eu
|
3 |
+
*
|
4 |
+
* NOTICE OF LICENSE
|
5 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
+
* that is bundled with this package in the file LICENSE.txt.
|
7 |
+
* It is also available through the world-wide-web at this URL:
|
8 |
+
* http://opensource.org/licenses/osl-3.0.php
|
9 |
+
* If you did not receive a copy of the license and are unable to
|
10 |
+
* obtain it through the world-wide-web, please send an email
|
11 |
+
* to info@magmodules.eu so we can send you a copy immediately.
|
12 |
+
*
|
13 |
+
* @category Magmodules
|
14 |
+
* @package Magmodules_Feedbackcompany
|
15 |
+
* @author Magmodules <info@magmodules.eu>
|
16 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
17 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
18 |
+
*/
|
19 |
+
|
skin/frontend/base/default/magmodules/feedbackcompany/sidebar.css
CHANGED
@@ -1,9 +1,7 @@
|
|
1 |
-
|
2 |
-
* Magmodules.eu
|
3 |
-
* http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,142 +10,313 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
|
22 |
.feedbackcompany-sidebar-block {
|
23 |
-
|
24 |
}
|
25 |
|
26 |
.feedbackcompany-sidebar-block .rating-name {
|
27 |
-
|
28 |
}
|
29 |
|
30 |
.feedbackcompany-logo {
|
31 |
-
|
32 |
-
|
33 |
}
|
34 |
|
35 |
.feedbackcompany-medium-image {
|
36 |
-
|
37 |
-
|
38 |
}
|
39 |
|
40 |
/** Discrete stars **/
|
41 |
-
.feedbackcompany-sidebar-block .rating-empty {
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
|
48 |
/** Continuous stars **/
|
49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
|
51 |
-
.feedbackcompany-small-widget .
|
52 |
-
|
53 |
-
|
54 |
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
|
56 |
-
.feedbackcompany-medium-widget .rating
|
57 |
-
|
58 |
-
|
|
|
|
|
59 |
|
60 |
-
.feedbackcompany-
|
61 |
-
|
62 |
-
|
63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
|
65 |
/** big colorful review stars **/
|
66 |
-
.block-content p.company-name {
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
|
73 |
/** medium colorful review stars **/
|
74 |
-
.total-block-stars-medium {
|
75 |
-
|
|
|
|
|
|
|
76 |
|
|
|
|
|
|
|
|
|
|
|
77 |
|
78 |
/** small colorful review stars **/
|
79 |
-
.total-block-stars-small {
|
80 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
|
82 |
/** small grayscale review stars **/
|
83 |
-
.total-block-stars-grey {
|
84 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
|
86 |
-
@media (-webkit-min-device-pixel-ratio: 2), not all, not all, not all, (min-resolution: 192dpi), (min-resolution: 2dppx){
|
87 |
-
|
88 |
-
|
89 |
-
|
|
|
|
|
90 |
|
91 |
-
|
92 |
-
|
93 |
-
|
|
|
94 |
|
95 |
-
|
96 |
-
|
97 |
-
|
|
|
|
|
98 |
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
|
105 |
/* CUSTOM BLOCK */
|
106 |
.feedbackcompany-custom {
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
}
|
116 |
|
117 |
-
.feedbackcompany-custom
|
118 |
-
|
119 |
}
|
120 |
|
121 |
.feedbackcompany-custom .rating-box {
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
}
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
|
|
130 |
}
|
131 |
|
132 |
#feedbackcompany-header-widget {
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
}
|
139 |
|
140 |
#feedbackcompany-header-widget.feedbackcompany-header-widget-searchbar {
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
}
|
146 |
|
147 |
#feedbackcompany-header-widget .total-block-stars-small {
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
}
|
152 |
|
153 |
.feedbackcompany-logo {
|
@@ -155,7 +324,15 @@
|
|
155 |
}
|
156 |
|
157 |
@media (min-width: 961px) {
|
158 |
-
|
159 |
-
|
160 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
161 |
}
|
1 |
+
/*
|
2 |
+
* Magmodules.eu - http://www.magmodules.eu
|
|
|
3 |
*
|
4 |
* NOTICE OF LICENSE
|
|
|
5 |
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
* that is bundled with this package in the file LICENSE.txt.
|
7 |
* It is also available through the world-wide-web at this URL:
|
10 |
* obtain it through the world-wide-web, please send an email
|
11 |
* to info@magmodules.eu so we can send you a copy immediately.
|
12 |
*
|
13 |
+
* @category Magmodules
|
14 |
+
* @package Magmodules_Feedbackcompany
|
15 |
+
* @author Magmodules <info@magmodules.eu>
|
16 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
17 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
18 |
*/
|
19 |
|
20 |
.feedbackcompany-sidebar-block {
|
21 |
+
padding: 10px;
|
22 |
}
|
23 |
|
24 |
.feedbackcompany-sidebar-block .rating-name {
|
25 |
+
font-style: italic;
|
26 |
}
|
27 |
|
28 |
.feedbackcompany-logo {
|
29 |
+
width: 100px;
|
30 |
+
margin: auto;
|
31 |
}
|
32 |
|
33 |
.feedbackcompany-medium-image {
|
34 |
+
width: 125px;
|
35 |
+
padding: 7px;
|
36 |
}
|
37 |
|
38 |
/** Discrete stars **/
|
39 |
+
.feedbackcompany-sidebar-block .rating-empty {
|
40 |
+
float: right;
|
41 |
+
display: block;
|
42 |
+
width: 80px;
|
43 |
+
height: 16px;
|
44 |
+
background: url('./images/star.png') 0 -16px;
|
45 |
+
margin-right: 5px;
|
46 |
+
}
|
47 |
+
|
48 |
+
.feedbackcompany-sidebar-block .rating-star-1 {
|
49 |
+
float: left;
|
50 |
+
display: block;
|
51 |
+
width: 16px;
|
52 |
+
height: 16px;
|
53 |
+
background: url('./images/star.png') 0 0;
|
54 |
+
margin-right: 5px;
|
55 |
+
}
|
56 |
+
|
57 |
+
.feedbackcompany-sidebar-block .rating-star-2 {
|
58 |
+
float: left;
|
59 |
+
display: block;
|
60 |
+
width: 32px;
|
61 |
+
height: 16px;
|
62 |
+
background: url('./images/star.png') 0 0;
|
63 |
+
margin-right: 5px;
|
64 |
+
}
|
65 |
+
|
66 |
+
.feedbackcompany-sidebar-block .rating-star-3 {
|
67 |
+
float: left;
|
68 |
+
display: block;
|
69 |
+
width: 48px;
|
70 |
+
height: 16px;
|
71 |
+
background: url('./images/star.png') 0 0;
|
72 |
+
margin-right: 5px;
|
73 |
+
}
|
74 |
+
|
75 |
+
.feedbackcompany-sidebar-block .rating-star-4 {
|
76 |
+
float: left;
|
77 |
+
display: block;
|
78 |
+
width: 64px;
|
79 |
+
height: 16px;
|
80 |
+
background: url('./images/star.png') 0 0;
|
81 |
+
margin-right: 5px;
|
82 |
+
}
|
83 |
+
|
84 |
+
.feedbackcompany-sidebar-block .rating-star-5 {
|
85 |
+
float: left;
|
86 |
+
display: block;
|
87 |
+
width: 80px;
|
88 |
+
height: 16px;
|
89 |
+
background: url('./images/star.png') 0 0;
|
90 |
+
margin-right: 5px;
|
91 |
+
}
|
92 |
|
93 |
/** Continuous stars **/
|
94 |
|
95 |
+
.feedbackcompany-small-widget .rating-box {
|
96 |
+
height: 21px;
|
97 |
+
background: url('./images/stars-colorful-small-empty.png') no-repeat !important;
|
98 |
+
margin: 5px 0 0;
|
99 |
+
width: 75px;
|
100 |
+
}
|
101 |
+
|
102 |
+
.feedbackcompany-small-widget .rating {
|
103 |
+
display: block;
|
104 |
+
height: 21px;
|
105 |
+
background: url('./images/stars-colorful-small-filling.png') no-repeat !important;
|
106 |
+
}
|
107 |
|
108 |
+
.feedbackcompany-small-widget .feedbackcompany-small-text {
|
109 |
+
padding: 5px 0 0 0;
|
110 |
+
}
|
111 |
|
112 |
+
.feedbackcompany-medium-widget .rating-box {
|
113 |
+
height: 21px;
|
114 |
+
background: url('./images/stars-colorful-big-empty.png') no-repeat;
|
115 |
+
margin: 10px 0 5px;
|
116 |
+
width: 110px;
|
117 |
+
}
|
118 |
|
119 |
+
.feedbackcompany-medium-widget .rating {
|
120 |
+
display: block;
|
121 |
+
height: 21px;
|
122 |
+
background: url('./images/stars-colorful-big-filling.png') no-repeat !important;
|
123 |
+
}
|
124 |
|
125 |
+
.feedbackcompany-medium-widget .feedbackcompany-small-text {
|
126 |
+
padding: 4px 0 0 0;
|
127 |
+
}
|
128 |
|
129 |
+
.feedbackcompany-small-score .rating-box {
|
130 |
+
height: 21px;
|
131 |
+
background: url('./images/stars-colorful-big-empty.png') no-repeat;
|
132 |
+
margin: 5px 15px;
|
133 |
+
width: 109px;
|
134 |
+
float: left;
|
135 |
+
}
|
136 |
+
|
137 |
+
.feedbackcompany-small-score .rating {
|
138 |
+
display: block;
|
139 |
+
height: 21px;
|
140 |
+
background: url('./images/stars-colorful-big-filling.png') no-repeat;
|
141 |
+
}
|
142 |
+
|
143 |
+
.feedbackcompany-small-score .feedbackcompany-small-text {
|
144 |
+
padding: 4px 0 0 0;
|
145 |
+
}
|
146 |
|
147 |
/** big colorful review stars **/
|
148 |
+
.block-content p.company-name {
|
149 |
+
text-align: center;
|
150 |
+
margin: 5px auto;
|
151 |
+
font-size: 12px;
|
152 |
+
}
|
153 |
+
|
154 |
+
.total-block-text {
|
155 |
+
border-bottom: 1px solid #CCC;
|
156 |
+
padding-bottom: 5px;
|
157 |
+
}
|
158 |
+
|
159 |
+
.total-block-text p {
|
160 |
+
text-align: center;
|
161 |
+
padding-top: 5px;
|
162 |
+
margin-bottom: 2px;
|
163 |
+
font-size: 18px;
|
164 |
+
}
|
165 |
+
|
166 |
+
.total-block-text p.based-on {
|
167 |
+
text-align: center;
|
168 |
+
padding-top: 0;
|
169 |
+
font-size: 11px;
|
170 |
+
font-style: italic;
|
171 |
+
}
|
172 |
+
|
173 |
+
.total-block-stars {
|
174 |
+
height: 21px;
|
175 |
+
width: 110px;
|
176 |
+
background: url('./images/stars-colorful-big-empty.png') no-repeat;
|
177 |
+
margin: 5px auto;
|
178 |
+
}
|
179 |
+
|
180 |
+
.total-block-stars span {
|
181 |
+
display: block;
|
182 |
+
height: 21px;
|
183 |
+
background: url('./images/stars-colorful-big-filling.png') no-repeat;
|
184 |
+
}
|
185 |
|
186 |
/** medium colorful review stars **/
|
187 |
+
.total-block-stars-medium {
|
188 |
+
height: 20px;
|
189 |
+
width: 108px;
|
190 |
+
background: url('./images/stars-colorful-medium-empty.png') no-repeat;
|
191 |
+
}
|
192 |
|
193 |
+
.total-block-stars-medium span {
|
194 |
+
display: block;
|
195 |
+
height: 20px;
|
196 |
+
background: url('./images/stars-colorful-medium-filling.png') no-repeat;
|
197 |
+
}
|
198 |
|
199 |
/** small colorful review stars **/
|
200 |
+
.total-block-stars-small {
|
201 |
+
height: 14px;
|
202 |
+
width: 74px;
|
203 |
+
background: url('./images/stars-colorful-small-empty.png') no-repeat;
|
204 |
+
margin: 5px auto;
|
205 |
+
}
|
206 |
+
|
207 |
+
.total-block-stars-small span {
|
208 |
+
display: block;
|
209 |
+
height: 14px;
|
210 |
+
background: url('./images/stars-colorful-small-filling.png') no-repeat;
|
211 |
+
}
|
212 |
|
213 |
/** small grayscale review stars **/
|
214 |
+
.total-block-stars-grey {
|
215 |
+
height: 14px;
|
216 |
+
width: 74px;
|
217 |
+
background: url('./images/stars-grayscale-small-empty.png') no-repeat;
|
218 |
+
display: inline-block
|
219 |
+
}
|
220 |
+
|
221 |
+
.total-block-stars-grey span {
|
222 |
+
display: block;
|
223 |
+
height: 14px;
|
224 |
+
background: url('./images/stars-grayscale-small-filling.png') no-repeat;
|
225 |
+
}
|
226 |
|
227 |
+
@media (-webkit-min-device-pixel-ratio: 2), not all, not all, not all, (min-resolution: 192dpi), (min-resolution: 2dppx) {
|
228 |
+
/** big colorful review stars **/
|
229 |
+
.total-block-stars {
|
230 |
+
background: url('./images/stars-colorful-big-empty@2x.png') no-repeat;
|
231 |
+
background-size: 110px 21px;
|
232 |
+
}
|
233 |
|
234 |
+
.total-block-stars span {
|
235 |
+
background: url('./images/stars-colorful-big-filling@2x.png') no-repeat;
|
236 |
+
background-size: 110px 21px;
|
237 |
+
}
|
238 |
|
239 |
+
/** medium colorful review stars **/
|
240 |
+
.total-block-stars-small {
|
241 |
+
background: url('./images/stars-colorful-medium-empty@2x.png') no-repeat;
|
242 |
+
background-size: 108px 20px;
|
243 |
+
}
|
244 |
|
245 |
+
.total-block-stars-small span {
|
246 |
+
background: url('./images/stars-colorful-medium-filling@2x.png') no-repeat;
|
247 |
+
background-size: 108px 20px;
|
248 |
+
}
|
249 |
+
|
250 |
+
/** small colorful review stars **/
|
251 |
+
.total-block-stars-small {
|
252 |
+
background: url('./images/stars-colorful-small-empty@2x.png') no-repeat;
|
253 |
+
background-size: 74px 14px;
|
254 |
+
}
|
255 |
|
256 |
+
.total-block-stars-small span {
|
257 |
+
background: url('./images/stars-colorful-small-filling@2x.png') no-repeat;
|
258 |
+
background-size: 74px 14px;
|
259 |
+
}
|
260 |
+
|
261 |
+
/** small grayscale review stars **/
|
262 |
+
.total-block-stars-grey {
|
263 |
+
background: url('./images/stars-grayscale-small-empty@2x.png') no-repeat;
|
264 |
+
background-size: 74px 14px;
|
265 |
+
}
|
266 |
+
|
267 |
+
.total-block-stars-grey span {
|
268 |
+
background: url('./images/stars-grayscale-small-filling@2x.png') no-repeat;
|
269 |
+
background-size: 74px 14px;
|
270 |
+
}
|
271 |
+
}
|
272 |
|
273 |
/* CUSTOM BLOCK */
|
274 |
.feedbackcompany-custom {
|
275 |
+
font-weight: bold;
|
276 |
+
font-size: 13px;
|
277 |
+
display: block;
|
278 |
+
border: .25em solid #EEE;
|
279 |
+
background: #F6F6F6;
|
280 |
+
padding: 1.0em;
|
281 |
+
width: 30%;
|
282 |
+
text-align: center;
|
283 |
}
|
284 |
|
285 |
+
.feedbackcompany-custom .client {
|
286 |
+
font-size: 16px;
|
287 |
}
|
288 |
|
289 |
.feedbackcompany-custom .rating-box {
|
290 |
+
margin-left: 40%;
|
291 |
+
margin-top: 10px;
|
292 |
+
margin-bottom: 10px;
|
293 |
}
|
294 |
+
|
295 |
+
.feedbackcompany-custom .number {
|
296 |
+
font-size: 11px;
|
297 |
+
font-style: italic;
|
298 |
+
font-weight: 300;
|
299 |
}
|
300 |
|
301 |
#feedbackcompany-header-widget {
|
302 |
+
font-size: 12px;
|
303 |
+
border-radius: 2px;
|
304 |
+
border: 1px solid silver;
|
305 |
+
padding: 10px 15px 10px 10px;
|
306 |
+
line-height: 18px;
|
307 |
}
|
308 |
|
309 |
#feedbackcompany-header-widget.feedbackcompany-header-widget-searchbar {
|
310 |
+
position: absolute;
|
311 |
+
top: 55px;
|
312 |
+
right: 25%;
|
313 |
+
margin-right: 18px;
|
314 |
}
|
315 |
|
316 |
#feedbackcompany-header-widget .total-block-stars-small {
|
317 |
+
display: inline-block;
|
318 |
+
vertical-align: middle;
|
319 |
+
margin: -1px 10px 0 8px;
|
320 |
}
|
321 |
|
322 |
.feedbackcompany-logo {
|
324 |
}
|
325 |
|
326 |
@media (min-width: 961px) {
|
327 |
+
#feedbackcompany-header-widget {
|
328 |
+
display: inline-block;
|
329 |
+
}
|
330 |
+
|
331 |
+
#feedbackcompany-header-widget > * {
|
332 |
+
display: inline-block;
|
333 |
+
}
|
334 |
+
|
335 |
+
#feedbackcompany-header-widget a:hover {
|
336 |
+
text-decoration: none;
|
337 |
+
}
|
338 |
}
|
skin/frontend/base/default/magmodules/feedbackcompany/style.css
CHANGED
@@ -1,9 +1,7 @@
|
|
1 |
-
|
2 |
-
* Magmodules.eu
|
3 |
-
* http://www.magmodules.eu
|
4 |
*
|
5 |
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
* that is bundled with this package in the file LICENSE.txt.
|
9 |
* It is also available through the world-wide-web at this URL:
|
@@ -12,14 +10,14 @@
|
|
12 |
* obtain it through the world-wide-web, please send an email
|
13 |
* to info@magmodules.eu so we can send you a copy immediately.
|
14 |
*
|
15 |
-
* @category
|
16 |
-
* @package
|
17 |
-
* @author
|
18 |
-
* @copyright
|
19 |
-
* @license
|
20 |
*/
|
21 |
|
22 |
-
.feedbackcompany .page-title .flexbox-container{
|
23 |
display: flex;
|
24 |
justify-content: space-between;
|
25 |
align-items: baseline;
|
@@ -34,15 +32,16 @@
|
|
34 |
border-bottom: none;
|
35 |
}
|
36 |
|
37 |
-
.feedbackcompany .flexbox-container .header-floating-feedbackcompany{
|
38 |
flex-shrink: 0;
|
39 |
}
|
|
|
40 |
.feedbackcompany .header-floating-feedbackcompany .button {
|
41 |
padding: 0;
|
42 |
vertical-align: text-bottom;
|
43 |
}
|
44 |
|
45 |
-
.feedbackcompany .header-floating-feedbackcompany .button span{
|
46 |
padding: 10px 45px 10px 41px;
|
47 |
display: inline-block;
|
48 |
}
|
@@ -53,29 +52,28 @@
|
|
53 |
text-align: right;
|
54 |
}
|
55 |
|
56 |
-
.feedbackcompany .total-feedbackcompany.total-feedbackcompany-mobile{
|
57 |
display: block;
|
58 |
text-align: center;
|
59 |
margin: 40px 0 30px;
|
60 |
}
|
61 |
|
62 |
-
|
63 |
-
.feedbackcompany .total-feedbackcompany .total-block-stars, .feedbackcompany .total-feedbackcompany .total-block-stars-medium{
|
64 |
float: right;
|
65 |
vertical-align: sub;
|
66 |
}
|
67 |
|
68 |
-
.feedbackcompany .total-feedbackcompany.total-feedbackcompany-mobile .button
|
69 |
vertical-align: middle;
|
70 |
}
|
71 |
|
72 |
-
.feedbackcompany .total-feedbackcompany.total-feedbackcompany-mobile .total-block-stars{
|
73 |
float: none;
|
74 |
margin-top: -8px;
|
75 |
display: inline-block;
|
76 |
}
|
77 |
|
78 |
-
.feedbackcompany .total-feedbackcompany .total-description{
|
79 |
text-transform: uppercase;
|
80 |
font-size: 10px;
|
81 |
line-height: 22px;
|
@@ -91,7 +89,7 @@
|
|
91 |
.feedbackcompany .ratingblock-feedbackcompany {
|
92 |
width: 60px;
|
93 |
height: 60px;
|
94 |
-
padding: 4px
|
95 |
font-weight: bold;
|
96 |
font-size: 13px;
|
97 |
margin: 6px auto;
|
@@ -115,7 +113,7 @@
|
|
115 |
|
116 |
.feedbackcompany .review-list h4 {
|
117 |
font-size: 12px;
|
118 |
-
border-bottom: 1px solid #
|
119 |
padding: 6px 3px 10px;
|
120 |
}
|
121 |
|
@@ -154,12 +152,12 @@
|
|
154 |
font-weight: bold;
|
155 |
clear: left;
|
156 |
float: left;
|
157 |
-
width:
|
158 |
}
|
159 |
|
160 |
.feedbackcompany dl dd {
|
161 |
float: left;
|
162 |
-
width:
|
163 |
}
|
164 |
|
165 |
.feedbackcompany .sprites-icon {
|
@@ -173,22 +171,11 @@
|
|
173 |
vertical-align: middle;
|
174 |
}
|
175 |
|
176 |
-
@
|
177 |
-
.feedbackcompany {
|
178 |
-
ul.summary-index {
|
179 |
-
display: inherit;
|
180 |
-
li {
|
181 |
-
display: inline-block;
|
182 |
-
}
|
183 |
-
}
|
184 |
-
}
|
185 |
-
}
|
186 |
-
|
187 |
-
@media (-webkit-min-device-pixel-ratio: 2), not all, not all, not all, (min-resolution: 192dpi), (min-resolution: 2dppx){
|
188 |
.feedbackcompany .sprites-icon {
|
189 |
background: url('images/sprites@2x.png') center top no-repeat;
|
190 |
background-size: 16px;
|
191 |
-
-webkit-transform: translate3d(0,0,0);
|
192 |
}
|
193 |
|
194 |
}
|
@@ -214,7 +201,7 @@
|
|
214 |
margin: 23px 0 3em;
|
215 |
border: 3px solid #C3C3C3;
|
216 |
color: #333;
|
217 |
-
background: #
|
218 |
-webkit-border-radius: 10px;
|
219 |
-moz-border-radius: 10px;
|
220 |
border-radius: 10px;
|
@@ -240,7 +227,7 @@
|
|
240 |
left: 47px;
|
241 |
border-width: 13px 13px 0;
|
242 |
border-style: solid;
|
243 |
-
border-color: #
|
244 |
display: block;
|
245 |
width: 0;
|
246 |
}
|
@@ -261,11 +248,12 @@
|
|
261 |
border-width: 0 13px 13px;
|
262 |
}
|
263 |
|
264 |
-
@media only screen and (min-width: 600px){
|
265 |
-
.feedbackcompany .total-feedbackcompany.total-feedbackcompany-mobile{
|
266 |
display: none;
|
267 |
}
|
268 |
-
|
|
|
269 |
display: inline-block;
|
270 |
}
|
271 |
|
@@ -274,7 +262,6 @@
|
|
274 |
}
|
275 |
}
|
276 |
|
277 |
-
|
278 |
@media only screen and (min-width: 771px) {
|
279 |
.feedbackcompany .total-feedbackcompany {
|
280 |
line-height: 34px;
|
@@ -298,7 +285,7 @@
|
|
298 |
}
|
299 |
|
300 |
.feedbackcompany dl {
|
301 |
-
padding-left:
|
302 |
}
|
303 |
|
304 |
.feedbackcompany dl.dl-feedback {
|
@@ -306,7 +293,7 @@
|
|
306 |
}
|
307 |
|
308 |
.feedbackcompany dl.dl-feedback dt {
|
309 |
-
width:
|
310 |
}
|
311 |
|
312 |
.feedbackcompany dl.dl-feedback .upper {
|
@@ -315,15 +302,15 @@
|
|
315 |
}
|
316 |
|
317 |
.feedbackcompany dl.dl-feedback dd {
|
318 |
-
width:
|
319 |
}
|
320 |
|
321 |
.feedbackcompany dl.summary-index dt {
|
322 |
-
width:
|
323 |
}
|
324 |
|
325 |
.feedbackcompany dl.summary-index dd {
|
326 |
-
width:
|
327 |
}
|
328 |
|
329 |
.feedbackcompany .summary-index .column {
|
1 |
+
/*
|
2 |
+
* Magmodules.eu - http://www.magmodules.eu
|
|
|
3 |
*
|
4 |
* NOTICE OF LICENSE
|
|
|
5 |
* This source file is subject to the Open Software License (OSL 3.0)
|
6 |
* that is bundled with this package in the file LICENSE.txt.
|
7 |
* It is also available through the world-wide-web at this URL:
|
10 |
* obtain it through the world-wide-web, please send an email
|
11 |
* to info@magmodules.eu so we can send you a copy immediately.
|
12 |
*
|
13 |
+
* @category Magmodules
|
14 |
+
* @package Magmodules_Feedbackcompany
|
15 |
+
* @author Magmodules <info@magmodules.eu>
|
16 |
+
* @copyright Copyright (c) 2017 (http://www.magmodules.eu)
|
17 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
18 |
*/
|
19 |
|
20 |
+
.feedbackcompany .page-title .flexbox-container {
|
21 |
display: flex;
|
22 |
justify-content: space-between;
|
23 |
align-items: baseline;
|
32 |
border-bottom: none;
|
33 |
}
|
34 |
|
35 |
+
.feedbackcompany .flexbox-container .header-floating-feedbackcompany {
|
36 |
flex-shrink: 0;
|
37 |
}
|
38 |
+
|
39 |
.feedbackcompany .header-floating-feedbackcompany .button {
|
40 |
padding: 0;
|
41 |
vertical-align: text-bottom;
|
42 |
}
|
43 |
|
44 |
+
.feedbackcompany .header-floating-feedbackcompany .button span {
|
45 |
padding: 10px 45px 10px 41px;
|
46 |
display: inline-block;
|
47 |
}
|
52 |
text-align: right;
|
53 |
}
|
54 |
|
55 |
+
.feedbackcompany .total-feedbackcompany.total-feedbackcompany-mobile {
|
56 |
display: block;
|
57 |
text-align: center;
|
58 |
margin: 40px 0 30px;
|
59 |
}
|
60 |
|
61 |
+
.feedbackcompany .total-feedbackcompany .total-block-stars, .feedbackcompany .total-feedbackcompany .total-block-stars-medium {
|
|
|
62 |
float: right;
|
63 |
vertical-align: sub;
|
64 |
}
|
65 |
|
66 |
+
.feedbackcompany .total-feedbackcompany.total-feedbackcompany-mobile .button, .feedbackcompany .total-feedbackcompany.total-feedbackcompany-mobile .total-block-stars {
|
67 |
vertical-align: middle;
|
68 |
}
|
69 |
|
70 |
+
.feedbackcompany .total-feedbackcompany.total-feedbackcompany-mobile .total-block-stars {
|
71 |
float: none;
|
72 |
margin-top: -8px;
|
73 |
display: inline-block;
|
74 |
}
|
75 |
|
76 |
+
.feedbackcompany .total-feedbackcompany .total-description {
|
77 |
text-transform: uppercase;
|
78 |
font-size: 10px;
|
79 |
line-height: 22px;
|
89 |
.feedbackcompany .ratingblock-feedbackcompany {
|
90 |
width: 60px;
|
91 |
height: 60px;
|
92 |
+
padding: 4px 0 0 3px;
|
93 |
font-weight: bold;
|
94 |
font-size: 13px;
|
95 |
margin: 6px auto;
|
113 |
|
114 |
.feedbackcompany .review-list h4 {
|
115 |
font-size: 12px;
|
116 |
+
border-bottom: 1px solid #E0E0E0;
|
117 |
padding: 6px 3px 10px;
|
118 |
}
|
119 |
|
152 |
font-weight: bold;
|
153 |
clear: left;
|
154 |
float: left;
|
155 |
+
width: 50%;
|
156 |
}
|
157 |
|
158 |
.feedbackcompany dl dd {
|
159 |
float: left;
|
160 |
+
width: 50%;
|
161 |
}
|
162 |
|
163 |
.feedbackcompany .sprites-icon {
|
171 |
vertical-align: middle;
|
172 |
}
|
173 |
|
174 |
+
@media (-webkit-min-device-pixel-ratio: 2), not all, not all, not all, (min-resolution: 192dpi), (min-resolution: 2dppx) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
175 |
.feedbackcompany .sprites-icon {
|
176 |
background: url('images/sprites@2x.png') center top no-repeat;
|
177 |
background-size: 16px;
|
178 |
+
-webkit-transform: translate3d(0, 0, 0);
|
179 |
}
|
180 |
|
181 |
}
|
201 |
margin: 23px 0 3em;
|
202 |
border: 3px solid #C3C3C3;
|
203 |
color: #333;
|
204 |
+
background: #FFF;
|
205 |
-webkit-border-radius: 10px;
|
206 |
-moz-border-radius: 10px;
|
207 |
border-radius: 10px;
|
227 |
left: 47px;
|
228 |
border-width: 13px 13px 0;
|
229 |
border-style: solid;
|
230 |
+
border-color: #FFF transparent;
|
231 |
display: block;
|
232 |
width: 0;
|
233 |
}
|
248 |
border-width: 0 13px 13px;
|
249 |
}
|
250 |
|
251 |
+
@media only screen and (min-width: 600px) {
|
252 |
+
.feedbackcompany .total-feedbackcompany.total-feedbackcompany-mobile {
|
253 |
display: none;
|
254 |
}
|
255 |
+
|
256 |
+
.feedbackcompany .total-feedbackcompany {
|
257 |
display: inline-block;
|
258 |
}
|
259 |
|
262 |
}
|
263 |
}
|
264 |
|
|
|
265 |
@media only screen and (min-width: 771px) {
|
266 |
.feedbackcompany .total-feedbackcompany {
|
267 |
line-height: 34px;
|
285 |
}
|
286 |
|
287 |
.feedbackcompany dl {
|
288 |
+
padding-left: 0;
|
289 |
}
|
290 |
|
291 |
.feedbackcompany dl.dl-feedback {
|
293 |
}
|
294 |
|
295 |
.feedbackcompany dl.dl-feedback dt {
|
296 |
+
width: 25%;
|
297 |
}
|
298 |
|
299 |
.feedbackcompany dl.dl-feedback .upper {
|
302 |
}
|
303 |
|
304 |
.feedbackcompany dl.dl-feedback dd {
|
305 |
+
width: 75%;
|
306 |
}
|
307 |
|
308 |
.feedbackcompany dl.summary-index dt {
|
309 |
+
width: 50%;
|
310 |
}
|
311 |
|
312 |
.feedbackcompany dl.summary-index dd {
|
313 |
+
width: 50%;
|
314 |
}
|
315 |
|
316 |
.feedbackcompany .summary-index .column {
|