Magmodules_Feedbackcompany - Version 1.5.0

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

Files changed (75) hide show
  1. app/code/community/Magmodules/Feedbackcompany/.DS_Store +0 -0
  2. app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Feedbacklog.php +28 -22
  3. app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Feedbacklog/Grid.php +150 -115
  4. app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Feedbackreviews.php +29 -22
  5. app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Feedbackreviews/Grid.php +177 -155
  6. app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Feedbackreviews/Renderer/Experience.php +0 -37
  7. app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Widget/Buttons/Process.php +27 -21
  8. app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Widget/Buttons/Productreviews.php +27 -21
  9. app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Widget/Buttons/Test.php +0 -36
  10. app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Widget/Field/Version.php +17 -13
  11. app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Widget/Form/Heading.php +20 -14
  12. app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Widget/Form/Note.php +18 -12
  13. app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Widget/Grid/Experience.php +44 -0
  14. app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Widget/Grid/Log.php +68 -52
  15. app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Widget/Grid/Seconds.php +21 -15
  16. app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Widget/Grid/Stars.php +39 -54
  17. app/code/community/Magmodules/Feedbackcompany/Block/Adminhtml/Widget/Info/Info.php +56 -40
  18. app/code/community/Magmodules/Feedbackcompany/Block/Custom.php +119 -87
  19. app/code/community/Magmodules/Feedbackcompany/Block/Header.php +38 -27
  20. app/code/community/Magmodules/Feedbackcompany/Block/Reviews.php +89 -61
  21. app/code/community/Magmodules/Feedbackcompany/Block/Sidebar.php +141 -91
  22. app/code/community/Magmodules/Feedbackcompany/Helper/Data.php +413 -241
  23. app/code/community/Magmodules/Feedbackcompany/Model/Api.php +304 -318
  24. app/code/community/Magmodules/Feedbackcompany/Model/Export.php +105 -69
  25. app/code/community/Magmodules/Feedbackcompany/Model/Log.php +46 -56
  26. app/code/community/Magmodules/Feedbackcompany/Model/Mysql4/Log.php +16 -13
  27. app/code/community/Magmodules/Feedbackcompany/Model/Mysql4/Log/Collection.php +17 -14
  28. app/code/community/Magmodules/Feedbackcompany/Model/Mysql4/Reviews.php +16 -13
  29. app/code/community/Magmodules/Feedbackcompany/Model/Mysql4/Reviews/Collection.php +17 -14
  30. app/code/community/Magmodules/Feedbackcompany/Model/Mysql4/Stats.php +15 -12
  31. app/code/community/Magmodules/Feedbackcompany/Model/Mysql4/Stats/Collection.php +17 -14
  32. app/code/community/Magmodules/Feedbackcompany/Model/Observer.php +153 -137
  33. app/code/community/Magmodules/Feedbackcompany/Model/Productreviews.php +225 -112
  34. app/code/community/Magmodules/Feedbackcompany/Model/Resource/Review.php +28 -22
  35. app/code/community/Magmodules/Feedbackcompany/Model/Reviews.php +210 -134
  36. app/code/community/Magmodules/Feedbackcompany/Model/Stats.php +163 -100
  37. app/code/community/Magmodules/Feedbackcompany/Model/System/Config/Source/Attribute.php +23 -20
  38. app/code/community/Magmodules/Feedbackcompany/Model/System/Config/Source/Category.php +50 -39
  39. app/code/community/Magmodules/Feedbackcompany/Model/System/Config/Source/Cronfrequency.php +24 -21
  40. app/code/community/Magmodules/Feedbackcompany/Model/System/Config/Source/Cronfrequencylong.php +21 -18
  41. app/code/community/Magmodules/Feedbackcompany/Model/System/Config/Source/Orderstatus.php +27 -21
  42. app/code/community/Magmodules/Feedbackcompany/Model/System/Config/Source/Position.php +19 -15
  43. app/code/community/Magmodules/Feedbackcompany/Model/System/Config/Source/Reviewlink.php +18 -15
  44. app/code/community/Magmodules/Feedbackcompany/Model/System/Config/Source/Reviewrating.php +23 -17
  45. app/code/community/Magmodules/Feedbackcompany/Model/System/Config/Source/Reviewstatus.php +20 -16
  46. app/code/community/Magmodules/Feedbackcompany/Model/System/Config/Source/Sidebarlink.php +19 -16
  47. app/code/community/Magmodules/Feedbackcompany/controllers/Adminhtml/FeedbacklogController.php +74 -50
  48. app/code/community/Magmodules/Feedbackcompany/controllers/Adminhtml/FeedbackreviewsController.php +286 -219
  49. app/code/community/Magmodules/Feedbackcompany/controllers/IndexController.php +33 -30
  50. app/code/community/Magmodules/Feedbackcompany/data/feedbackcompany_setup/data-upgrade-1.4.1-1.4.2.php +14 -13
  51. app/code/community/Magmodules/Feedbackcompany/etc/adminhtml.xml +91 -95
  52. app/code/community/Magmodules/Feedbackcompany/etc/config.xml +268 -251
  53. app/code/community/Magmodules/Feedbackcompany/etc/system.xml +859 -756
  54. app/code/community/Magmodules/Feedbackcompany/sql/feedbackcompany_setup/mysql4-install-0.9.0.php +11 -10
  55. app/code/community/Magmodules/Feedbackcompany/sql/feedbackcompany_setup/mysql4-upgrade-1.2.1-1.2.2.php +17 -16
  56. app/code/community/Magmodules/Feedbackcompany/sql/feedbackcompany_setup/mysql4-upgrade-1.2.5-1.2.6.php +8 -11
  57. app/code/community/Magmodules/Feedbackcompany/sql/feedbackcompany_setup/mysql4-upgrade-1.3.0-1.3.1.php +7 -8
  58. app/code/community/Magmodules/Feedbackcompany/sql/feedbackcompany_setup/mysql4-upgrade-1.4.9-1.5.0.php +65 -0
  59. app/design/adminhtml/default/default/layout/magmodules_feedbackcompany.xml +24 -3
  60. app/design/frontend/base/default/layout/magmodules_feedbackcompany.xml +64 -34
  61. app/design/frontend/base/default/template/magmodules/feedbackcompany/index.phtml +138 -121
  62. app/design/frontend/base/default/template/magmodules/feedbackcompany/sidebar/left.phtml +81 -56
  63. app/design/frontend/base/default/template/magmodules/feedbackcompany/sidebar/right.phtml +81 -56
  64. app/design/frontend/base/default/template/magmodules/feedbackcompany/widget/header.phtml +47 -25
  65. app/design/frontend/base/default/template/magmodules/feedbackcompany/widget/medium.phtml +60 -52
  66. app/design/frontend/base/default/template/magmodules/feedbackcompany/widget/sidebar.phtml +77 -53
  67. app/design/frontend/base/default/template/magmodules/feedbackcompany/widget/small.phtml +34 -36
  68. app/design/frontend/rwd/default/template/magmodules/feedbackcompany/widget/header.phtml +24 -25
  69. app/etc/modules/Magmodules_Feedbackcompany.xml +24 -6
  70. app/locale/nl_NL/Magmodules_Feedbackcompany.csv +5 -4
  71. package.xml +4 -4
  72. skin/adminhtml/default/default/magmodules/feedbackcompany/grid.css +39 -40
  73. skin/frontend/base/default/magmodules/feedbackcompany/richsnippets.css +19 -0
  74. skin/frontend/base/default/magmodules/feedbackcompany/sidebar.css +265 -88
  75. 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 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_Feedbacklog extends Mage_Adminhtml_Block_Widget_Grid_Container {
23
 
24
- public function __construct()
25
- {
26
- $this->_controller = 'adminhtml_feedbacklog';
27
- $this->_blockGroup = 'feedbackcompany';
28
- $this->_headerText = Mage::helper('feedbackcompany')->__('The Feedback Company - Logs');
29
- parent::__construct();
30
- $this->_removeButton('add');
 
 
 
 
 
 
31
 
32
- $this->_addButton('feedbackcompany_log', array(
33
- 'label' => Mage::helper('feedbackcompany')->__('Cleanup Log'),
34
- 'onclick' => "setLocation('{$this->getUrl('adminhtml/feedbacklog/clean')}')",
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 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_Feedbacklog_Grid extends Mage_Adminhtml_Block_Widget_Grid {
23
-
24
- public function __construct()
25
- {
26
- parent::__construct();
27
- $this->setId('feedbacklogGrid');
28
- $this->setDefaultSort('date');
29
- $this->setDefaultDir('DESC');
30
- $this->setSaveParametersInSession(true);
31
- }
32
-
33
- protected function _prepareCollection()
34
- {
35
- $collection = Mage::getModel('feedbackcompany/log')->getCollection();
36
- $this->setCollection($collection);
37
- return parent::_prepareCollection();
38
- }
39
-
40
- protected function _prepareColumns()
41
- {
42
-
43
- $this->addColumn('company', array(
44
- 'header' => Mage::helper('feedbackcompany')->__('Shop'),
45
- 'index' => 'company',
46
- 'width' => '120px',
47
- ));
48
-
49
- $this->addColumn('type', array(
50
- 'header' => Mage::helper('feedbackcompany')->__('Type'),
51
- 'align' => 'left',
52
- 'index' => 'type',
53
- 'width' => '120',
54
- 'type' => 'options',
55
- 'options'=> array(
56
- 'reviews' => Mage::helper('feedbackcompany')->__('Reviews'),
57
- 'productreviews'=> Mage::helper('feedbackcompany')->__('Productreviews'),
58
- 'invitation' => Mage::helper('feedbackcompany')->__('Invitation Call'),
59
- ),
60
- ));
61
-
62
- if(Mage::app()->getRequest()->getParam('showapiurl')) {
63
- $this->addColumn('api_url', array(
64
- 'header' => Mage::helper('feedbackcompany')->__('Api URL'),
65
- 'align' => 'left',
66
- 'index' => 'api_url',
67
- 'filter' => false,
68
- 'sortable' => false,
69
- ));
70
- }
71
-
72
- $this->addColumn('qty', array(
73
- 'header' => Mage::helper('feedbackcompany')->__('Description'),
74
- 'align' => 'left',
75
- 'index' => 'qty',
76
- 'renderer' => 'feedbackcompany/adminhtml_widget_grid_log',
77
- 'filter' => false,
78
- 'sortable' => false,
79
- ));
80
-
81
- $this->addColumn('cron', array(
82
- 'header' => Mage::helper('feedbackcompany')->__('Cron'),
83
- 'align' => 'left',
84
- 'index' => 'cron',
85
- 'width' => '120',
86
- 'type' => 'options',
87
- 'options' => array(
88
- '' => Mage::helper('feedbackcompany')->__('Manually'),
89
- 'stats' => Mage::helper('feedbackcompany')->__('Stats Cron'),
90
- 'reviews' => Mage::helper('feedbackcompany')->__('Reviews Cron'),
91
- 'productreviews'=> Mage::helper('feedbackcompany')->__('Producteviews Cron'),
92
- 'orderupdate' => Mage::helper('feedbackcompany')->__('Invitation'),
93
- ),
94
- ));
95
-
96
- $this->addColumn('time', array(
97
- 'header' => Mage::helper('feedbackcompany')->__('Time'),
98
- 'align' => 'left',
99
- 'index' => 'time',
100
- 'width' => '60',
101
- 'renderer' => 'feedbackcompany/adminhtml_widget_grid_seconds',
102
- ));
103
-
104
- $this->addColumn('date', array(
105
- 'header' => Mage::helper('feedbackcompany')->__('Date'),
106
- 'align' => 'left',
107
- 'type' => 'datetime',
108
- 'index' => 'date',
109
- 'width' => '140',
110
- ));
111
-
112
- return parent::_prepareColumns();
113
- }
114
-
115
- protected function _prepareMassaction()
116
- {
117
- $this->setMassactionIdField('id');
118
- $this->getMassactionBlock()->setFormFieldName('logids');
119
-
120
- $this->getMassactionBlock()->addItem('hide', array(
121
- 'label' => Mage::helper('feedbackcompany')->__('Delete'),
122
- 'url' => $this->getUrl('*/*/massDelete'),
123
- ));
124
- return $this;
125
- }
126
-
127
- public function getRowUrl($row) {
128
- return false;
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 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 extends Mage_Adminhtml_Block_Widget_Grid_Container {
23
 
24
- public function __construct()
25
- {
26
- $this->_controller = 'adminhtml_feedbackreviews';
27
- $this->_blockGroup = 'feedbackcompany';
28
- $this->_headerText = Mage::helper('feedbackcompany')->__('The Feedback Company - Reviews');
29
- parent::__construct();
30
- $this->_removeButton('add');
31
- $this->_addButton('module_controller', array(
32
- 'label' => Mage::helper('feedbackcompany')->__('Delete all reviews'),
33
- 'onclick' => "setLocation('{$this->getUrl('adminhtml/feedbackreviews/truncate')}')",
34
- 'confirm' => Mage::helper('feedbackcompany')->__('Are you sure you want to delete all reviews?'),
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 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_Grid extends Mage_Adminhtml_Block_Widget_Grid {
23
-
24
- public function __construct()
25
- {
26
- parent::__construct();
27
- $this->setId('reviewsGrid');
28
- $this->setDefaultSort('date_created');
29
- $this->setDefaultDir('DESC');
30
- $this->setSaveParametersInSession(true);
31
- }
32
-
33
- protected function _prepareCollection()
34
- {
35
- $collection = Mage::getModel('feedbackcompany/reviews')->getCollection();
36
- $this->setCollection($collection);
37
- return parent::_prepareCollection();
38
- }
39
-
40
- protected function _prepareColumns()
41
- {
42
-
43
- $this->addColumn('company', array(
44
- 'header' => Mage::helper('feedbackcompany')->__('Shop'),
45
- 'index' => 'company',
46
- 'width' => '120px',
47
- ));
48
-
49
- $this->addColumn('customer_name', array(
50
- 'header' => Mage::helper('feedbackcompany')->__('User'),
51
- 'align' => 'left',
52
- 'index' => 'customer_name',
53
- ));
54
-
55
- $this->addColumn('purchased_products', array(
56
- 'header' => Mage::helper('feedbackcompany')->__('Product(s)'),
57
- 'align' => 'left',
58
- 'index' => 'purchased_products',
59
- ));
60
-
61
- $this->addColumn('review_text', array(
62
- 'header' => Mage::helper('feedbackcompany')->__('Review'),
63
- 'align' => 'left',
64
- 'index' => 'review_text',
65
- 'renderer' => 'feedbackcompany/adminhtml_feedbackreviews_renderer_experience',
66
- ));
67
-
68
- $this->addColumn('score', array(
69
- 'header' => Mage::helper('feedbackcompany')->__('Score'),
70
- 'align' => 'left',
71
- 'index' => 'score',
72
- 'renderer' => 'feedbackcompany/adminhtml_widget_grid_stars',
73
- 'width' => '110',
74
- 'filter' => false,
75
- 'sortable' => true,
76
- ));
77
-
78
- $this->addColumn('customer_active', array(
79
- 'header' => Mage::helper('feedbackcompany')->__('Purchase'),
80
- 'align' => 'left',
81
- 'index' => 'customer_active',
82
- 'type' => 'options',
83
- 'options' => array(
84
- 'sometimes' => Mage::helper('feedbackcompany')->__('Sometimes'),
85
- 'regularly' => Mage::helper('feedbackcompany')->__('Regularly'),
86
- 'often' => Mage::helper('feedbackcompany')->__('Often'),
87
- ),
88
- ));
89
-
90
- $this->addColumn('customer_sex', array(
91
- 'header' => Mage::helper('feedbackcompany')->__('Gender'),
92
- 'align' => 'left',
93
- 'index' => 'customer_sex',
94
- 'type' => 'options',
95
- 'options' => array(
96
- 'male' => Mage::helper('feedbackcompany')->__('Male'),
97
- 'female' => Mage::helper('feedbackcompany')->__('Female'),
98
- ),
99
- ));
100
-
101
- $this->addColumn('customer_age', array(
102
- 'header' => Mage::helper('feedbackcompany')->__('Age'),
103
- 'align' => 'left',
104
- 'index' => 'customer_age',
105
- 'width' => '50',
106
- ));
107
-
108
- $this->addColumn('date_created', array(
109
- 'header' => Mage::helper('feedbackcompany')->__('Date'),
110
- 'align' => 'left',
111
- 'type' => 'date',
112
- 'index' => 'date_created',
113
- 'width' => '140',
114
- ));
115
-
116
- $this->addColumn('sidebar', array(
117
- 'header' => Mage::helper('feedbackcompany')->__('Sidebar'),
118
- 'align' => 'left',
119
- 'width' => '80px',
120
- 'index' => 'sidebar',
121
- 'type' => 'options',
122
- 'options' => array(
123
- 0 => Mage::helper('feedbackcompany')->__('No'),
124
- 1 => Mage::helper('feedbackcompany')->__('Yes'),
125
- ),
126
- ));
127
-
128
- $this->addColumn('status', array(
129
- 'header' => Mage::helper('feedbackcompany')->__('Active'),
130
- 'align' => 'left',
131
- 'width' => '80px',
132
- 'index' => 'status',
133
- 'type' => 'options',
134
- 'options' => array(
135
- 0 => Mage::helper('feedbackcompany')->__('No'),
136
- 1 => Mage::helper('feedbackcompany')->__('Yes'),
137
- ),
138
- ));
139
-
140
- return parent::_prepareColumns();
141
- }
142
-
143
- protected function _prepareMassaction()
144
- {
145
- $this->setMassactionIdField('review_id');
146
- $this->getMassactionBlock()->setFormFieldName('reviewids');
147
-
148
- $this->getMassactionBlock()->addItem('hide', array(
149
- 'label' => Mage::helper('feedbackcompany')->__('Set to invisible'),
150
- 'url' => $this->getUrl('*/*/massDisable'),
151
- ));
152
- $this->getMassactionBlock()->addItem('visible', array(
153
- 'label' => Mage::helper('feedbackcompany')->__('Set to visible'),
154
- 'url' => $this->getUrl('*/*/massEnable'),
155
- ));
156
- $this->getMassactionBlock()->addItem('addsidebar', array(
157
- 'label' => Mage::helper('feedbackcompany')->__('Add to Sidebar'),
158
- 'url' => $this->getUrl('*/*/massEnableSidebar'),
159
- ));
160
- $this->getMassactionBlock()->addItem('removesidebar', array(
161
- 'label' => Mage::helper('feedbackcompany')->__('Remove from Sidebar'),
162
- 'url' => $this->getUrl('*/*/massDisableSidebar'),
163
- ));
164
- return $this;
165
- }
166
-
167
- public function getRowUrl($row) {
168
- return false;
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 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_Widget_Buttons_Process extends Mage_Adminhtml_Block_System_Config_Form_Field {
23
 
24
- protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
25
- {
26
- $this->setElement($element);
27
- $url = $this->getUrl('*/feedbackreviews/process');
28
- $html = $this->getLayout()->createBlock('adminhtml/widget_button')
29
- ->setType('button')
30
- ->setClass('scalable')
31
- ->setLabel(Mage::helper('feedbackcompany')->__('Import all reviews'))
32
- ->setOnClick("setLocation('$url')")
33
- ->toHtml();
34
- return $html;
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 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_Widget_Buttons_Productreviews extends Mage_Adminhtml_Block_System_Config_Form_Field {
23
 
24
- protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
25
- {
26
- $this->setElement($element);
27
- $url = $this->getUrl('*/feedbackreviews/productreviews');
28
- $html = $this->getLayout()->createBlock('adminhtml/widget_button')
29
- ->setType('button')
30
- ->setClass('scalable')
31
- ->setLabel(Mage::helper('feedbackcompany')->__('Process Manually'))
32
- ->setOnClick("setLocation('$url')")
33
- ->toHtml();
34
- return $html;
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 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_Widget_Field_Version extends Mage_Adminhtml_Block_System_Config_Form_Field {
23
 
24
- public function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
25
- {
26
- return Mage::getConfig()->getNode()->modules->Magmodules_Feedbackcompany->version;
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 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_Widget_Form_Heading extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface {
 
 
23
 
24
- public function render(Varien_Data_Form_Element_Abstract $element)
25
- {
26
- $useContainerId = $element->getData('use_container_id');
27
- return sprintf('<tr class="system-fieldset-sub-head" id="row_%s"><td colspan="5"><h4>%s</h4></td></tr>',
28
- $element->getHtmlId(), $element->getLabel()
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 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
- class Magmodules_Feedbackcompany_Block_Adminhtml_Widget_Form_Note extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface {
22
 
23
- public function render(Varien_Data_Form_Element_Abstract $element)
 
 
 
 
 
 
 
 
24
  {
25
- $useContainerId = $element->getData('use_container_id');
26
- return sprintf('<tr id="row_%s"><td colspan="5" class="label" style="margin-bottom: 10px;">%s</td></tr>',
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 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_Widget_Grid_Log extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Action {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
 
24
- public function render(Varien_Object $row)
25
- {
26
- $msg = '';
27
- $type = $row->getType();
28
 
29
- if($type == 'reviews') {
30
- $updates = '';
31
- if($row->getReviewNew() > 0) {
32
- $msg .= Mage::helper('feedbackcompany')->__('%s new review(s)', $row->getReviewNew());
33
- $updates++;
34
- }
35
- if($row->getReviewUpdate() > 0) {
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
- if($type == 'productreviews') {
54
- if($row->getReviewNew() > 0) {
55
- $msg = Mage::helper('feedbackcompany')->__('%s new productreview(s) imported', $row->getReviewNew());
56
- } else {
57
- $msg = '';
58
- }
59
- }
60
-
61
- if($type == 'invitation') {
62
- if($row->getOrderId()) {
63
- $order = Mage::getModel('sales/order')->load($row->getOrderId());
64
- $increment_id = $order->getIncrementId();
65
- $order_url = Mage::helper('adminhtml')->getUrl("adminhtml/sales_order/view", array('order_id'=> $row->getOrderId()));
66
- $msg = Mage::helper('feedbackcompany')->__('%s - %s', '<a href="' . $order_url . '">#' . $increment_id .'</a>', $row->getResponse());
67
- }
68
- }
69
 
70
- return ucfirst($msg);
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 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_Widget_Grid_Seconds 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
- 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 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_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
- return $output;
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 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_Widget_Info_Info extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface {
23
 
24
- public function render(Varien_Data_Form_Element_Abstract $element)
 
 
 
 
 
 
 
 
 
25
  {
26
- $magento_version = Mage::getVersion();
27
- $module_version = Mage::getConfig()->getNode()->modules->Magmodules_Feedbackcompany->version;
28
- $logo_link = '//www.magmodules.eu/logo/feedbackcompany/' . $module_version . '/' . $magento_version . '/logo.png';
29
 
30
- $html = '<div style="background:url(\'' . $logo_link . '\') no-repeat scroll 15px center #EAF0EE;border:1px solid #CCCCCC;margin-bottom:10px;padding:10px 5px 5px 200px;">
31
- <h4>About Magmodules.eu</h4>
32
- <p>We are a Magento only E-commerce Agency located in the Netherlands.<br>
33
- <br />
34
- <table width="500px" border="0">
35
- <tr>
36
- <td width="58%">View more extensions from us:</td>
37
- <td width="42%"><a href="http://www.magentocommerce.com/magento-connect/developer/Magmodules" target="_blank">Magento Connect</a></td>
38
- </tr>
39
- <tr>
40
- <td>For Help:</td>
41
- <td><a href="https://www.magmodules.eu/support.html?ext=feedbackcompany">Visit our Support Page</a></td>
42
- </tr>
43
- <tr>
44
- <td height="30">Visit our website:</td>
45
- <td><a href="http://www.magmodules.eu" target="_blank">www.magmodules.eu</a></td>
46
- </tr>
47
- <tr>
48
- <td height="30"><strong>Need help?</strong></td>
49
- <td><strong><a href="http://www.magmodules.eu/help/feedbackcompany" target="_blank">Online manual</a></strong></td>
50
- </tr>
51
- </table>
52
- </div>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 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_Custom extends Mage_Core_Block_Template {
23
 
24
- protected function _construct()
 
 
 
 
 
 
25
  {
26
- parent::_construct();
27
-
28
- $blockType = $this->getData("blocktype");
29
- $blockTypeTemplate = '';
30
-
31
- if($blockType == 'sidebar') {
32
- $total = $this->helper('feedbackcompany')->getTotalScore();
33
- $enabled = $this->helper('feedbackcompany')->getBlockEnabled('sidebar');
34
- $sidebarreviews = $this->helper('feedbackcompany')->getSidebarCollection('sidebar');
35
- if($total && $enabled && $sidebarreviews) {
36
- $this->setTotals($total);
37
- $this->setReviews($sidebarreviews);
38
- $blockTypeTemplate = 'magmodules/feedbackcompany/widget/sidebar.phtml';
39
- }
40
- }
41
-
42
- if($blockType == 'medium') {
43
- $total = $this->helper('feedbackcompany')->getTotalScore();
44
- $enabled = $this->helper('feedbackcompany')->getBlockEnabled('medium');
45
- if($total && $enabled) {
46
- $this->setTotals($total);
47
- $blockTypeTemplate = 'magmodules/feedbackcompany/widget/medium.phtml';
48
- }
49
- }
50
-
51
- if($blockType == 'small') {
52
- $total = $this->helper('feedbackcompany')->getTotalScore();
53
- $enabled = $this->helper('feedbackcompany')->getBlockEnabled('small');
54
- if($total && $enabled) {
55
- $this->setTotals($total);
56
- $blockTypeTemplate = 'magmodules/feedbackcompany/widget/small.phtml';
57
- }
58
- }
59
 
60
- if($blockType == 'summary') {
61
- $total = $this->helper('feedbackcompany')->getTotalScore();
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
- $storeId = Mage::app()->getStore()->getStoreId();
71
- $this->addData(array(
72
- 'cache_lifetime' => 7200,
73
- 'cache_tags' => array(Mage_Cms_Model_Block::CACHE_TAG, Magmodules_Feedbackcompany_Model_Reviews::CACHE_TAG),
74
- 'cache_key' => $storeId . '-' . $blockType . '-feedback-block',
75
- ));
76
- parent::_construct();
77
- $this->setTemplate($blockTypeTemplate);
78
- }
 
 
 
79
  }
80
-
81
- public function getFeedbackcompanyData()
82
- {
83
- return $this->helper('feedbackcompany')->getTotalScore();
84
- }
85
 
86
- function formatContent($sidebarreview, $sidebar)
87
- {
88
- return $this->helper('feedbackcompany')->formatContent($sidebarreview, $sidebar);
89
- }
 
 
 
90
 
91
- function getReviewsUrl($type)
92
- {
93
- return $this->helper('feedbackcompany')->getReviewsUrl($type);
94
- }
 
 
 
 
 
 
95
 
96
- public function getSnippetsEnabled($sidebar)
97
- {
98
- return $this->helper('feedbackcompany')->getSnippetsEnabled($sidebar);
99
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
100
 
101
- public function getLatestReview()
102
- {
103
- return $this->helper('feedbackcompany')->getLatestReview();
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 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_Header extends Mage_Core_Block_Template {
23
-
24
- protected function _construct()
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
- function getReviewsUrl()
37
- {
38
- return $this->helper('feedbackcompany')->getReviewsUrl('header');
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 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_Reviews extends Mage_Core_Block_Template {
23
 
24
- public function __construct()
25
- {
26
- parent::__construct();
27
- $shop_id = Mage::getStoreConfig('feedbackcompany/general/api_id');
28
- $collection = Mage::getModel('feedbackcompany/reviews')->getCollection();
29
- $collection->setOrder('date_created', 'DESC');
30
- $collection->addFieldToFilter('status',1);
31
- $collection->addFieldToFilter('shop_id', $shop_id);
32
- $this->setReviews($collection);
33
- $stats = Mage::getModel('feedbackcompany/stats')->load($shop_id, 'shop_id');
34
- $this->setStats($stats);
35
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
 
37
- public function _prepareLayout()
38
- {
39
- parent::_prepareLayout();
40
- $pager = $this->getLayout()->createBlock('page/html_pager', 'feedbackcompany.pager');
41
- if(Mage::getStoreConfig('feedbackcompany/overview/enable_paging')) {
42
- $fieldPerPage = Mage::getStoreConfig('feedbackcompany/overview/paging_settings');
43
- $fieldPerPage = explode(',', $fieldPerPage);
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
- public function getPagerHtml()
56
- {
57
- return $this->getChildHtml('pager');
58
- }
59
-
60
- public function getFormUrl()
61
- {
62
- return $this->helper('feedbackcompany')->getFormUrl();
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 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_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 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_Helper_Data extends Mage_Core_Helper_Abstract {
23
-
24
- public function getTotalScore()
25
- {
26
- if(Mage::getStoreConfig('feedbackcompany/general/enabled')) {
27
- $shop_id = Mage::getStoreConfig('feedbackcompany/general/api_id');
28
- $review_stats = Mage::getModel('feedbackcompany/stats')->load($shop_id, 'shop_id');
29
- if($review_stats->getScore() > 0) {
30
- $review_stats->setPercentage($review_stats->getScore());
31
- $review_stats->setStarsQty(number_format(($review_stats->getScore() / 10), 1, ',', ''));
32
- return $review_stats;
33
- }
34
- }
35
- }
36
-
37
- public function getStyle($type = 'sidebar')
38
- {
39
- if($type == 'left') {
40
- return Mage::getStoreConfig('feedbackcompany/sidebar/left_style');
41
- }
42
- if($type == 'right') {
43
- return Mage::getStoreConfig('feedbackcompany/sidebar/right_style');
44
- }
45
- if($type == 'sidebar') {
46
- return Mage::getStoreConfig('feedbackcompany/block/sidebar_style');
47
- }
48
- }
49
-
50
- public function getSnippetsEnabled($type = 'sidebar')
51
- {
52
- if(Mage::app()->getRequest()->getRouteName() == 'feedbackcompany') {
53
- return false;
54
- } else {
55
- switch ($type) {
56
- case 'left':
57
- return Mage::getStoreConfig('feedbackcompany/sidebar/left_snippets');
58
- break;
59
- case 'right':
60
- return Mage::getStoreConfig('feedbackcompany/sidebar/right_snippets');
61
- break;
62
- case 'sidebar':
63
- return Mage::getStoreConfig('feedbackcompany/block/sidebar_snippets');
64
- break;
65
- case 'small':
66
- return Mage::getStoreConfig('feedbackcompany/block/small_snippets');
67
- break;
68
- case 'header':
69
- return Mage::getStoreConfig('feedbackcompany/block/header_snippets');
70
- break;
71
- case 'medium':
72
- return Mage::getStoreConfig('feedbackcompany/block/medium_snippets');
73
- break;
74
- }
75
- }
76
- }
77
-
78
- function getReviewsUrl($type)
79
- {
80
- $link = '';
81
- switch ($type) {
82
- case 'left':
83
- $link = Mage::getStoreConfig('feedbackcompany/sidebar/left_link');
84
- break;
85
- case 'right':
86
- $link = Mage::getStoreConfig('feedbackcompany/sidebar/right_link');
87
- break;
88
- case 'sidebar':
89
- $link = Mage::getStoreConfig('feedbackcompany/block/sidebar_link');
90
- break;
91
- case 'small':
92
- $link = Mage::getStoreConfig('feedbackcompany/block/small_link');
93
- break;
94
- case 'header':
95
- $link = Mage::getStoreConfig('feedbackcompany/block/header_link');
96
- break;
97
- case 'medium':
98
- $link = Mage::getStoreConfig('feedbackcompany/block/medium_link');
99
- break;
100
- }
101
- if($link == 'internal') {
102
- return Mage::getBaseUrl() . 'feedbackcompany';
103
- }
104
- if($link == 'external') {
105
- return Mage::getStoreConfig('feedbackcompany/general/url');
106
- }
107
- return false;
108
- }
109
-
110
- function getSidebarCollection($sidebar)
111
- {
112
- $enabled = ''; $qty = '5';
113
- if(Mage::getStoreConfig('feedbackcompany/general/enabled')) {
114
- if($sidebar == 'left') {
115
- $qty = Mage::getStoreConfig('feedbackcompany/sidebar/left_qty');
116
- $enabled = Mage::getStoreConfig('feedbackcompany/sidebar/left');
117
- }
118
- if($sidebar == 'right') {
119
- $qty = Mage::getStoreConfig('feedbackcompany/sidebar/right_qty');
120
- $enabled = Mage::getStoreConfig('feedbackcompany/sidebar/right');
121
- }
122
- if($sidebar == 'sidebar') {
123
- $qty = Mage::getStoreConfig('feedbackcompany/block/sidebar_qty');
124
- $enabled = Mage::getStoreConfig('feedbackcompany/block/sidebar');
125
- }
126
- }
127
- if($enabled) {
128
- $shop_id = Mage::getStoreConfig('feedbackcompany/general/api_id');
129
- $reviews = Mage::getModel("feedbackcompany/reviews")->getCollection();
130
- $reviews->setOrder('date_created', 'DESC');
131
- $reviews->addFieldToFilter('status',1);
132
- $reviews->addFieldToFilter('sidebar',1);
133
- $reviews->addFieldToFilter('shop_id', array('eq'=> array($shop_id)));
134
- $reviews->setPageSize($qty);
135
- $reviews->load();
136
- return $reviews;
137
- }
138
- return false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
139
  }
140
 
141
- function getLatestReview()
142
- {
143
- if(Mage::getStoreConfig('feedbackcompany/block/medium_review')) {
144
- $shop_id = Mage::getStoreConfig('feedbackcompany/general/api_id');
145
- $review = Mage::getModel("feedbackcompany/reviews")->getCollection();
146
- $review->setOrder('date_created', 'DESC');
147
- $review->addFieldToFilter('status',1);
148
- $review->addFieldToFilter('review_text', array('notnull' => true));
149
- $review->addFieldToFilter('shop_id', array('eq'=> array($shop_id)));
150
- return $review->getFirstItem();
151
- }
152
- return false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
153
  }
154
-
155
- function formatContent($sidebarreview, $sidebar = 'left')
156
- {
157
- $content = $sidebarreview->getReviewText();
158
- $char_limit = '';
159
- if($sidebar == 'left') {
160
- $char_limit = Mage::getStoreConfig('feedbackcompany/sidebar/left_lenght');
161
- }
162
- if($sidebar == 'right') {
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
- if(Mage::getStoreConfig('feedbackcompany/general/enabled')) {
185
- switch ($type) {
186
- case 'left':
187
- return Mage::getStoreConfig('feedbackcompany/sidebar/left');
188
- break;
189
- case 'right':
190
- return Mage::getStoreConfig('feedbackcompany/sidebar/right');
191
- break;
192
- case 'sidebar':
193
- return Mage::getStoreConfig('feedbackcompany/block/sidebar');
194
- break;
195
- case 'small':
196
- return Mage::getStoreConfig('feedbackcompany/block/small');
197
- break;
198
- case 'header':
199
- return Mage::getStoreConfig('feedbackcompany/block/header');
200
- break;
201
- case 'medium':
202
- return Mage::getStoreConfig('feedbackcompany/block/medium');
203
- break;
204
- }
205
- }
206
- return false;
207
- }
208
-
209
- public function getHtmlStars($rating, $type = 'small')
210
- {
211
- $perc = $rating;
212
- $show = '';
213
- if($type == 'small') {
214
- $show = Mage::getStoreConfig('feedbackcompany/block/small_stars');
215
- }
216
- if($type == 'medium') {
217
- $show = Mage::getStoreConfig('feedbackcompany/block/medium_stars');
218
- }
219
- if($show) {
220
- $html = '<div class="rating-box">';
221
- $html .= ' <div class="rating" style="width:' . $perc . '%"></div>';
222
- $html .= '</div>';
223
- return $html;
224
- }
225
- return false;
226
- }
227
-
228
- public function formatScoresReview($review)
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 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_Model_Api extends Mage_Core_Model_Abstract {
23
-
24
- public function processFeed($storeId = 0, $type)
25
- {
26
- if($feed = $this->getFeed($storeId, $type)) {
27
- $results = Mage::getModel('feedbackcompany/reviews')->processFeed($feed, $storeId, $type);
28
- $results['stats'] = Mage::getModel('feedbackcompany/stats')->processFeed($feed, $storeId);
29
- return $results;
30
- }
31
- return false;
32
- }
33
-
34
- public function getFeed($storeId, $type = '', $interval = '')
35
- {
36
- if($type == 'productreviews') {
37
- $result = array();
38
- $client_token = Mage::helper('feedbackcompany')->getUncachedConfigValue('feedbackcompany/productreviews/client_token', $storeId);
39
- if(!$client_token) {
40
- $client_token = $this->getOauthToken($storeId);
41
- if($client_token['status'] == 'ERROR') {
42
- return $client_token;
43
- } else {
44
- $client_token = $client_token['client_token'];
45
- }
46
- }
47
- $request = curl_init();
48
- curl_setopt($request, CURLOPT_SSL_VERIFYPEER, false);
49
- curl_setopt($request, CURLOPT_URL, 'https://beoordelingen.feedbackcompany.nl/api/v1/review/getrecent/?interval=' . $interval . '&type=product&unixts=1');
50
- curl_setopt($request, CURLOPT_HTTPHEADER, array('Authorization: Bearer ' . $client_token));
51
- curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
52
- $api_result = json_decode($content = curl_exec($request));
53
- if($api_result) {
54
- if(isset($api_result->message)) {
55
- if($api_result->message == 'OK') {
56
- $result['status'] = 'OK';
57
- $result['feed'] = $api_result->data[0];
58
- return $result;
59
- }
60
- }
61
- $config = new Mage_Core_Model_Config();
62
- $config->saveConfig('feedbackcompany/productreviews/client_token', '', 'stores', $storeId);
63
- $result['status'] = 'ERROR';
64
- $result['error'] = $api_result->error;
65
- return $result;
66
- } else {
67
- $result['status'] = 'ERROR';
68
- $result['error'] = Mage::helper('feedbackcompany')->__('Error connect to the API.');
69
- return $result;
70
- }
71
- } else {
72
- $api_id = trim(Mage::getStoreConfig('feedbackcompany/general/api_id', $storeId));
73
- if($type == 'stats') {
74
- $api_url = 'https://beoordelingen.feedbackcompany.nl/samenvoordeel/scripts/flexreview/getreviewxml.cfm?ws=' . $api_id . '&publishDetails=0&nor=0&Basescore=10';
75
- }
76
- if(($type == 'reviews') || ($type == 'history')) {
77
- $api_url = 'https://beoordelingen.feedbackcompany.nl/samenvoordeel/scripts/flexreview/getreviewxml.cfm?ws=' . $api_id . '&publishIDs=1&nor=100&publishDetails=1&publishOnHold=0&sort=desc&emlpass=test&publishCompResponse=1&Basescore=10';
78
- }
79
- if($type == 'all') {
80
- $api_url = 'https://beoordelingen.feedbackcompany.nl/samenvoordeel/scripts/flexreview/getreviewxml.cfm?ws=' . $api_id . '&publishIDs=1&nor=10000&publishDetails=1&publishOnHold=0&sort=desc&emlpass=test&publishCompResponse=1&Basescore=10';
81
- }
82
-
83
- if($api_id) {
84
- $xml = simplexml_load_file($api_url);
85
- if($xml) {
86
- return $xml;
87
- }
88
- }
89
- }
90
- return false;
91
- }
92
-
93
- public function sendInvitation($order)
94
- {
95
- $store_id = $order->getStoreId();
96
- $inv_status = Mage::getStoreConfig('feedbackcompany/invitation/status', $store_id);
97
- $date_now = Mage::getModel('core/date')->timestamp(time());
98
- $date_order = Mage::getModel('core/date')->timestamp($order->getCreatedAt());
99
- $date_diff = (($date_order - $date_now) / 86400);
100
- $backlog = Mage::getStoreConfig('feedbackcompany/invitation/backlog', $store_id);
101
- $sent = $order->getFeedbackSent();
102
-
103
- if($backlog < 1) {
104
- $backlog = 30;
105
- }
106
-
107
- if(($order->getStatus() == $inv_status) && ($date_diff < $backlog) && (!$sent)) {
108
-
109
- $start_time = microtime(true);
110
- $crontype = 'orderupdate';
111
- $order_id = $order->getIncrementId();
112
- $api_id = Mage::getStoreConfig('feedbackcompany/general/api_id', $store_id);
113
- $api_key = Mage::getStoreConfig('feedbackcompany/invitation/connector', $store_id);
114
- $delay = Mage::getStoreConfig('feedbackcompany/invitation/delay', $store_id);
115
- $resend = Mage::getStoreConfig('feedbackcompany/invitation/resend', $store_id);
116
- $remind_delay = Mage::getStoreConfig('feedbackcompany/invitation/remind_delay', $store_id);
117
- $min_order = Mage::getStoreConfig('feedbackcompany/invitation/min_order_total', $store_id);
118
- $exclude_cat = Mage::getStoreConfig('feedbackcompany/invitation/exclude_category', $store_id);
119
- $productreviews = Mage::getStoreConfig('feedbackcompany/productreviews/enabled', $store_id);
120
- $email = $order->getCustomerEmail();
121
- $order_number = $order->getIncrementID();
122
- $order_total = $order->getGrandTotal();
123
- $aanhef = $order->getCustomerName();
124
- $check_sum = 0;
125
- $categories = array();
126
- $exclude_reason = array();
127
- $request = array();
128
-
129
- // SendInivation Request
130
- $request['action'] = 'sendInvitation';
131
-
132
- // Exclude by Category
133
- if($exclude_cat) {
134
- $excl_cats = Mage::getStoreConfig('feedbackcompany/invitation/exclude_categories', $store_id);
135
- $excl_categories = explode(',', $excl_cats);
136
- } else {
137
- $excl_categories = '';
138
- }
139
-
140
- // Get all Products
141
- $filtercode = array(); $i = 1;
142
- $website_url = Mage::app()->getStore($store_id)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
143
- $media_url = Mage::app()->getStore($store_id)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog' . DS . 'product';
144
-
145
- foreach($order->getAllVisibleItems() as $item) {
146
- $filtercode[] = urlencode(trim($item->getSku()));
147
- $filtercode[] = urlencode(trim($item->getName()));
148
- if($productreviews) {
149
- $product = Mage::getModel('catalog/product')->setStoreId($store_id)->load($item->getProductId());
150
- if(($product->getStatus() == '1') && ($product->getVisibility() != '1')) {
151
- $var_url = urlencode('product_url[' .$i. ']');
152
- $var_text = urlencode('product_text[' .$i. ']');
153
- $var_id = urlencode('product_ids[' .$i. ']');
154
- $var_photo = urlencode('product_photo[' .$i. ']');
155
- if($product->getUrlPath()) {
156
- $deeplink = $website_url . $product->getUrlPath();
157
- $image_url = '';
158
- if($product->getImage() && ($product->getImage() != 'no_selection')) {
159
- $image_url = $media_url . $product->getImage();
160
- }
161
- $request[$var_url] = urlencode($deeplink);
162
- $request[$var_text] = urlencode(trim($product->getName()));
163
- $request[$var_id] = urlencode('SKU=' . trim($product->getSku()));
164
- $request[$var_photo] = urlencode($image_url);
165
- $i++;
166
- }
167
- }
168
- }
169
-
170
- if($exclude_cat) {
171
- if(!$product) {
172
- $product = Mage::getModel('catalog/product')->setStoreId($store_id)->load($item->getProductId());
173
- }
174
- $categories = array_merge($categories, $product->getCategoryIds());
175
- }
176
- }
177
-
178
- $filtercode = implode(',', $filtercode);
179
-
180
- // Get Checksum
181
- for($i = 0; $i < strlen($email); $i++) {
182
- $check_sum += ord($email[$i]);
183
- }
184
-
185
- $exclude = 0;
186
- if(!empty($min_order)) {
187
- if($min_order >= $order_total) {
188
- $exclude = 1;
189
- $exclude_reason[] = Mage::helper('feedbackcompany')->__('Below minimum order value');
190
- }
191
- }
192
-
193
- if($order->getStatus() != $inv_status) {
194
- $exclude = 1;
195
- }
196
-
197
- if($excl_categories) {
198
- foreach($categories as $cat) {
199
- if(in_array($cat, $excl_categories)) {
200
- $exclude = 1;
201
- $exclude_reason[] = Mage::helper('feedbackcompany')->__('Category is excluded');
202
- }
203
- }
204
- }
205
-
206
- if($exclude == 1) {
207
- if($exclude_reason) {
208
- $reason = implode(',', array_unique($exclude_reason));
209
- $reason = 'Not invited: ' . $reason;
210
- $writelog = Mage::getModel('feedbackcompany/log')->addToLog('invitation', $order->getStoreId(), '', $reason, (microtime(true) - $start_time), $crontype, '', $order->getId());
211
- } else {
212
- return false;
213
- }
214
- } else {
215
-
216
- $request['filtercode'] = $filtercode;
217
- $request['Chksum'] = $check_sum;
218
- $request['orderNumber'] = $order_number;
219
- $request['resendIfDouble'] = $resend;
220
- $request['remindDelay'] = $remind_delay;
221
- $request['delay'] = $delay;
222
- $request['aanhef'] = urlencode($aanhef);
223
- $request['user'] = urlencode($email);
224
- $request['connector'] = $api_key;
225
-
226
- $post = '';
227
- foreach(array_reverse($request) as $key => $value) {
228
- $post .= '&' . $key . '=' . trim($value);
229
- }
230
- $post = trim($post, '&');
231
-
232
- // Connect to API
233
- $url = 'https://connect.feedbackcompany.nl/feedback/';
234
- $feedbackconnect = curl_init($url . '?' . $post);
235
- curl_setopt($feedbackconnect, CURLOPT_VERBOSE, 1);
236
- curl_setopt($feedbackconnect, CURLOPT_FAILONERROR, false);
237
- curl_setopt($feedbackconnect, CURLOPT_HEADER, 0);
238
- curl_setopt($feedbackconnect, CURLOPT_FOLLOWLOCATION, 1);
239
- curl_setopt($feedbackconnect, CURLOPT_RETURNTRANSFER, 1);
240
- curl_setopt($feedbackconnect, CURLOPT_SSL_VERIFYPEER, false);
241
- $response = curl_exec($feedbackconnect);
242
- curl_close($feedbackconnect);
243
-
244
- if($response) {
245
- if($response == 'Request OK.') {
246
- $order->setFeedbackSent(1)->save();
247
- $response_html = $response;
248
- } else {
249
- $response_html = 'Error sending review request!';
250
- }
251
- } else {
252
- $response_html = 'No response from https://connect.feedbackcompany.nl';
253
- }
254
-
255
- // Write to log
256
- $writelog = Mage::getModel('feedbackcompany/log')->addToLog('invitation', $order->getStoreId(), '', $response_html, (microtime(true) - $start_time), $crontype, $url . '?' . $post, $order->getId());
257
- return true;
258
- }
259
- }
260
- return false;
261
- }
262
-
263
- public function getStoreIds($type = '')
264
- {
265
- $store_ids = array();
266
- $stores = Mage::getModel('core/store')->getCollection();
267
- if($type == 'oauth') {
268
- foreach ($stores as $store) {
269
- if($store->getIsActive()) {
270
- $enabled = Mage::getStoreConfig('feedbackcompany/productreviews/enabled', $store->getId());
271
- $client_id = Mage::getStoreConfig('feedbackcompany/productreviews/client_id', $store->getId());
272
- if($enabled && $client_id) {
273
- $store_ids[] = $store->getId();
274
- }
275
- }
276
- }
277
- return $store_ids;
278
- } else {
279
- $api_ids = array();
280
- foreach ($stores as $store) {
281
- if($store->getIsActive()) {
282
- $api_id = Mage::getStoreConfig('feedbackcompany/general/api_id', $store->getId());
283
- if(!in_array($api_id, $api_ids)) {
284
- $api_ids[] = $api_id; $store_ids[] = $store->getId();
285
- }
286
- }
287
- }
288
- return $store_ids;
289
- }
290
- }
291
-
292
- public function getOauthToken($storeId)
293
- {
294
- $client_id = Mage::getStoreConfig('feedbackcompany/productreviews/client_id', $storeId);
295
- $client_secret = Mage::getStoreConfig('feedbackcompany/productreviews/client_secret', $storeId);
296
- if(!empty($client_id) && !empty($client_secret)) {
297
- $url = "https://beoordelingen.feedbackcompany.nl/api/v1/oauth2/token";
298
- $get_array = array("client_id" => $client_id, "client_secret" => $client_secret, "grant_type" => "authorization_code");
299
- $feedbackconnect = curl_init($url . '?' . http_build_query($get_array));
300
- curl_setopt($feedbackconnect, CURLOPT_VERBOSE, 1);
301
- curl_setopt($feedbackconnect, CURLOPT_FAILONERROR, false);
302
- curl_setopt($feedbackconnect, CURLOPT_HEADER, 0);
303
- curl_setopt($feedbackconnect, CURLOPT_FOLLOWLOCATION, 1);
304
- curl_setopt($feedbackconnect, CURLOPT_RETURNTRANSFER, 1);
305
- curl_setopt($feedbackconnect, CURLOPT_SSL_VERIFYPEER, false);
306
- $response = curl_exec($feedbackconnect);
307
- curl_close($feedbackconnect);
308
- $response = json_decode($response);
309
- if(isset($response->access_token)) {
310
- $store_ids = Mage::getModel('feedbackcompany/productreviews')->getAllStoreViews($storeId);
311
- $config = new Mage_Core_Model_Config();
312
- foreach($store_ids as $store_id) {
313
- $config->saveConfig('feedbackcompany/productreviews/client_token', $response->access_token, 'stores', $store_id);
314
- }
315
- $result = array();
316
- $result['status'] = 'OK';
317
- $result['client_token'] = $response->access_token;
318
- return $result;
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 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_Model_Export extends Mage_Core_Model_Abstract {
23
 
24
- public function getFeed($reviews, $store_id)
25
- {
26
- $csv_data = array();
27
- $csv_data[] = $this->getHeader();
28
- foreach($reviews as $reviewId) {
29
- $review = Mage::getModel('review/review')->load($reviewId);
30
- $product = Mage::getModel('catalog/product')->setStoreId($store_id)->load($review->getEntityPkValue());
31
- if($review && $product) {
32
- $text = trim($review->getTitle()) . ' ' . trim(preg_replace('/\s+/', ' ', $review->getDetail()));
33
- if(strlen($text) > 1) {
34
- $date = date('Ymd', strtotime($review->getCreatedAt()));
35
- $name = Mage::helper('core/string')->truncate($review->getNickname(), 250);
36
- $email = '';
37
- $gender = '';
38
- $city = '';
39
- $country = '';
40
- $product_name = trim($product->getName());
41
- $product_review = str_replace(';', '', $text);
42
- $product_id = $review->getEntityPkValue();
43
- $product_sku = $product->getSku();
44
- $product_url = $product->getProductUrl();
45
- if($product_url) {
46
- $product_url = preg_replace('/\?.*/', '', $product_url);
47
- }
48
- $product_opinion_id = $review->getFeedbackcompanyId();
49
- $score = array();
50
- $votes = Mage::getModel('rating/rating_option_vote')->getResourceCollection()->setReviewFilter($reviewId)->setStoreFilter($store_id)->load();
51
- foreach($votes as $vote) {
52
- if($vote->getPercent() > 0) {
53
- $score[] = $vote->getPercent();
54
- }
55
- }
56
- if(count($votes) > 0) {
57
- $product_score = round(((array_sum($score) / count($votes)) / 20), 2);
58
- } else {
59
- $product_score = '';
60
- }
61
- if($review->getCustomerId()) {
62
- $customer = Mage::getModel('customer/customer')->load($review->getCustomerId());
63
- $address = Mage::getModel('customer/address')->load($customer->getDefaultBilling());
64
- $email = $customer->getEmail();
65
- $city = $address->getCity();
66
- $country = $address->getCountry();
67
- }
68
- $csv_data[] = array($date, $name, $email, $gender, '', $city, $country, '', $product_name, $product_score, $product_review, $product_url, $product_id, $product_sku, $product_opinion_id);
69
- }
70
- }
71
- }
72
- return $csv_data;
73
- }
74
-
75
- public function getHeader()
76
- {
77
- $header = array(
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
- 'product_opinion_id',
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 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_Model_Log extends Mage_Core_Model_Abstract {
23
-
24
- public function _construct()
25
- {
26
- parent::_construct();
27
- $this->_init('feedbackcompany/log');
28
- }
29
 
30
- public function addToLog($type, $storeId, $review = '', $response = '', $time, $crontype = '', $api_url = '', $orderId = '')
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
- if($review) {
46
- if(!empty($review['review_updates'])) {
47
- $review_updates = $review['review_updates'];
48
- }
49
- if(!empty($review['review_new'])) {
50
- $review_new = $review['review_new'];
51
- }
52
- if(!empty($review['stats']['msg'])) {
53
- $response = $review['stats']['msg'];
54
- }
55
- }
56
 
57
- $model = Mage::getModel('feedbackcompany/log');
58
- $model->setType($type)
59
- ->setShopId($api_id)
60
- ->setStoreId($storeId)
61
- ->setCompany($company)
62
- ->setReviewUpdate($review_updates)
63
- ->setReviewNew($review_new)
64
- ->setResponse($response)
65
- ->setOrderId($orderId)
66
- ->setCron($crontype)
67
- ->setDate(now())
68
- ->setTime($time)
69
- ->setApiUrl($api_url)
70
- ->save();
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 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_Model_Mysql4_Log extends Mage_Core_Model_Mysql4_Abstract {
23
 
24
- public function _construct()
25
- {
26
- $this->_init('feedbackcompany/log', 'id');
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 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_Model_Mysql4_Log_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
23
 
24
- public function _construct()
25
- {
26
- parent::_construct();
27
- $this->_init('feedbackcompany/log');
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 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_Model_Mysql4_Reviews extends Mage_Core_Model_Mysql4_Abstract {
23
 
24
- public function _construct()
25
- {
26
- $this->_init('feedbackcompany/reviews', 'review_id');
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 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_Model_Mysql4_Reviews_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
23
 
24
- public function _construct()
25
- {
26
- parent::_construct();
27
- $this->_init('feedbackcompany/reviews');
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 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_Model_Mysql4_Stats extends Mage_Core_Model_Mysql4_Abstract {
 
23
 
24
- public function _construct()
25
- {
26
- $this->_init('feedbackcompany/stats', 'id');
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 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_Model_Mysql4_Stats_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
23
 
24
- public function _construct()
25
- {
26
- parent::_construct();
27
- $this->_init('feedbackcompany/stats');
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 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_Model_Observer {
23
 
24
- public function processStats()
25
- {
26
- $storeids = Mage::getModel('feedbackcompany/api')->getStoreIds();
27
- foreach($storeids as $storeid) {
28
- $enabled = Mage::getStoreConfig('feedbackcompany/general/enabled', $storeid);
29
- $cron_enabled = Mage::getStoreConfig('feedbackcompany/reviews/cron', $storeid);
30
- if($enabled && $cron_enabled) {
31
- $crontype = 'stats';
32
- $start_time = microtime(true);
33
- $feed = Mage::getModel('feedbackcompany/api')->getFeed($storeid, $crontype);
34
- $resuls = array();
35
- $results['stats'] = Mage::getModel('feedbackcompany/stats')->processFeed($feed, $storeid);
36
- $results['company'] = $feed->company;
37
- $log = Mage::getModel('feedbackcompany/log')->addToLog('reviews', $storeid, $results, '', (microtime(true) - $start_time), $crontype);
38
- }
39
- }
40
- }
41
 
42
- public function processReviews()
43
- {
44
- $storeids = Mage::getModel('feedbackcompany/api')->getStoreIds();
45
- foreach($storeids as $storeid) {
46
- $enabled = Mage::getStoreConfig('feedbackcompany/general/enabled', $storeid);
47
- $cron_enabled = Mage::getStoreConfig('feedbackcompany/reviews/cron', $storeid);
48
- if($enabled && $cron_enabled) {
49
- $crontype = 'reviews';
50
- $start_time = microtime(true);
51
- $feed = Mage::getModel('feedbackcompany/api')->getFeed($storeid, $crontype);
52
- $results = Mage::getModel('feedbackcompany/reviews')->processFeed($feed, $storeid, $crontype);
53
- $results['stats'] = Mage::getModel('feedbackcompany/stats')->processFeed($feed, $storeid);
54
- $log = Mage::getModel('feedbackcompany/log')->addToLog('reviews', $storeid, $results, '', (microtime(true) - $start_time), $crontype);
55
- }
56
- }
57
- }
58
 
59
- public function processProductreviews()
60
- {
61
- $storeids = Mage::getModel('feedbackcompany/api')->getStoreIds();
62
- foreach($storeids as $storeid) {
63
- $enabled = Mage::getStoreConfig('feedbackcompany/general/enabled', $storeid);
64
- $reviews_enabled = Mage::getStoreConfig('feedbackcompany/productreviews/enabled', $storeid);
65
- $cron_enabled = Mage::getStoreConfig('feedbackcompany/productreviews/cron');
66
- if($enabled && $cron_enabled && $reviews_enabled) {
67
- $crontype = 'productreviews';
68
- $start_time = microtime(true);
69
- $feed = Mage::getModel('feedbackcompany/api')->getFeed($storeid, $crontype, 'last_month');
70
- if($feed['status'] == 'OK') {
71
- $results = Mage::getModel('feedbackcompany/productreviews')->processFeed($feed, $storeid);
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
- public function processHistory()
81
- {
82
- $storeids = Mage::getModel('feedbackcompany/api')->getStoreIds();
83
- foreach($storeids as $storeid) {
84
- $enabled = Mage::getStoreConfig('feedbackcompany/general/enabled', $storeid);
85
- $cron_enabled = Mage::getStoreConfig('feedbackcompany/reviews/cron', $storeid);
86
- if($enabled && $cron_enabled) {
87
- $crontype = 'history';
88
- $start_time = microtime(true); $storeid = 0;
89
- $feed = Mage::getModel('feedbackcompany/api')->getFeed($storeid, $crontype);
90
- $results = Mage::getModel('feedbackcompany/reviews')->processFeed($feed, $storeid, $crontype);
91
- $results['stats'] = Mage::getModel('feedbackcompany/stats')->processFeed($feed, $storeid);
92
- $log = Mage::getModel('feedbackcompany/log')->addToLog('reviews', $storeid, $results, '', (microtime(true) - $start_time), $crontype);
93
- }
94
- }
95
- }
96
 
97
- public function cleanLog()
98
- {
99
- $enabled = Mage::getStoreConfig('feedbackcompany/log/clean', 0);
100
- $days = Mage::getStoreConfig('feedbackcompany/log/clean_days', 0);
101
- if(($enabled) && ($days > 0)) {
102
- $logmodel = Mage::getModel('feedbackcompany/log');
103
- $deldate = date('Y-m-d', strtotime('-' . $days . ' days'));
104
- $logs = $logmodel->getCollection()->addFieldToSelect('id')->addFieldToFilter('date', array('lteq' => $deldate));
105
- foreach ($logs as $log) {
106
- $logmodel->load($log->getId())->delete();
107
- }
108
- }
109
- }
 
 
 
 
110
 
111
- public function processFeedbackInvitationcallAfterShipment($observer)
 
 
 
 
 
112
  {
113
- $shipment = $observer->getEvent()->getShipment();
114
- $order = $shipment->getOrder();
115
- if((Mage::getStoreConfig('feedbackcompany/invitation/enabled', $order->getStoreId())) && (Mage::getStoreConfig('feedbackcompany/invitation/connector', $order->getStoreId()))) {
116
- if($order->getStatus() == Mage::getStoreConfig('feedbackcompany/invitation/status', $order->getStoreId())) {
117
- if(!$order->getFeedbackSent()) {
118
- if(Mage::getStoreConfig('feedbackcompany/invitation/backlog', $order->getStoreId()) > 0) {
119
- $date_diff = floor(time() - strtotime($order->getCreatedAt()))/(60*60*24);
120
- if($date_diff < Mage::getStoreConfig('feedbackcompany/invitation/backlog', $order->getStoreId())) {
121
- Mage::getModel('feedbackcompany/api')->sendInvitation($order);
122
- }
123
- } else {
124
- Mage::getModel('feedbackcompany/api')->sendInvitation($order);
125
- }
126
- }
127
- }
128
- }
129
- }
 
 
 
 
130
 
131
- public function processFeedbackInvitationcall($observer)
132
- {
133
- $order = $observer->getEvent()->getOrder();
134
- if((Mage::getStoreConfig('feedbackcompany/invitation/enabled', $order->getStoreId())) && (Mage::getStoreConfig('feedbackcompany/invitation/connector', $order->getStoreId()))) {
135
- if($order->getStatus() == Mage::getStoreConfig('feedbackcompany/invitation/status', $order->getStoreId())) {
136
- if(!$order->getFeedbackSent()) {
137
- if(Mage::getStoreConfig('feedbackcompany/invitation/backlog', $order->getStoreId()) > 0) {
138
- $date_diff = floor(time() - strtotime($order->getCreatedAt()))/(60*60*24);
139
- if($date_diff < Mage::getStoreConfig('feedbackcompany/invitation/backlog', $order->getStoreId())) {
140
- $value = Mage::getModel('feedbackcompany/api')->sendInvitation($order);
141
- }
142
- } else {
143
- Mage::getModel('feedbackcompany/api')->sendInvitation($order);
144
- }
145
- }
146
- }
147
- }
148
- }
 
 
 
 
 
 
 
 
 
149
 
150
- public function addExportOption($observer)
151
- {
152
- $block = $observer->getEvent()->getBlock();
153
- if(get_class($block) == 'Mage_Adminhtml_Block_Widget_Grid_Massaction' && $block->getRequest()->getControllerName() == 'catalog_product_review') {
154
- $request = Mage::app()->getFrontController()->getRequest();
155
- $block->addItem('reviewsexport', array(
156
- 'label' => Mage::helper('feedbackcompany')->__('Export Reviews'),
157
- 'url' => Mage::app()->getStore()->getUrl('*/feedbackreviews/exportcsv/filter/' . $request->getParam('filter')),
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 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_Model_Productreviews extends Mage_Core_Model_Abstract {
23
-
24
- public function processFeed($feed, $storeid = 0)
25
- {
26
- $new = 0; $updates = 0;
27
- $feed = $feed['feed'];
28
- $status_id = Mage::getStoreConfig('feedbackcompany/productreviews/review_import_status', $storeid);
29
- $rating_id = Mage::getStoreConfig('feedbackcompany/productreviews/review_import_rating', $storeid);
30
- $options = $this->getRatingOptionArray($rating_id);
31
- foreach($feed->product_reviews as $review) {
32
- $feedback_id = $review->product_opinion_id;
33
- $_loadrev = Mage::getModel('review/review')->load($feedback_id, 'feedbackcompany_id');
34
- if(($_loadrev->getReviewId() < 1) && ($review->rating > 0)) {
35
- $_product = Mage::getModel('catalog/product')->loadByAttribute('sku', $review->product_sku);
36
- if($_product) {
37
- $content = $review->review;
38
- if((strlen($content) > 0) && ($review->rating > 0) && (!empty($options[$review->rating]))) {
39
- try {
40
- $title = $this->getFirstSentence($content);
41
- if(strlen($title) > 0) {
42
- $date_created = Mage::getModel('core/date')->timestamp($review->date_created);
43
- $created_at = date('Y-m-d H:i:s', $date_created);
44
- $_review = Mage::getModel('review/review');
45
- $_review->setEntityPkValue($_product->getId());
46
- $_review->setCreatedAt($created_at);
47
- $_review->setTitle($title);
48
- $_review->setFeedbackcompanyId($feedback_id);
49
- $_review->setDetail($content);
50
- $_review->setEntityId(1);
51
- $_review->setStoreId(0);
52
- $_review->setStatusId($status_id);
53
- $_review->setCustomerId(null);
54
- $_review->setNickname($review->client->name);
55
- $_review->setStores($this->getAllStoreViews($storeid));
56
- $_review->setSkipCreatedAtSet(true);
57
- $_review->save();
58
- $_rating = Mage::getModel('rating/rating');
59
- $_rating->setRatingId($rating_id);
60
- $_rating->setReviewId($_review->getId());
61
- $_rating->setCustomerId(null);
62
- $_rating->addOptionVote($options[$review->rating], $_product->getId());
63
- $_review->aggregate();
64
- $new++;
65
- }
66
- } catch (Exception $e) {
67
- Mage::log($e->getMessage(), null, 'feedbackcompany.log');
68
- //Mage::getSingleton('adminhtml/session')->addError(Mage::helper('feedbackcompany')->__('There has been an error, please check var/log/feedbackcompany.log'));
69
- }
70
- }
71
- }
72
- }
73
- }
74
- $config = new Mage_Core_Model_Config();
75
- $config->saveConfig('feedbackcompany/productreviews/lastrun', now(), 'default', 0);
76
- $result = array();
77
- $result['review_updates'] = $updates;
78
- $result['review_new'] = $new;
79
- return $result;
80
- }
81
-
82
- public function getFirstSentence($string)
83
- {
84
- $string = str_replace(" .",".",$string);
85
- $string = str_replace(" ?","?",$string);
86
- $string = str_replace(" !","!",$string);
87
- preg_match('/^.*[^\s](\.|\?|\!)/U', $string, $match);
88
- if(!empty($match[0])) {
89
- return $match[0];
90
- } else {
91
- return Mage::helper('core/string')->truncate($string, 50) . '...';
92
- }
93
- }
94
-
95
- public function getAllStoreViews($storeid)
96
- {
97
- $client_id = Mage::getStoreConfig('feedbackcompany/productreviews/client_id', $storeid);
98
- $client_secret = Mage::getStoreConfig('feedbackcompany/productreviews/client_secret', $storeid);
99
- $reviewstores = array();
100
- $stores = Mage::getModel('core/store')->getCollection();
101
- foreach ($stores as $store) {
102
- if($store->getIsActive()) {
103
- if(Mage::getStoreConfig('feedbackcompany/productreviews/enabled', $store->getId())) {
104
- $st_client_id = Mage::getStoreConfig('feedbackcompany/productreviews/client_id', $store->getId());
105
- $st_client_secret = Mage::getStoreConfig('feedbackcompany/productreviews/client_secret', $store->getId());
106
- if(($client_id == $st_client_id) && ($client_secret == $st_client_secret)) {
107
- $reviewstores[] = $store->getId();
108
- }
109
- }
110
- }
111
- }
112
- return $reviewstores;
113
- }
114
-
115
- public function getRatingOptionArray($rating_id)
116
- {
117
- $resource = Mage::getSingleton('core/resource');
118
- $readConnection = $resource->getConnection('core_read');
119
- $query = "SELECT * FROM " . $resource->getTableName('rating/rating_option') . " WHERE rating_id = '" . $rating_id . "'";
120
- $results = $readConnection->fetchAll($query);
121
- $options = array();
122
- foreach ($results as $option) {
123
- $options[$option['value']] = $option['option_id'];
124
- }
125
- return $options;
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 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_Model_Resource_Review extends Mage_Review_Model_Resource_Review {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
 
24
- protected function _beforeSave(Mage_Core_Model_Abstract $object)
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 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_Model_Reviews extends Mage_Core_Model_Abstract {
23
-
24
- const CACHE_TAG = 'feedback_block';
25
-
26
- public function _construct()
27
- {
28
- parent::_construct();
29
- $this->_init('feedbackcompany/reviews');
30
- }
31
-
32
- public function processFeed($feed, $storeid = 0, $type)
33
- {
34
- $updates = 0; $new = 0; $history = 0;
35
- $api_id = Mage::getStoreConfig('feedbackcompany/general/api_id', $storeid);
36
- $company = Mage::getStoreConfig('feedbackcompany/general/company', $storeid);
37
-
38
- if (!empty($feed->detailslink)) {
39
- foreach($feed->reviewDetails->reviewDetail as $review) {
40
-
41
- $feedback_id = $review->id;
42
- $score = ($review->score / 2);
43
- $score_max = ($review->scoremax / 2);
44
- $review_text = $review->text;
45
- $score_aftersales = ($review->score_aftersales / 2);
46
- $score_checkout = ($review->score_bestelgemak / 2);
47
- $score_information = ($review->score_informatievoorziening / 2);
48
- $score_friendly = ($review->score_klantvriendelijk / 2);
49
- $score_leadtime = ($review->score_levertijd / 2);
50
- $score_responsetime = ($review->score_reactiesnelheid / 2);
51
- $score_order = ($review->score_orderverloop / 2);
52
- $customer_name = $review->user;
53
- $customer_recommend = $review->beveeltAan;
54
- $customer_active = $review->kooptvakeronline;
55
- $customer_sex = $review->geslacht;
56
- $customer_age = $review->leeftijd;
57
- $purchased_products = $review->gekochtproduct;
58
- $text_positive = $review->sterkepunten;
59
- $text_improvements = $review->verbeterpunten;
60
- $company_response = $review->companyResponse;
61
- $date_created = $review->createdate;
62
- $date_created = substr($date_created, 0, 4) . '/' . substr($date_created, 4, 2) . '/' . substr($date_created, 6, 2);
63
- $indatabase = $this->getCollection()->addFieldToFilter('feedback_id', $feedback_id)->getFirstItem();
64
-
65
- if($indatabase->getReviewId()) {
66
- if(($type == 'history') || ($type == 'all')) {
67
- $reviews = Mage::getModel('feedbackcompany/reviews');
68
- $reviews->setReviewId($indatabase->getReviewId())
69
- ->setShopId($api_id)
70
- ->setCompany($company)
71
- ->setFeedbackId($feedback_id)
72
- ->setReviewText($review_text)
73
- ->setScore($score)
74
- ->setScoreMax($score_max)
75
- ->setScoreAftersales($score_aftersales)
76
- ->setScoreCheckout($score_checkout)
77
- ->setScoreInformation($score_information)
78
- ->setScoreFriendly($score_friendly)
79
- ->setScoreLeadtime($score_leadtime)
80
- ->setScoreResponsetime($score_responsetime)
81
- ->setScoreOrder($score_order)
82
- ->setCustomerName($customer_name)
83
- ->setCustomerRecommend($customer_recommend)
84
- ->setCustomerActive($customer_active)
85
- ->setCustomerSex($customer_sex)
86
- ->setCustomerAge($customer_age)
87
- ->setPurchasedProducts($purchased_products)
88
- ->setTextPositive($text_positive)
89
- ->setTextImprovements($text_improvements)
90
- ->setCompanyResponse($company_response)
91
- ->setDateCreated($date_created)
92
- ->save();
93
- $updates++;
94
- }
95
- } else {
96
- $reviews = Mage::getModel('feedbackcompany/reviews');
97
- $reviews->setShopId($api_id)
98
- ->setCompany($company)
99
- ->setFeedbackId($feedback_id)
100
- ->setReviewText($review_text)
101
- ->setScore($score)
102
- ->setScoreMax($score_max)
103
- ->setScoreAftersales($score_aftersales)
104
- ->setScoreCheckout($score_checkout)
105
- ->setScoreInformation($score_information)
106
- ->setScoreFriendly($score_friendly)
107
- ->setScoreLeadtime($score_leadtime)
108
- ->setScoreResponsetime($score_responsetime)
109
- ->setScoreOrder($score_order)
110
- ->setCustomerName($customer_name)
111
- ->setCustomerRecommend($customer_recommend)
112
- ->setCustomerActive($customer_active)
113
- ->setCustomerSex($customer_sex)
114
- ->setCustomerAge($customer_age)
115
- ->setPurchasedProducts($purchased_products)
116
- ->setTextPositive($text_positive)
117
- ->setTextImprovements($text_improvements)
118
- ->setCompanyResponse($company_response)
119
- ->setDateCreated($date_created)
120
- ->save();
121
- $new++;
122
- }
123
- }
124
-
125
- $config = new Mage_Core_Model_Config();
126
- $config->saveConfig('feedbackcompany/reviews/lastrun', now(), 'default', 0);
127
-
128
- $result = array();
129
- $result['review_updates'] = $updates;
130
- $result['review_new'] = $new;
131
- $result['company'] = $company;
132
- return $result;
133
-
134
- } else {
135
- $result = array();
136
- $result['review_updates'] = 0;
137
- $result['review_new'] = 0;
138
- $result['company'] = '';
139
- return $result;
140
- }
141
- }
142
-
143
- public function flushCache()
144
- {
145
- if(Mage::getStoreConfig('feedbackcompany/reviews/flushcache')) {
146
- Mage::app()->cleanCache(array(Mage_Cms_Model_Block::CACHE_TAG, Magmodules_Feedbackcompany_Model_Reviews::CACHE_TAG));
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 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_Model_Stats extends Mage_Core_Model_Abstract {
23
-
24
- public function _construct()
25
- {
26
- parent::_construct();
27
- $this->_init('feedbackcompany/stats');
28
- }
29
-
30
- public function processFeed($feed, $storeId = 0)
31
- {
32
- $result = array();
33
- $shop_id = Mage::getStoreConfig('feedbackcompany/general/api_id', $storeId);
34
- $company = Mage::getStoreConfig('feedbackcompany/general/company', $storeId);
35
-
36
- if (!empty($feed->detailslink)) {
37
- if ($storeId == 0) {
38
- $config = new Mage_Core_Model_Config();
39
- $config->saveConfig('feedbackcompany/general/url', $feed->detailslink, 'default', $storeId);
40
- } else {
41
- $config = new Mage_Core_Model_Config();
42
- $config->saveConfig('feedbackcompany/general/url', $feed->detailslink, 'stores', $storeId);
43
- if(!Mage::getStoreConfig('feedbackcompany/general/url', 0)) {
44
- $config->saveConfig('feedbackcompany/general/url', $feed->detailslink, 'default', 0);
45
- }
46
- }
47
- if ($feed->noReviews > 0) {
48
- $id = $this->loadbyShopId($shop_id)->getId();
49
- $score = floatval($feed->score);
50
- $score = ($score * 10);
51
- $scoremax = ($feed->scoremax * 10);
52
- $votes = $feed->noReviews;
53
-
54
- $this->setId($id)
55
- ->setShopId($shop_id)
56
- ->setCompany($company)
57
- ->setScore($score)
58
- ->setScoremax($scoremax)
59
- ->setVotes($votes)
60
- ->save();
61
-
62
- $result['status'] = 'success';
63
- $result['company'] = $company;
64
- $result['score'] = $score;
65
- }
66
- } else {
67
- $result['status'] = 'error';
68
- $result['msg'] = Mage::helper('core/string')->truncate(strip_tags($feed), '500');
69
- }
70
-
71
- return $result;
72
- }
73
-
74
- public function processOverall()
75
- {
76
- $stats = Mage::getModel('feedbackcompany/stats')->getCollection();
77
- $stats->addFieldToFilter('shop_id', array('neq' => '0'));
78
- $id = $this->loadbyShopId(0)->getId();
79
-
80
- $score = '';
81
- $scoremax = '';
82
- $votes = '';
83
- $i = 0;
84
-
85
- foreach($stats as $stat) {
86
- $score = ($score + $stat->getScore());
87
- $scoremax = ($scoremax + $stat->getScoremax());
88
- $votes = ($votes + $stat->getVotes());
89
- $i++;
90
- }
91
-
92
- if($i > 0) {
93
- $score = ($score / $i);
94
- $scoremax = ($scoremax / $i);
95
- $company = 'Overall';
96
- }
97
-
98
- $model = Mage::getModel('feedbackcompany/stats')
99
- ->setId($id)
100
- ->setShopId(0)
101
- ->setCompany($company)
102
- ->setScore($score)
103
- ->setScoremax($scoremax)
104
- ->setVotes($votes)
105
- ->save();
106
- }
107
-
108
- public function loadbyShopId($shop_id)
109
- {
110
- $this->_getResource()->load($this, $shop_id, 'shop_id');
111
- return $this;
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 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_Model_System_Config_Source_Attribute {
23
 
24
- public function toOptionArray()
25
- {
26
- $attributes = Mage::getResourceModel('catalog/product_attribute_collection')
27
- ->addVisibleFilter()
28
- ->addFieldToFilter('frontend_input', array('boolean'));
29
-
 
 
30
  $optionArray[] = array(
31
  'label' => Mage::helper('feedbackcompany')->__('-- Select Yes/No Attribute'),
32
- 'value' => ''
33
  );
34
-
35
- foreach($attributes as $attribute) {
 
 
 
 
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 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_Model_System_Config_Source_Category {
23
 
24
- public function toOptionArray($addEmpty = true)
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
- $cat = new stdClass();
33
- $cat->label = $category->getName();
34
- $cat->value = $category->getId();
35
- $cat->level = $category->getLevel();
36
- $cat->parentid = $category->getParentId();
37
  $cats[$cat->value] = $cat;
38
  }
39
 
40
- foreach($cats as $id => $cat){
41
- if(isset($cats[$cat->parentid])){
42
- if(!isset($cats[$cat->parentid]->child)) {
43
- $cats[$cat->parentid]->child = array();
44
- }
45
- $cats[$cat->parentid]->child[] =& $cats[$id];
46
- }
 
47
  }
48
- foreach($cats as $id => $cat){
49
- if(!isset($cats[$cat->parentid])){
50
- $stack = array($cats[$id]);
51
- while(count($stack)>0 ){
52
- $opt = array_pop($stack);
53
- $option = array('label' => ($opt->level>1 ? str_repeat('- ', $opt->level-1) : '') . $opt->label, 'value' => $opt->value);
54
- array_push($options, $option);
55
- if(isset($opt->child) && count($opt->child)) {
56
- foreach(array_reverse($opt->child) as $child) {
57
- array_push($stack, $child);
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 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_Model_System_Config_Source_Cronfrequency {
23
 
24
- public function toOptionArray()
25
- {
26
- return array(
27
- '0 * * * *' => Mage::helper('feedbackcompany')->__('Every Hour'),
28
- '0 */2 * * *' => Mage::helper('feedbackcompany')->__('Every other Hour'),
29
- '0 8,20 * * *' => Mage::helper('feedbackcompany')->__('Twice a Day'),
30
- '0 2 * * *' => Mage::helper('feedbackcompany')->__('Once a Day'),
31
- '0 2 * * 0' => Mage::helper('feedbackcompany')->__('Once a Week'),
32
- '0 2 1 * *' => Mage::helper('feedbackcompany')->__('Once a Month'),
33
- '' => Mage::helper('feedbackcompany')->__('Never'),
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 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_Model_System_Config_Source_Cronfrequencylong {
23
 
24
- public function toOptionArray()
25
- {
26
- return array(
27
- '0 2 * * *' => Mage::helper('feedbackcompany')->__('Once a Day'),
28
- '0 2 * * 0' => Mage::helper('feedbackcompany')->__('Once a Week'),
29
- '0 2 1 * *' => Mage::helper('feedbackcompany')->__('Once a Month'),
30
- '' => Mage::helper('feedbackcompany')->__('Never'),
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 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_Model_System_Config_Source_Orderstatus {
23
 
24
- public function toOptionArray()
25
- {
26
- $storeModel = Mage::getSingleton('adminhtml/system_store');
27
- $statuses = Mage::getSingleton('sales/order_config')->getStatuses();
28
- $options = array();
29
- $this->_options = array(array('value' => 0, 'label' => Mage::helper('feedbackcompany') -> __('-- none')));
30
- foreach($statuses as $k=>$v) {
31
- $options[] = array('label' => $v, 'value' => $k);
32
- }
33
- $this->_options = array_merge($this->_options, $options);
34
- return $this->_options;
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 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_Model_System_Config_Source_Position {
 
 
 
 
 
 
 
 
 
 
23
 
24
- public function toOptionArray()
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 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_Model_System_Config_Source_Reviewlink
23
  {
24
- public function toOptionArray()
25
- {
26
- $reviewlink = array();
27
- $reviewlink[] = array('value'=>'1', 'label'=> Mage::helper('feedbackcompany')->__('Product Review Page'));
28
- $reviewlink[] = array('value'=>'2', 'label'=> Mage::helper('feedbackcompany')->__('Product Page'));
29
- return $reviewlink;
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 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_Model_System_Config_Source_Reviewrating {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
 
24
- public function toOptionArray()
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 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_Model_System_Config_Source_Reviewstatus {
 
 
 
 
 
 
 
 
 
 
 
23
 
24
- public function toOptionArray()
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 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_Model_System_Config_Source_Sidebarlink {
 
23
 
24
- public function toOptionArray()
25
- {
26
- return array(
27
- '' => Mage::helper('feedbackcompany')->__('None'),
28
- 'external' => Mage::helper('feedbackcompany')->__('External (Feedbackcompany.nl)'),
29
- 'internal' => Mage::helper('feedbackcompany')->__('Internal (/feedbackcompany)'),
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 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_Adminhtml_FeedbacklogController extends Mage_Adminhtml_Controller_Action {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
 
24
- protected function _initAction()
25
- {
26
- $this->loadLayout()->_setActiveMenu('feedbackcompany/feedbackreviews')->_addBreadcrumb(Mage::helper('adminhtml')->__('Items Manager'), Mage::helper('adminhtml')->__('Item Manager'));
27
- return $this;
28
- }
29
-
30
- public function indexAction()
31
- {
32
- $this->_initAction()->renderLayout();
33
- }
34
 
35
- public function massDeleteAction()
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
- public function cleanAction()
54
- {
55
- $i = 0;
56
- $logmodel = Mage::getModel('feedbackcompany/log');
57
- $logs = $logmodel->getCollection();
58
- foreach ($logs as $log) {
59
- $logmodel->load($log->getId())->delete();
60
- $i++;
61
- }
62
- Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('feedbackcompany')->__('Total of %s log record(s) deleted.', $i));
63
- $this->_redirect('*/*/index');
64
- }
 
 
 
65
 
66
- protected function _isAllowed()
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 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_Adminhtml_FeedbackreviewsController extends Mage_Adminhtml_Controller_Action {
23
-
24
- protected function _initAction()
25
- {
26
- $this->loadLayout()->_setActiveMenu('feedbackcompany/feedbackreviews')->_addBreadcrumb(Mage::helper('adminhtml')->__('Items Manager'), Mage::helper('adminhtml')->__('Item Manager'));
27
- return $this;
28
- }
29
-
30
- public function indexAction()
31
- {
32
- $this->_initAction()->renderLayout();
33
- }
34
-
35
- public function processAction()
36
- {
37
- $storeids = Mage::getModel('feedbackcompany/api')->getStoreIds();
38
- $start_time = microtime(true);
39
- foreach($storeids as $storeid) {
40
- $msg = '';
41
- $api_id = Mage::getStoreConfig('feedbackcompany/general/api_id', $storeid);
42
- $result = Mage::getModel('feedbackcompany/api')->processFeed($storeid, 'all');
43
- $log = Mage::getModel('feedbackcompany/log')->addToLog('reviews', $storeid, $result, '', (microtime(true) - $start_time), '', '');
44
-
45
- if(($result['review_new'] > 0) || ($result['review_updates'] > 0) || ($result['stats']['status'] == 'success')) {
46
- $msg = Mage::helper('feedbackcompany')->__('Webwinkel ID %s:', $api_id) . ' ';
47
- $msg .= Mage::helper('feedbackcompany')->__('%s new review(s)', $result['review_new']) . ', ';
48
- $msg .= Mage::helper('feedbackcompany')->__('%s review(s) updated', $result['review_updates']) . ' & ';
49
- $msg .= Mage::helper('feedbackcompany')->__('and total score updated.');
50
- }
51
-
52
- if($msg) {
53
- Mage::getSingleton('adminhtml/session')->addSuccess($msg);
54
- } else {
55
- if(!empty($result['stats']['msg'])) {
56
- Mage::getSingleton('adminhtml/session')->addError(Mage::helper('feedbackcompany')->__('Webwinkel ID %s: %s', $api_id, $result['stats']['msg']));
57
- } else {
58
- Mage::getSingleton('adminhtml/session')->addError(Mage::helper('feedbackcompany')->__('Webwinkel ID %s: no updates found, feed is empty or not found!', $api_id));
59
- }
60
- }
61
- }
62
- Mage::getModel('feedbackcompany/stats')->processOverall();
63
- Mage::getModel('feedbackcompany/reviews')->flushCache();
64
- $this->_redirect('adminhtml/system_config/edit/section/feedbackcompany');
65
- }
66
-
67
-
68
- public function massDisableAction()
69
- {
70
- $reviewIds = $this->getRequest()->getParam('reviewids');
71
- if(!is_array($reviewIds)) {
72
- Mage::getSingleton('adminhtml/session')->addError(Mage::helper('feedbackcompany')->__('Please select item(s)'));
73
- } else {
74
- try {
75
- foreach ($reviewIds as $review_id) {
76
- $reviews = Mage::getModel('feedbackcompany/reviews')->load($review_id);
77
- $reviews->setStatus(0)->save();
78
- }
79
- Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('feedbackcompany')->__('Total of %d review(s) were disabled.', count($reviewIds)));
80
- } catch (Exception $e) {
81
- Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
82
- }
83
- }
84
- Mage::getModel('feedbackcompany/reviews')->flushCache();
85
- $this->_redirect('*/*/index');
86
- }
87
-
88
- public function massEnableAction()
89
- {
90
- $reviewIds = $this->getRequest()->getParam('reviewids');
91
- if(!is_array($reviewIds)) {
92
- Mage::getSingleton('adminhtml/session')->addError(Mage::helper('feedbackcompany')->__('Please select item(s)'));
93
- } else {
94
- try {
95
- foreach ($reviewIds as $review_id) {
96
- $reviews = Mage::getModel('feedbackcompany/reviews')->load($review_id);
97
- $reviews->setStatus(1)->save();
98
- }
99
- Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('feedbackcompany')->__('Total of %d review(s) were enabled.', count($reviewIds)));
100
- } catch (Exception $e) {
101
- Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
102
- }
103
- }
104
- Mage::getModel('feedbackcompany/reviews')->flushCache();
105
- $this->_redirect('*/*/index');
106
- }
107
-
108
- public function massEnableSidebarAction()
109
- {
110
- $reviewIds = $this->getRequest()->getParam('reviewids');
111
- if(!is_array($reviewIds)) {
112
- Mage::getSingleton('adminhtml/session')->addError(Mage::helper('feedbackcompany')->__('Please select item(s)'));
113
- } else {
114
- try {
115
- foreach ($reviewIds as $review_id) {
116
- $reviews = Mage::getModel('feedbackcompany/reviews')->load($review_id);
117
- $reviews->setSidebar(1)->save();
118
- }
119
- Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('feedbackcompany')->__('Total of %d review(s) were added to the sidebar.', count($reviewIds)));
120
- } catch (Exception $e) {
121
- Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
122
- }
123
- }
124
- Mage::getModel('feedbackcompany/reviews')->flushCache();
125
- $this->_redirect('*/*/index');
126
- }
127
-
128
- public function massDisableSidebarAction()
129
- {
130
- $reviewIds = $this->getRequest()->getParam('reviewids');
131
- if(!is_array($reviewIds)) {
132
- Mage::getSingleton('adminhtml/session')->addError(Mage::helper('feedbackcompany')->__('Please select item(s)'));
133
- } else {
134
- try {
135
- foreach ($reviewIds as $review_id) {
136
- $reviews = Mage::getModel('feedbackcompany/reviews')->load($review_id);
137
- $reviews->setSidebar(0)->save();
138
- }
139
- Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('feedbackcompany')->__('Total of %d review(s) were removed from the sidebar.', count($reviewIds)));
140
- } catch (Exception $e) {
141
- Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
142
- }
143
- }
144
- Mage::getModel('feedbackcompany/reviews')->flushCache();
145
- $this->_redirect('*/*/index');
146
- }
147
-
148
- public function truncateAction()
149
- {
150
- $i = 0;
151
- $collection = Mage::getModel('feedbackcompany/reviews')->getCollection();
152
- foreach ($collection as $item) {
153
- $item->delete();
154
- $i++;
155
- }
156
- Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('feedbackcompany')->__('Succefully deleted all %s saved review(s).', $i));
157
- Mage::getModel('feedbackcompany/reviews')->flushCache();
158
- $this->_redirect('*/*/index');
159
- }
160
-
161
- public function productreviewsAction()
162
- {
163
- $storeids = Mage::getModel('feedbackcompany/api')->getStoreIds('oauth');
164
- $start_time = microtime(true); $qty = 0; $errors = array();
165
- foreach($storeids as $storeid) {
166
- $enabled = Mage::getStoreConfig('feedbackcompany/general/enabled', $storeid);
167
- $reviews_enabled = Mage::getStoreConfig('feedbackcompany/productreviews/enabled', $storeid);
168
- $client_id = Mage::getStoreConfig('feedbackcompany/productreviews/client_id', $storeid);
169
- $client_secret = Mage::getStoreConfig('feedbackcompany/productreviews/client_secret', $storeid);
170
- if($enabled && $reviews_enabled && !empty($client_id) && !empty($client_secret)) {
171
- $feed = Mage::getModel('feedbackcompany/api')->getFeed($storeid, 'productreviews', 'last_month');
172
- if($feed['status'] == 'OK') {
173
- $results = Mage::getModel('feedbackcompany/productreviews')->processFeed($feed, $storeid);
174
- if($results['review_new'] > 0) {
175
- $qty = ($qty + $results['review_new']);
176
- $log = Mage::getModel('feedbackcompany/log')->addToLog('productreviews', $storeid, $results, '', (microtime(true) - $start_time), '');
177
- }
178
- } else {
179
- $errors[$client_id] = $feed['error'];
180
- }
181
- }
182
- }
183
- if(count($errors) > 0) {
184
- foreach($errors as $key => $value) {
185
- Mage::getSingleton('adminhtml/session')->addError(Mage::helper('feedbackcompany')->__('API Response for client ID: %s => %s', $key, $value));
186
- }
187
- } else {
188
- if($qty > 0) {
189
- Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('feedbackcompany')->__('Imported %d new productreview(s).', $qty));
190
- } else {
191
- Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('feedbackcompany')->__('No new reviews found.', $qty));
192
- }
193
- }
194
- $this->_redirect('adminhtml/system_config/edit/section/feedbackcompany');
195
- }
196
-
197
-
198
- public function exportCsvAction()
199
- {
200
- $reviews = $this->getRequest()->getPost('reviews', array());
201
- $filter = $this->getRequest()->getParam('filter');
202
- $store_id = '';
203
- if($filter) {
204
- $filter = parse_str(urldecode(base64_decode($filter)), $params);
205
- if(!empty($params['visible_in'])) {
206
- $store_id = $params['visible_in'];
207
- }
208
- }
209
- if(empty($store_id) && (!Mage::app()->isSingleStoreMode())) {
210
- Mage::getSingleton('adminhtml/session')->addError(Mage::helper('feedbackcompany')->__('Please select specific storeview in the grid before exporting the reviews.'));
211
- $this->_redirect('adminhtml/catalog_product_review');
212
- } else {
213
- $store = Mage::getModel('core/store')->load($store_id);
214
- if($csv_data = Mage::getModel('feedbackcompany/export')->getFeed($reviews, $store_id)) {
215
- $file_name = 'product-reviews-' . strtolower($store->getName()) . '.csv';
216
- $path = Mage::getBaseDir('var') . DS . 'export';
217
- if (!is_dir($path)) {
218
- mkdir($path);
219
- }
220
- $file = $path . DS . $file_name;
221
- $csv = new Varien_File_Csv();
222
- $csv->saveData($file, $csv_data);
223
- $this->_prepareDownloadResponse($file_name, array('type' => 'filename', 'value' => $file));
224
- } else {
225
- Mage::getSingleton('adminhtml/session')->addError(Mage::helper('feedbackcompany')->__('Error, could not export the csv file.'));
226
- $this->_redirect('adminhtml/catalog_product_review');
227
- }
228
- }
229
- }
230
-
231
- protected function _isAllowed()
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 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_IndexController extends Mage_Core_Controller_Front_Action {
23
 
24
- public function indexAction()
25
- {
26
- $enabled = Mage::getStoreConfig('feedbackcompany/general/enabled');
27
- $overview = Mage::getStoreConfig('feedbackcompany/overview/enabled');
28
- if($enabled && $overview) {
29
- $this->loadLayout();
30
- $head = $this->getLayout()->getBlock('head');
31
- if($title = Mage::getStoreConfig('feedbackcompany/overview/meta_title')):
32
- $head->setTitle($title);
33
- endif;
34
- if($description = Mage::getStoreConfig('feedbackcompany/overview/meta_description')):
35
- $head->setDescription($description);
36
- endif;
37
- if($keywords = Mage::getStoreConfig('feedbackcompany/overview/meta_keywords')):
38
- $head->setKeywords($keywords);
39
- endif;
40
- $this->renderLayout();
41
- } else {
42
- $this->_redirect('/');
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 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
  $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($table, array(
31
- 'block_name' => $blockName,
32
- 'is_allowed' => 1,
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
- * Magmodules.eu
5
- * http://www.magmodules.eu
6
- *
7
- * NOTICE OF LICENSE
8
- *
9
- * This source file is subject to the Open Software License (OSL 3.0)
10
- * that is bundled with this package in the file LICENSE.txt.
11
- * It is also available through the world-wide-web at this URL:
12
- * http://opensource.org/licenses/osl-3.0.php
13
- * If you did not receive a copy of the license and are unable to
14
- * obtain it through the world-wide-web, please send an email
15
- * to info@magmodules.eu so we can send you a copy immediately.
16
- *
17
- * @category Magmodules
18
- * @package Magmodules_Feedbackcompany
19
- * @author Magmodules <info@magmodules.eu)
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
- <menu>
26
- <shopreview module="feedbackcompany">
27
- <title>Reviews</title>
28
- <sort_order>71</sort_order>
29
- <children>
30
- <feedbackcompany module="feedbackcompany">
31
- <title>The Feedback Company</title>
32
- <sort_order>11</sort_order>
33
- <children>
34
- <feedbackcompany_reviews module="feedbackcompany">
35
- <title>Manage Reviews</title>
36
- <sort_order>100</sort_order>
37
- <action>adminhtml/feedbackreviews/</action>
38
- </feedbackcompany_reviews>
39
- <feedbackcompany_log module="feedbackcompany">
40
- <title>Manage Log</title>
41
- <sort_order>110</sort_order>
42
- <action>adminhtml/feedbacklog/</action>
43
- </feedbackcompany_log>
44
- <feedbackcompany_config module="feedbackcompany">
45
- <title>Config</title>
46
- <sort_order>120</sort_order>
47
- <action>adminhtml/system_config/edit/section/feedbackcompany</action>
48
- </feedbackcompany_config>
49
- </children>
50
- </feedbackcompany>
51
- </children>
52
- </shopreview>
53
- </menu>
54
- <acl>
55
- <resources>
56
- <all>
57
- <title>Allow Everything</title>
58
- </all>
59
- <admin>
60
- <children>
61
- <system>
62
- <children>
63
- <config>
64
- <children>
65
- <feedbackcompany translate="title" module="feedbackcompany">
66
- <title>The Feedback Company</title>
67
- </feedbackcompany>
68
- </children>
69
- </config>
70
- </children>
71
- </system>
72
- <shopreview module="feedbackcompany">
73
- <title>Reviews</title>
74
- <sort_order>71</sort_order>
75
- <children>
76
- <feedbackcompany module="feedbackcompany">
77
- <title>The Feedback Company</title>
78
- <sort_order>60</sort_order>
79
- <children>
80
- <feedbackcompany_reviews module="feedbackcompany">
81
- <title>Reviews</title>
82
- <sort_order>100</sort_order>
83
- <action>adminhtml/feedbackreviews/</action>
84
- </feedbackcompany_reviews>
85
- <feedbackcompany_log module="feedbackcompany">
86
- <title>Log</title>
87
- <sort_order>110</sort_order>
88
- <action>adminhtml/feedbacklog/</action>
89
- </feedbackcompany_log>
90
- </children>
91
- </feedbackcompany>
92
- </children>
93
- </shopreview>
94
- </children>
95
- </admin>
96
- </resources>
97
- </acl>
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
- * Magmodules.eu - 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:
11
- * http://opensource.org/licenses/osl-3.0.php
12
- * If you did not receive a copy of the license and are unable to
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 Magmodules
17
- * @package Magmodules_Feedbackcompany
18
- * @author Magmodules <info@magmodules.eu)
19
- * @copyright Copyright (c) 2016 (http://www.magmodules.eu)
20
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
- */
22
- -->
23
  <config>
24
- <modules>
25
- <Magmodules_Feedbackcompany>
26
- <version>1.4.9</version>
27
- </Magmodules_Feedbackcompany>
28
- </modules>
29
- <global>
30
- <models>
31
- <feedbackcompany>
32
- <class>Magmodules_Feedbackcompany_Model</class>
33
- <resourceModel>feedbackcompany_mysql4</resourceModel>
34
- </feedbackcompany>
35
- <feedbackcompany_mysql4>
36
- <class>Magmodules_Feedbackcompany_Model_Mysql4</class>
37
- <entities>
38
- <reviews>
39
- <table>feedbackcompany_reviews</table>
40
- </reviews>
41
- <stats>
42
- <table>feedbackcompany_stats</table>
43
- </stats>
44
- <log>
45
- <table>feedbackcompany_log</table>
46
- </log>
47
- </entities>
48
- </feedbackcompany_mysql4>
49
- <review_resource>
50
- <rewrite>
51
- <review>Magmodules_Feedbackcompany_Model_Resource_Review</review>
52
- </rewrite>
53
- </review_resource>
54
- </models>
55
- <resources>
56
- <feedbackcompany_setup>
57
- <setup>
58
- <module>Magmodules_Feedbackcompany</module>
59
  <class>Mage_Sales_Model_Mysql4_Setup</class>
60
- </setup>
61
- <connection>
62
- <use>core_setup</use>
63
- </connection>
64
- </feedbackcompany_setup>
65
- <feedbackcompany_write>
66
- <connection>
67
- <use>core_write</use>
68
- </connection>
69
- </feedbackcompany_write>
70
- <feedbackcompany_read>
71
- <connection>
72
- <use>core_read</use>
73
- </connection>
74
- </feedbackcompany_read>
75
- </resources>
76
- <helpers>
77
- <feedbackcompany>
78
- <class>Magmodules_Feedbackcompany_Helper</class>
79
- </feedbackcompany>
80
- </helpers>
81
- <blocks>
82
- <feedbackcompany>
83
- <class>Magmodules_Feedbackcompany_Block</class>
84
- </feedbackcompany>
85
- </blocks>
86
- <events>
87
- <sales_order_shipment_save_after>
88
- <observers>
89
- <feedbackcompany>
90
- <type>singleton</type>
91
- <class>feedbackcompany/observer</class>
92
- <method>processFeedbackInvitationcallAfterShipment</method>
93
- </feedbackcompany>
94
- </observers>
95
- </sales_order_shipment_save_after>
96
- <sales_order_save_commit_after>
97
- <observers>
98
- <feedbackcompany>
99
- <type>singleton</type>
100
- <class>feedbackcompany/observer</class>
101
- <method>processFeedbackInvitationcall</method>
102
- </feedbackcompany>
103
- </observers>
104
- </sales_order_save_commit_after>
105
- </events>
106
- </global>
107
- <frontend>
108
- <routers>
109
- <feedbackcompany>
110
- <use>standard</use>
111
- <args>
112
- <module>Magmodules_Feedbackcompany</module>
113
- <frontName>feedbackcompany</frontName>
114
- </args>
115
- </feedbackcompany>
116
- </routers>
117
- <layout>
118
- <updates>
119
- <feedbackcompany>
120
- <file>magmodules_feedbackcompany.xml</file>
121
- </feedbackcompany>
122
- </updates>
123
- </layout>
124
- <translate>
125
- <modules>
126
- <magmodules_feedbackcompany>
127
- <files>
128
- <default>Magmodules_Feedbackcompany.csv</default>
129
- </files>
130
- </magmodules_feedbackcompany>
131
- </modules>
132
- </translate>
133
- </frontend>
134
- <adminhtml>
135
- <layout>
136
- <updates>
137
- <magmodules_feedbackcompany>
138
- <file>magmodules_feedbackcompany.xml</file>
139
- </magmodules_feedbackcompany>
140
- </updates>
141
- </layout>
142
- <translate>
143
- <modules>
144
- <magmodules_feedbackcompany>
145
- <files>
146
- <default>Magmodules_Feedbackcompany.csv</default>
147
- </files>
148
- </magmodules_feedbackcompany>
149
- </modules>
150
- </translate>
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
- </adminhtml>
162
- <admin>
163
- <routers>
164
- <adminhtml>
165
- <args>
166
- <modules>
167
- <magmodules_feedbackcompany after="Mage_Adminhtml">Magmodules_Feedbackcompany_Adminhtml</magmodules_feedbackcompany>
168
- </modules>
169
- </args>
170
- </adminhtml>
171
- </routers>
172
- </admin>
173
- <crontab>
174
- <jobs>
175
- <magmodules_feedbackcompany_stats>
176
- <schedule><config_path>feedbackcompany/reviews/cron_stats</config_path></schedule>
177
- <run><model>feedbackcompany/observer::processStats</model></run>
178
- </magmodules_feedbackcompany_stats>
179
- <magmodules_feedbackcompany_reviews>
180
- <schedule><config_path>feedbackcompany/reviews/cron_reviews</config_path></schedule>
181
- <run><model>feedbackcompany/observer::processReviews</model></run>
182
- </magmodules_feedbackcompany_reviews>
183
- <magmodules_feedbackcompany_productreviews>
184
- <schedule><config_path>feedbackcompany/productreviews/cron_productreviews</config_path></schedule>
185
- <run><model>feedbackcompany/observer::processProductreviews</model></run>
186
- </magmodules_feedbackcompany_productreviews>
187
- <magmodules_feedbackcompany_reviewhistory>
188
- <schedule><config_path>feedbackcompany/reviews/cron_all</config_path></schedule>
189
- <run><model>feedbackcompany/observer::processHistory</model></run>
190
- </magmodules_feedbackcompany_reviewhistory>
191
- <magmodules_feedbackcompany_cleanlog>
192
- <schedule><cron_expr>0 02 * * *</cron_expr></schedule>
193
- <run><model>feedbackcompany/observer::cleanLog</model></run>
194
- </magmodules_feedbackcompany_cleanlog>
195
- </jobs>
196
- </crontab>
197
- <default>
198
- <feedbackcompany>
199
- <general>
200
- <enabled>0</enabled>
201
- </general>
202
- <reviews>
203
- <cron>0</cron>
204
- <cron_stats>* * * * *</cron_stats>
205
- <cron_reviews>0 8,20 * * *</cron_reviews>
206
- <cron_all>0 2 1 * *</cron_all>
207
- </reviews>
208
- <sidebar>
209
- <left>0</left>
210
- <left_qty>3</left_qty>
211
- <left_lenght>150</left_lenght>
212
- <left_link>external</left_link>
213
- <right>0</right>
214
- <right_qty>3</right_qty>
215
- <right_lenght>150</right_lenght>
216
- <right_link>external</right_link>
217
- </sidebar>
218
- <block>
219
- <sidebar>0</sidebar>
220
- <sidebar_qty>3</sidebar_qty>
221
- <sidebar_lenght>150</sidebar_lenght>
222
- <sidebar_link>external</sidebar_link>
223
- <sidebar_snippets>0</sidebar_snippets>
224
- <small>0</small>
225
- <small_stars>1</small_stars>
226
- <small_link>external</small_link>
227
- <medium>0</medium>
228
- <medium_stars>1</medium_stars>
229
- <medium_link>external</medium_link>
230
- <medium_lenght>150</medium_lenght>
231
- </block>
232
- <overview>
233
- <enabled>1</enabled>
234
- <enable_paging>1</enable_paging>
235
- <paging_settings>10,20,30</paging_settings>
236
- <meta_title>The Feedback Company Reviews</meta_title>
237
- <meta_description>The Feedbackcompany Reviews overview page</meta_description>
238
- <meta_keywords>reviews,feedbackcompany</meta_keywords>
239
- </overview>
240
- <invitation>
241
- <enabled>0</enabled>
242
- <status>complete</status>
243
- <delay>5</delay>
244
- <backlog>20</backlog>
245
- <remind_delay>0</remind_delay>
246
- <resend>1</resend>
247
- <productreviews>0</productreviews>
248
- <productreviews_text><![CDATA[Write a review about {{name}}]]></productreviews_text>
249
- <min_order_total>0</min_order_total>
250
- <exclude_category>0</exclude_category>
251
- </invitation>
252
- <frontend>
253
- <enabled>0</enabled>
254
- <tooltip>0</tooltip>
255
- <sidebar_position>left</sidebar_position>
256
- <sidebar_height>120</sidebar_height>
257
- </frontend>
258
- <log>
259
- <enabled>1</enabled>
260
- <clean>1</clean>
261
- <clean_days>14</clean_days>
262
- </log>
263
- </feedbackcompany>
264
- </default>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
- * Magmodules.eu - 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:
11
- * http://opensource.org/licenses/osl-3.0.php
12
- * If you did not receive a copy of the license and are unable to
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 Magmodules
17
- * @package Magmodules_Feedbackcompany
18
- * @author Magmodules <info@magmodules.eu)
19
- * @copyright Copyright (c) 2016 (http://www.magmodules.eu)
20
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
- */
22
- -->
23
  <config>
24
- <tabs>
25
- <magmodules translate="label" module="feedbackcompany">
26
- <label>Magmodules</label>
27
- <sort_order>200</sort_order>
28
- </magmodules>
29
- </tabs>
30
- <sections>
31
- <feedbackcompany translate="label" module="feedbackcompany">
32
- <label>The Feedback Company</label>
33
- <tab>magmodules</tab>
34
- <frontend_type>text</frontend_type>
35
- <sort_order>120</sort_order>
36
- <show_in_default>1</show_in_default>
37
- <show_in_website>1</show_in_website>
38
- <show_in_store>1</show_in_store>
39
- <groups>
40
- <info>
41
- <frontend_model>feedbackcompany/adminhtml_widget_info_info</frontend_model>
42
- <sort_order>1</sort_order>
43
- <show_in_default>1</show_in_default>
44
- <show_in_website>1</show_in_website>
45
- <show_in_store>1</show_in_store>
46
- </info>
47
- <general translate="label" module="feedbackcompany">
48
- <label>General configuration</label>
49
- <frontend_type>text</frontend_type>
50
- <sort_order>2</sort_order>
51
- <show_in_default>1</show_in_default>
52
- <show_in_website>1</show_in_website>
53
- <show_in_store>1</show_in_store>
54
- <expanded>1</expanded>
55
- <comment><![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>
56
- <fields>
 
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
- <enabled translate="label">
67
- <label>Enabled</label>
68
- <frontend_type>select</frontend_type>
69
- <source_model>adminhtml/system_config_source_yesno</source_model>
70
- <sort_order>2</sort_order>
71
- <show_in_default>1</show_in_default>
72
- <show_in_website>1</show_in_website>
73
- <show_in_store>1</show_in_store>
74
- </enabled>
75
- <heading_api translate="label">
76
- <label>API CREDENTIALS</label>
77
- <frontend_model>feedbackcompany/adminhtml_widget_form_heading</frontend_model>
78
- <sort_order>3</sort_order>
79
- <show_in_default>1</show_in_default>
80
- <show_in_website>0</show_in_website>
81
- <show_in_store>1</show_in_store>
82
- </heading_api>
83
- <company translate="label">
84
- <label>Company</label>
85
- <frontend_type>text</frontend_type>
86
- <sort_order>4</sort_order>
87
- <show_in_default>1</show_in_default>
88
- <show_in_website>0</show_in_website>
89
- <show_in_store>1</show_in_store>
90
- </company>
91
- <api_id translate="label">
92
- <label>The Feedback Company ID</label>
93
- <frontend_type>text</frontend_type>
94
- <sort_order>5</sort_order>
95
- <show_in_default>1</show_in_default>
96
- <show_in_website>0</show_in_website>
97
- <show_in_store>1</show_in_store>
98
- <tooltip>You can find this information in your The Feedback Company account</tooltip>
99
- </api_id>
100
- </fields>
101
- </general>
102
- <reviews translate="label" module="feedbackcompany">
103
- <label>The Feedbackcompany Shop Reviews</label>
104
- <frontend_type>text</frontend_type>
105
- <sort_order>3</sort_order>
106
- <show_in_default>1</show_in_default>
107
- <show_in_website>1</show_in_website>
108
- <show_in_store>1</show_in_store>
109
- <expanded>1</expanded>
110
- <comment>
111
- <![CDATA[
112
  <script>
113
  Event.observe(window, 'load', function() {
114
  if ($('feedbackcompany_reviews_lastrun')) {
@@ -118,215 +115,244 @@
118
  });
119
  </script>
120
  ]]>
121
- </comment>
122
- <fields>
123
- <cron translate="label">
124
- <label>Use Cronjob</label>
125
- <frontend_type>select</frontend_type>
126
- <source_model>adminhtml/system_config_source_yesno</source_model>
127
- <sort_order>1</sort_order>
128
- <show_in_default>1</show_in_default>
129
- <show_in_website>1</show_in_website>
130
- <show_in_store>1</show_in_store>
131
- <tooltip>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.</tooltip>
132
- </cron>
133
- <cron_stats translate="label">
134
- <label>Update Summary</label>
135
- <frontend_type>select</frontend_type>
136
- <source_model>feedbackcompany/system_config_source_cronfrequency</source_model>
137
- <sort_order>2</sort_order>
138
- <show_in_default>1</show_in_default>
139
- <show_in_website>0</show_in_website>
140
- <show_in_store>0</show_in_store>
141
- <depends><cron>1</cron></depends>
142
- <tooltip>Select the schedule for automatic updating</tooltip>
143
- </cron_stats>
144
- <cron_reviews translate="label">
145
- <label>Update Reviews</label>
146
- <frontend_type>select</frontend_type>
147
- <source_model>feedbackcompany/system_config_source_cronfrequency</source_model>
148
- <sort_order>3</sort_order>
149
- <show_in_default>1</show_in_default>
150
- <show_in_website>0</show_in_website>
151
- <show_in_store>0</show_in_store>
152
- <depends><cron>1</cron></depends>
153
- <tooltip>Select the schedule for automatic updating</tooltip>
154
- </cron_reviews>
155
- <cron_all translate="label">
156
- <label>Update Review History</label>
157
- <frontend_type>select</frontend_type>
158
- <source_model>feedbackcompany/system_config_source_cronfrequencylong</source_model>
159
- <sort_order>4</sort_order>
160
- <show_in_default>1</show_in_default>
161
- <show_in_website>0</show_in_website>
162
- <show_in_store>0</show_in_store>
163
- <depends><cron>1</cron></depends>
164
- <tooltip>Select the schedule for automatic updating</tooltip>
165
- </cron_all>
166
- <flushcache translate="label">
167
- <label>Flush Block Cache after import</label>
168
- <frontend_type>select</frontend_type>
169
- <source_model>adminhtml/system_config_source_yesno</source_model>
170
- <sort_order>5</sort_order>
171
- <show_in_default>1</show_in_default>
172
- <show_in_website>0</show_in_website>
173
- <show_in_store>0</show_in_store>
174
- <tooltip>If set to yes, the cms block cache will be flushed after the import of Reviews, Review History and after editing a review from the admin</tooltip>
175
- </flushcache>
176
- <lastrun translate="label">
177
- <label>Last Update</label>
178
- <frontend_type>text</frontend_type>
179
- <sort_order>100</sort_order>
180
- <show_in_default>1</show_in_default>
181
- <show_in_website>0</show_in_website>
182
- <show_in_store>0</show_in_store>
183
- </lastrun>
184
- <process translate="label">
185
- <label>Process Manually</label>
186
- <frontend_type>button</frontend_type>
187
- <frontend_model>feedbackcompany/adminhtml_widget_buttons_process</frontend_model>
188
- <sort_order>101</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
- </process>
193
- </fields>
194
- </reviews>
195
- <sidebar translate="label">
196
- <label>The Feedbackcompany Reviews Sidebar</label>
197
- <frontend_type>text</frontend_type>
198
- <sort_order>4</sort_order>
199
- <show_in_default>1</show_in_default>
200
- <show_in_website>1</show_in_website>
201
- <show_in_store>1</show_in_store>
202
- <expanded>1</expanded>
203
- <comment><![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>
204
- <fields>
205
- <left_heading translate="label">
206
- <label>Left Sidebar</label>
207
- <frontend_model>feedbackcompany/adminhtml_widget_form_heading</frontend_model>
208
- <sort_order>50</sort_order>
209
- <show_in_default>1</show_in_default>
210
- <show_in_website>1</show_in_website>
211
- <show_in_store>1</show_in_store>
212
- </left_heading>
213
- <left translate="label">
214
- <label>Enabled</label>
215
- <frontend_type>select</frontend_type>
216
- <source_model>adminhtml/system_config_source_yesno</source_model>
217
- <sort_order>51</sort_order>
218
- <show_in_default>1</show_in_default>
219
- <show_in_website>1</show_in_website>
220
- <show_in_store>1</show_in_store>
221
- </left>
222
- <left_qty translate="label">
223
- <label>Number of Reviews</label>
224
- <validate>validate-number</validate>
225
- <frontend_type>text</frontend_type>
226
- <sort_order>52</sort_order>
227
- <show_in_default>1</show_in_default>
228
- <show_in_website>1</show_in_website>
229
- <show_in_store>1</show_in_store>
230
- <depends><left>1</left></depends>
231
- </left_qty>
232
- <left_lenght translate="label">
233
- <label>Length of Reviews</label>
234
- <validate>validate-number</validate>
235
- <frontend_type>text</frontend_type>
236
- <sort_order>53</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><left>1</left></depends>
241
- </left_lenght>
242
- <left_snippets translate="label">
243
- <label>Add Rich Snippets</label>
244
- <frontend_type>select</frontend_type>
245
- <source_model>adminhtml/system_config_source_yesno</source_model>
246
- <sort_order>56</sort_order>
247
- <show_in_default>1</show_in_default>
248
- <show_in_website>1</show_in_website>
249
- <show_in_store>1</show_in_store>
250
- <depends><left>1</left></depends>
251
- </left_snippets>
252
- <left_link translate="label">
253
- <label>Link to</label>
254
- <frontend_type>select</frontend_type>
255
- <source_model>feedbackcompany/system_config_source_sidebarlink</source_model>
256
- <sort_order>55</sort_order>
257
- <show_in_default>1</show_in_default>
258
- <show_in_website>1</show_in_website>
259
- <show_in_store>1</show_in_store>
260
- <depends><left>1</left></depends>
261
- </left_link>
262
- <right_heading translate="label">
263
- <label>Right Sidebar</label>
264
- <frontend_model>feedbackcompany/adminhtml_widget_form_heading</frontend_model>
265
- <sort_order>60</sort_order>
266
- <show_in_default>1</show_in_default>
267
- <show_in_website>1</show_in_website>
268
- <show_in_store>1</show_in_store>
269
- </right_heading>
270
- <right translate="label">
271
- <label>Enabled</label>
272
- <frontend_type>select</frontend_type>
273
- <source_model>adminhtml/system_config_source_yesno</source_model>
274
- <sort_order>61</sort_order>
275
- <show_in_default>1</show_in_default>
276
- <show_in_website>1</show_in_website>
277
- <show_in_store>1</show_in_store>
278
- </right>
279
- <right_qty translate="label">
280
- <label>Number of Reviews</label>
281
- <validate>validate-number</validate>
282
- <frontend_type>text</frontend_type>
283
- <sort_order>62</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
- <depends><right>1</right></depends>
288
- </right_qty>
289
- <right_lenght translate="label">
290
- <label>Length of Reviews</label>
291
- <validate>validate-number</validate>
292
- <frontend_type>text</frontend_type>
293
- <sort_order>63</sort_order>
294
- <show_in_default>1</show_in_default>
295
- <show_in_website>1</show_in_website>
296
- <show_in_store>1</show_in_store>
297
- <depends><right>1</right></depends>
298
- </right_lenght>
299
- <right_link>
300
- <label>Link to</label>
301
- <frontend_type>select</frontend_type>
302
- <source_model>feedbackcompany/system_config_source_sidebarlink</source_model>
303
- <sort_order>65</sort_order>
304
- <show_in_default>1</show_in_default>
305
- <show_in_website>1</show_in_website>
306
- <show_in_store>1</show_in_store>
307
- <depends><right>1</right></depends>
308
- </right_link>
309
- <right_snippets translate="label">
310
- <label>Add Rich Snippets</label>
311
- <frontend_type>select</frontend_type>
312
- <source_model>adminhtml/system_config_source_yesno</source_model>
313
- <sort_order>66</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><right>1</right></depends>
318
- </right_snippets>
319
- </fields>
320
- </sidebar>
321
- <block translate="label">
322
- <label>The Feedbackcompany Blocks</label>
323
- <frontend_type>text</frontend_type>
324
- <sort_order>5</sort_order>
325
- <show_in_default>1</show_in_default>
326
- <show_in_website>1</show_in_website>
327
- <show_in_store>1</show_in_store>
328
- <expanded>1</expanded>
329
- <fields>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
- <sidebar_note translate="label">
339
- <label><![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>
340
- <frontend_model>feedbackcompany/adminhtml_widget_form_note</frontend_model>
341
- <sort_order>11</sort_order>
342
- <show_in_default>1</show_in_default>
343
- <show_in_website>1</show_in_website>
344
- <show_in_store>1</show_in_store>
345
- </sidebar_note>
 
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
- <validate>validate-number</validate>
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
- <depends><sidebar>1</sidebar></depends>
 
 
364
  </sidebar_qty>
365
- <sidebar_lenght translate="label">
366
  <label>Length of Reviews</label>
367
- <validate>validate-number</validate>
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
- <depends><sidebar>1</sidebar></depends>
374
- </sidebar_lenght>
 
 
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
- <depends><sidebar>1</sidebar></depends>
384
- </sidebar_link>
385
- <sidebar_snippets translate="label">
 
 
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
- <depends><sidebar>1</sidebar></depends>
394
- </sidebar_snippets>
 
 
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
- <small_note translate="label">
404
- <label><![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>
405
- <frontend_model>feedbackcompany/adminhtml_widget_form_note</frontend_model>
406
- <sort_order>21</sort_order>
407
- <show_in_default>1</show_in_default>
408
- <show_in_website>1</show_in_website>
409
- <show_in_store>1</show_in_store>
410
- </small_note>
 
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
- <small_stars translate="label">
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
- <depends><small>1</small></depends>
429
- </small_stars>
 
 
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
- <depends><small>1</small></depends>
439
- </small_link>
440
- <small_snippets translate="label">
 
 
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
- <depends><small>1</small></depends>
449
- </small_snippets>
450
- <medium_heading translate="label">
 
 
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
- <medium_note translate="label">
459
- <label><![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>
460
- <frontend_model>feedbackcompany/adminhtml_widget_form_note</frontend_model>
461
- <sort_order>41</sort_order>
462
- <show_in_default>1</show_in_default>
463
- <show_in_website>1</show_in_website>
464
- <show_in_store>1</show_in_store>
465
- </medium_note>
 
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
- <medium_stars translate="label">
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
- <depends><medium>1</medium></depends>
484
- </medium_stars>
 
 
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
- <depends><medium>1</medium></depends>
494
- </medium_link>
 
 
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
- <depends><medium>1</medium></depends>
 
 
504
  </medium_review>
505
- <medium_lenght translate="label">
506
  <label>Length of Reviews</label>
507
- <validate>validate-number</validate>
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
- <depends><medium>1</medium></depends>
514
- </medium_lenght>
515
- <medium_snippets translate="label">
 
 
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
- <depends><medium>1</medium></depends>
 
 
524
  </medium_snippets>
525
- <header_heading translate="label">
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
- <header_note translate="label">
534
- <label><![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>
535
- <frontend_model>feedbackcompany/adminhtml_widget_form_note</frontend_model>
536
- <sort_order>51</sort_order>
537
- <show_in_default>1</show_in_default>
538
- <show_in_website>1</show_in_website>
539
- <show_in_store>1</show_in_store>
540
- </header_note>
 
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
- <depends><header>1</header></depends>
559
- </header_link>
560
- <header_snippets translate="label">
 
 
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
- <depends><header>1</header></depends>
569
- </header_snippets>
570
- </fields>
571
- </block>
572
- <overview translate="label">
573
- <label>Feedbackcompany Overview Page</label>
574
- <frontend_type>text</frontend_type>
575
- <sort_order>6</sort_order>
576
- <show_in_default>1</show_in_default>
577
- <show_in_website>1</show_in_website>
578
- <show_in_store>1</show_in_store>
579
- <expanded>1</expanded>
580
- <comment><![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>
581
- <fields>
582
- <enabled translate="label">
583
- <label>Enabled</label>
584
- <frontend_type>select</frontend_type>
585
- <source_model>adminhtml/system_config_source_yesno</source_model>
586
- <sort_order>1</sort_order>
587
- <show_in_default>1</show_in_default>
588
- <show_in_website>1</show_in_website>
589
- <show_in_store>1</show_in_store>
590
- </enabled>
591
- <intro translate="lable">
592
- <label>Intro</label>
593
- <frontend_type>textarea</frontend_type>
594
- <sort_order>2</sort_order>
595
- <show_in_default>1</show_in_default>
596
- <show_in_website>1</show_in_website>
597
- <show_in_store>1</show_in_store>
598
- <depends><enabled>1</enabled></depends>
599
- </intro>
600
- <enable_paging>
601
- <label>Paging</label>
602
- <frontend_type>select</frontend_type>
603
- <source_model>adminhtml/system_config_source_enabledisable</source_model>
604
- <sort_order>3</sort_order>
605
- <show_in_default>1</show_in_default>
606
- <show_in_website>1</show_in_website>
607
- <show_in_store>1</show_in_store>
608
- </enable_paging>
609
- <paging_settings>
610
- <label>Reviews per page</label>
611
- <frontend_type>text</frontend_type>
612
- <sort_order>4</sort_order>
613
- <show_in_default>1</show_in_default>
614
- <show_in_website>1</show_in_website>
615
- <show_in_store>1</show_in_store>
616
- <tooltip>Comma Separated, as: 10,20,30</tooltip>
617
- <depends><enable_paging>1</enable_paging></depends>
618
- </paging_settings>
619
- <heading_meta translate="label">
620
- <label>Meta Data</label>
621
- <frontend_model>feedbackcompany/adminhtml_widget_form_heading</frontend_model>
622
- <sort_order>10</sort_order>
623
- <show_in_default>1</show_in_default>
624
- <show_in_website>1</show_in_website>
625
- <show_in_store>1</show_in_store>
626
- </heading_meta>
627
- <meta_title translate="lable">
628
- <label>Meta Title</label>
629
- <frontend_type>text</frontend_type>
630
- <sort_order>11</sort_order>
631
- <show_in_default>1</show_in_default>
632
- <show_in_website>1</show_in_website>
633
- <show_in_store>1</show_in_store>
634
- <depends><enabled>1</enabled></depends>
635
- </meta_title>
636
- <meta_description translate="lable">
637
- <label>Meta Description</label>
638
- <frontend_type>textarea</frontend_type>
639
- <sort_order>12</sort_order>
640
- <show_in_default>1</show_in_default>
641
- <show_in_website>1</show_in_website>
642
- <show_in_store>1</show_in_store>
643
- <depends><enabled>1</enabled></depends>
644
- </meta_description>
645
- <meta_keywords translate="label">
646
- <label>Meta Keywords</label>
647
- <frontend_type>textarea</frontend_type>
648
- <sort_order>13</sort_order>
649
- <show_in_default>1</show_in_default>
650
- <show_in_website>1</show_in_website>
651
- <show_in_store>1</show_in_store>
652
- <depends><enabled>1</enabled></depends>
653
- </meta_keywords>
654
- </fields>
655
- </overview>
656
- <invitation translate="label">
657
- <label>The Feedback Company Invitation Email</label>
658
- <frontend_type>text</frontend_type>
659
- <sort_order>7</sort_order>
660
- <show_in_default>1</show_in_default>
661
- <show_in_website>1</show_in_website>
662
- <show_in_store>1</show_in_store>
663
- <expanded>1</expanded>
664
- <comment><![CDATA[You can invite your customers to write customer reviews.]]></comment>
665
- <fields>
666
- <heading_setup translate="label">
667
- <label>Invitation Emails</label>
668
- <frontend_model>feedbackcompany/adminhtml_widget_form_heading</frontend_model>
669
- <sort_order>10</sort_order>
670
- <show_in_default>1</show_in_default>
671
- <show_in_website>0</show_in_website>
672
- <show_in_store>1</show_in_store>
673
- </heading_setup>
674
- <enabled translate="label">
675
- <label>Activate</label>
676
- <frontend_type>select</frontend_type>
677
- <source_model>adminhtml/system_config_source_yesno</source_model>
678
- <sort_order>11</sort_order>
679
- <show_in_default>1</show_in_default>
680
- <show_in_website>1</show_in_website>
681
- <show_in_store>1</show_in_store>
682
- <comment>Send invitation?</comment>
683
- <tooltip>Send customers automatically receive an invitation to share a customer experience.</tooltip>
684
- </enabled>
685
- <connector>
686
- <label>Connector Code</label>
687
- <frontend_type>text</frontend_type>
688
- <sort_order>12</sort_order>
689
- <show_in_default>1</show_in_default>
690
- <show_in_website>1</show_in_website>
691
- <show_in_store>1</show_in_store>
692
- <comment>Can be obtained from the Feedbackcompany Dashboard</comment>
693
- <depends><enabled>1</enabled></depends>
694
- </connector>
695
- <status>
696
- <label>Order completed with status</label>
697
- <frontend_type>select</frontend_type>
698
- <source_model>feedbackcompany/system_config_source_orderstatus</source_model>
699
- <sort_order>13</sort_order>
700
- <show_in_default>1</show_in_default>
701
- <show_in_website>1</show_in_website>
702
- <show_in_store>1</show_in_store>
703
- <can_be_empty>1</can_be_empty>
704
- <comment>Invitation e-mail is sent after such status is achieved</comment>
705
- <tooltip>Specify at which status you want to send the invitation. Default is "Completed"</tooltip>
706
- <depends><enabled>1</enabled></depends>
707
- </status>
708
- <delay translate="label">
709
- <label>Delay</label>
710
- <frontend_type>text</frontend_type>
711
- <sort_order>14</sort_order>
712
- <show_in_default>1</show_in_default>
713
- <show_in_website>1</show_in_website>
714
- <show_in_store>1</show_in_store>
715
- <comment>Send the invitation x days after the order is completed</comment>
716
- <tooltip>This will ensure that the customer receives the invitation shortly after receiving the product and not before. This increases the opportunity that the client will share his experience.</tooltip>
717
- <depends><enabled>1</enabled></depends>
718
- </delay>
719
- <remind_delay translate="label">
720
- <label>Remind Delay</label>
721
- <frontend_type>text</frontend_type>
722
- <sort_order>15</sort_order>
723
- <show_in_default>1</show_in_default>
724
- <show_in_website>1</show_in_website>
725
- <show_in_store>1</show_in_store>
726
- <comment>Send the invitation reminder x days after the previous reminder. 0 = none</comment>
727
- <depends><enabled>1</enabled></depends>
728
- </remind_delay>
729
- <backlog translate="label">
730
- <label>Maximum Delay</label>
731
- <frontend_type>text</frontend_type>
732
- <sort_order>16</sort_order>
733
- <show_in_default>1</show_in_default>
734
- <show_in_website>1</show_in_website>
735
- <show_in_store>1</show_in_store>
736
- <comment>Change only if necessary</comment>
737
- <tooltip>Number of days to complete order may last, if it takes longer then no invitation will be sent. Read more about this feature on Feedbackcompany.nl.</tooltip>
738
- <depends><enabled>1</enabled></depends>
739
- </backlog>
740
- <resend translate="label">
741
- <label>Resend if Double</label>
742
- <frontend_type>select</frontend_type>
743
- <source_model>adminhtml/system_config_source_yesno</source_model>
744
- <sort_order>17</sort_order>
745
- <show_in_default>1</show_in_default>
746
- <show_in_website>1</show_in_website>
747
- <show_in_store>1</show_in_store>
748
- <depends><enabled>1</enabled></depends>
749
- <comment>If yes, customers will get new review reminders for every new order.</comment>
750
- </resend>
751
- <heading_filter translate="label">
752
- <label>Filter options</label>
753
- <frontend_model>feedbackcompany/adminhtml_widget_form_heading</frontend_model>
754
- <sort_order>40</sort_order>
755
- <show_in_default>1</show_in_default>
756
- <show_in_website>0</show_in_website>
757
- <show_in_store>1</show_in_store>
758
- </heading_filter>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
- <comment><![CDATA[Invitation e-mail is sent only for order above this value. Use 0 for no minimum.]]></comment>
767
- </min_order_total>
768
- <exclude_category translate="label">
769
- <label>Exclude by Category</label>
770
- <frontend_type>select</frontend_type>
771
- <source_model>adminhtml/system_config_source_yesno</source_model>
772
- <sort_order>42</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
- </exclude_category>
 
777
  <exclude_categories>
778
- <label>Exclude following Categories</label>
779
- <frontend_type>multiselect</frontend_type>
780
- <source_model>feedbackcompany/system_config_source_category</source_model>
781
- <sort_order>43</sort_order>
782
- <show_in_default>1</show_in_default>
783
- <show_in_website>1</show_in_website>
784
- <show_in_store>1</show_in_store>
785
- <depends><exclude_category>1</exclude_category></depends>
786
- <comment><![CDATA[The invitation e-mail will not be sent whenever there is ordered a product from one of the selected categories.]]></comment>
787
- </exclude_categories>
788
- </fields>
789
- </invitation>
790
- <productreviews translate="label">
791
- <label>The Feedbackcompany Productreviews</label>
792
- <frontend_type>text</frontend_type>
793
- <sort_order>8</sort_order>
794
- <show_in_default>1</show_in_default>
795
- <show_in_website>1</show_in_website>
796
- <show_in_store>1</show_in_store>
797
- <comment>
798
- <![CDATA[
 
 
 
799
  <script>
800
  Event.observe(window, 'load', function() {
801
  if ($('feedbackcompany_productreviews_lastrun')) {
@@ -805,157 +898,167 @@
805
  });
806
  </script>
807
  ]]>
808
- </comment>
809
- <expanded>1</expanded>
810
- <fields>
811
- <products_note translate="label">
812
- <label><![CDATA[This option is still in beta, contact The Feedback Company for more information.<br/>]]></label>
813
- <frontend_model>feedbackcompany/adminhtml_widget_form_note</frontend_model>
814
- <sort_order>1</sort_order>
815
- <show_in_default>1</show_in_default>
816
- <show_in_website>1</show_in_website>
817
- <show_in_store>1</show_in_store>
818
- </products_note>
819
- <enabled translate="label">
820
- <label>Enabled</label>
821
- <frontend_type>select</frontend_type>
822
- <source_model>adminhtml/system_config_source_yesno</source_model>
823
- <sort_order>2</sort_order>
824
- <show_in_default>1</show_in_default>
825
- <show_in_website>1</show_in_website>
826
- <show_in_store>1</show_in_store>
827
- </enabled>
828
- <client_id translate="label">
829
- <label>Oauth2 Client ID</label>
830
- <frontend_type>text</frontend_type>
831
- <sort_order>3</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
- </client_id>
836
- <client_secret translate="label">
837
- <label>Oauth2 Client Secret</label>
838
- <frontend_type>text</frontend_type>
839
- <sort_order>4</sort_order>
840
- <show_in_default>1</show_in_default>
841
- <show_in_website>1</show_in_website>
842
- <show_in_store>1</show_in_store>
843
- </client_secret>
844
- <heading_reviews translate="label">
845
- <label>Review Settings</label>
846
- <frontend_model>feedbackcompany/adminhtml_widget_form_heading</frontend_model>
847
- <sort_order>20</sort_order>
848
- <show_in_default>1</show_in_default>
849
- <show_in_website>0</show_in_website>
850
- <show_in_store>0</show_in_store>
851
- </heading_reviews>
852
- <review_import_status translate="label">
853
- <label>Default Review Status</label>
854
- <frontend_type>select</frontend_type>
855
- <source_model>feedbackcompany/system_config_source_reviewstatus</source_model>
856
- <sort_order>21</sort_order>
857
- <show_in_default>1</show_in_default>
858
- <show_in_website>1</show_in_website>
859
- <show_in_store>1</show_in_store>
860
- </review_import_status>
861
- <review_import_rating translate="label">
862
- <label>Default Review Rating</label>
863
- <frontend_type>select</frontend_type>
864
- <source_model>feedbackcompany/system_config_source_reviewrating</source_model>
865
- <sort_order>22</sort_order>
866
- <show_in_default>1</show_in_default>
867
- <show_in_website>1</show_in_website>
868
- <show_in_store>1</show_in_store>
869
- </review_import_rating>
870
- <heading_import translate="label">
871
- <label>Import Settings</label>
872
- <frontend_model>feedbackcompany/adminhtml_widget_form_heading</frontend_model>
873
- <sort_order>30</sort_order>
874
- <show_in_default>1</show_in_default>
875
- <show_in_website>0</show_in_website>
876
- <show_in_store>0</show_in_store>
877
- </heading_import>
878
- <cron translate="label">
879
- <label>Use Cronjob</label>
880
- <frontend_type>select</frontend_type>
881
- <source_model>adminhtml/system_config_source_yesno</source_model>
882
- <sort_order>31</sort_order>
883
- <show_in_default>1</show_in_default>
884
- <show_in_website>0</show_in_website>
885
- <show_in_store>0</show_in_store>
886
- </cron>
887
- <cron_productreviews translate="label">
888
- <label>Update Reviews</label>
889
- <frontend_type>select</frontend_type>
890
- <source_model>feedbackcompany/system_config_source_cronfrequency</source_model>
891
- <sort_order>32</sort_order>
892
- <show_in_default>1</show_in_default>
893
- <show_in_website>0</show_in_website>
894
- <show_in_store>0</show_in_store>
895
- <tooltip>Select the schedule for automatic updating</tooltip>
896
- </cron_productreviews>
897
- <lastrun translate="label">
898
- <label>Last Update</label>
899
- <frontend_type>text</frontend_type>
900
- <sort_order>33</sort_order>
901
- <show_in_default>1</show_in_default>
902
- <show_in_website>0</show_in_website>
903
- <show_in_store>0</show_in_store>
904
- </lastrun>
905
- <process translate="label">
906
- <label>Process Manually</label>
907
- <frontend_type>button</frontend_type>
908
- <frontend_model>feedbackcompany/adminhtml_widget_buttons_productreviews</frontend_model>
909
- <sort_order>34</sort_order>
910
- <show_in_default>1</show_in_default>
911
- <show_in_website>0</show_in_website>
912
- <show_in_store>0</show_in_store>
913
- <depends><enabled>1</enabled></depends>
914
- </process>
915
- </fields>
916
- </productreviews>
917
- <log translate="label">
918
- <label>The Feedbackcompany Log Settings</label>
919
- <frontend_type>text</frontend_type>
920
- <sort_order>9</sort_order>
921
- <show_in_default>1</show_in_default>
922
- <show_in_website>0</show_in_website>
923
- <show_in_store>0</show_in_store>
924
- <expanded>1</expanded>
925
- <comment><![CDATA[Logs can be activated in order to detect errors.<br/> This feature is particularly for developers.<br/><br/>]]></comment>
926
- <fields>
927
- <enabled translate="label">
928
- <label>Enable Log Function</label>
929
- <frontend_type>select</frontend_type>
930
- <source_model>adminhtml/system_config_source_yesno</source_model>
931
- <sort_order>1</sort_order>
932
- <show_in_default>1</show_in_default>
933
- <show_in_website>0</show_in_website>
934
- <show_in_store>0</show_in_store>
935
- </enabled>
936
- <clean translate="label">
937
- <label>Auto Cleaning</label>
938
- <frontend_type>select</frontend_type>
939
- <source_model>adminhtml/system_config_source_yesno</source_model>
940
- <sort_order>2</sort_order>
941
- <show_in_default>1</show_in_default>
942
- <show_in_website>0</show_in_website>
943
- <show_in_store>0</show_in_store>
944
- <depends><enabled>1</enabled></depends>
945
- </clean>
946
- <clean_days translate="label">
947
- <label>Clean after Days</label>
948
- <validate>validate-number</validate>
949
- <frontend_type>text</frontend_type>
950
- <sort_order>3</sort_order>
951
- <show_in_default>1</show_in_default>
952
- <show_in_website>0</show_in_website>
953
- <show_in_store>0</show_in_store>
954
- <depends><enabled>1</enabled></depends>
955
- </clean_days>
956
- </fields>
957
- </log>
958
- </groups>
959
- </feedbackcompany>
960
- </sections>
 
 
 
 
 
 
 
 
 
 
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 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
  $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 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
  $installer = $this;
23
  $installer->startSetup();
24
- $this->addAttribute('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
  $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 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
  $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 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
  $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"><name>magmodules/feedbackcompany/grid.css</name></action>
 
 
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
- <layout version="0.1.0">
3
- <default>
4
- <reference name="head">
5
- <action method="addCss" ifconfig="feedbackcompany/general/enabled"><stylesheet>magmodules/feedbackcompany/sidebar.css</stylesheet></action>
6
- </reference>
7
- <reference name="left">
8
- <block type="feedbackcompany/sidebar" name="left.feedbackcompany" template="magmodules/feedbackcompany/sidebar/left.phtml" />
9
- </reference>
10
- <reference name="right">
11
- <block type="feedbackcompany/sidebar" name="right.feedbackcompany" template="magmodules/feedbackcompany/sidebar/right.phtml" />
12
- </reference>
13
- <reference name="header">
14
- <block type="feedbackcompany/header" name="header.feedbackcompany" as="topFeedbackcompany" />
15
- </reference>
16
- </default>
17
- <feedbackcompany_index_index>
18
- <reference name="root">
19
- <action method="setTemplate"><template>page/2columns-left.phtml</template></action>
20
- </reference>
21
- <reference name="head">
22
- <action method="addCss"><stylesheet>magmodules/feedbackcompany/style.css</stylesheet></action>
23
- <action method="addCss"><stylesheet>magmodules/feedbackcompany/glyphicons-free.css</stylesheet></action>
24
- </reference>
25
- <reference name="content">
26
- <block type="feedbackcompany/reviews" name="feedbackcompany.index" template="magmodules/feedbackcompany/index.phtml" />
27
- </reference>
28
- <reference name="left">
29
- <remove name="left.feedbackcompany" />
30
- </reference>
31
- <reference name="right">
32
- <remove name="right.feedbackcompany" />
33
- </reference>
34
- </feedbackcompany_index_index>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 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
- $reviews = $this->getReviews();
22
- $stats = $this->getStats();
 
23
  ?>
24
  <div class="feedbackcompany" itemscope itemtype="http://schema.org/Organization">
25
-
26
- <div class="page-title">
27
- <div class="flexbox-container">
28
- <h1><?php echo $this->__('The Feedback Company'); ?></h1>
29
- <div class="header-floating-feedbackcompany">
30
- <!-- Desktop only -->
31
- <div class="total-feedbackcompany" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
32
- <?php if($stats->getVotes()): ?>
33
- <div class="total-block-stars-medium"><span style="width: <?php echo $stats->getScore(); ?>%;"></span></div>
34
- <div class="total-description">
35
- <?php echo $this->__('%s/%s with %s reviews', '<span itemprop="ratingValue">' . $stats->getScore() . '</span>', '<span itemprop="bestRating">100</span>', '<span itemprop="ratingCount">' . $stats->getVotes() . '</span>'); ?>
36
- </div>
37
- <?php endif; ?>
38
- </div>
39
- <!-- END Desktop only -->
40
- <?php if($review_url = $this->getReviewUrl()): ?>
41
- <button class="button" onclick="setLocation('<?php echo $review_url; ?>')">
42
- <span>
43
- <?php echo $this->__('Write review');?>
44
- </span>
45
- </button>
46
- <?php endif; ?>
47
- </div>
48
- </div>
49
- </div>
50
-
51
- <!-- Mobile only -->
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
- &nbsp;
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
- <?php if($sex = $review->getCustomerSex()): ?>
110
- <dt><?php echo $this->__('Gender'); ?></dt><dd><?php echo ucfirst($sex); ?></dd>
111
- <?php endif; ?>
 
 
 
 
 
 
112
 
113
- <?php if($customer_recommend = $review->getCustomerRecommend()): ?>
114
- <dt><?php echo $this->__('Recommend'); ?></dt><dd><?php echo ucfirst($customer_recommend); ?></dd>
115
- <?php endif; ?>
116
- </dl>
117
- <dl class="summary-index">
118
- <div class="column">
119
- <?php
120
- $scores = $this->formatScoresReview($review);
121
- $half = ceil(count($scores) / 2);
122
- $i = 0;
123
- ?>
124
- <?php foreach($scores as $title => $percentage): ?>
125
- <dt><?php echo $this->__($title); ?></dt>
126
- <dd>
127
- <div class="total-block-stars-grey"><span style="width: <?php echo $percentage; ?>%"></span></div>
128
- </dd>
129
- <?php if(++$i == $half) echo '</div><div class="column">'; ?>
130
- <?php endforeach;?>
131
- </div>
132
- </dl>
133
- </div>
134
- </div>
135
- <?php endforeach;?>
136
- <?php echo $this->getPagerHtml(); ?>
137
- <?php else: ?>
138
- <p class="note-msg"><?php echo $this->__('No reviews found...'); ?></p>
139
- <?php endif ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Magmodules
17
- * @package Magmodules_Feedbackcompany
18
- * @author Magmodules <info@magmodules.eu)
19
- * @copyright Copyright (c) 2016 (http://www.magmodules.eu)
20
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
  */
22
- $sidebarreviews = $this->getSidebarCollection('left');
23
- $total = $this->getTotalScore();
24
- ?>
25
- <?php if($sidebarreviews && $total): ?>
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('left')): ?>
32
- <div class="block-content" itemscope itemtype="http://schema.org/WebPage">
33
- <div class="total-block-stars"><span style="width: <?php echo $total->getPercentage(); ?>%"></span></div>
34
- <div class="total-block-text" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
35
- <p><strong><span itemprop="ratingValue"><?php echo $total->getStarsQty(); ?></span> / <span itemprop="bestRating">10</span></strong></p>
36
- <p class="based-on"><?php echo $this->__('Based on %s reviews', '<span itemprop="ratingCount">' . $total->getVotes() . '</span>'); ?></p>
37
- </div>
38
- </div>
39
- <?php else: ?>
40
- <div class="block-content">
41
- <div class="total-block-stars"><span style="width: <?php echo $total->getPercentage(); ?>%"></span></div>
42
- <div class="total-block-text">
43
- <p><strong><?php echo $total->getStarsQty(); ?> / 10</strong></p>
44
- <p class="based-on"><?php echo $this->__('Based on %s reviews', '<span itemprop="ratingCount">' . $total->getVotes() . '</span>'); ?></p>
45
- </div>
46
- </div>
47
- <?php endif; ?>
48
- <?php endif; ?>
49
- <?php $i=0; foreach($sidebarreviews as $sidebarreview): ?>
50
- <?php $content = $this->formatContent($sidebarreview, 'left'); ?>
51
- <div class="block-content">
52
- <div class="feedbackcompany-sidebar-block">
53
- <p><u><?php echo $sidebarreview->getCustomerName(); ?></u>: "<?php echo $content; ?>"</p>
54
- <span class="rating-name"><?php echo Mage::helper('core')->formatDate($sidebarreview->getDateCreated(), 'medium', false) ; ?></span>
55
- <?php if($sidebarreview->getScore()): ?>
56
- <span class="rating-empty"><span class="rating-star-<?php echo $sidebarreview->getScore();?>"></span></span>
57
- <?php endif; ?>
58
- </div>
59
- </div>
60
- <?php endforeach; ?>
61
- <?php if($reviewurl = $this->getReviewsUrl('left')): ?>
62
- <div class="block-content">
63
- <img src="<?php echo $this->getSkinUrl('magmodules/feedbackcompany/images/logo.png'); ?>" class="feedbackcompany-logo">
64
- <div class="actions">
65
- <?php echo $reviewurl; ?>
66
- </div>
67
- </div>
68
- <?php endif; ?>
69
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Magmodules
17
- * @package Magmodules_Feedbackcompany
18
- * @author Magmodules <info@magmodules.eu)
19
- * @copyright Copyright (c) 2016 (http://www.magmodules.eu)
20
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
  */
22
- $sidebarreviews = $this->getSidebarCollection('right');
23
- $total = $this->getTotalScore();
24
- ?>
25
- <?php if($sidebarreviews && $total): ?>
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('right')): ?>
32
- <div class="block-content" itemscope itemtype="http://schema.org/WebPage">
33
- <div class="total-block-stars"><span style="width: <?php echo $total->getPercentage(); ?>%"></span></div>
34
- <div class="total-block-text" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
35
- <p><strong><span itemprop="ratingValue"><?php echo $total->getStarsQty(); ?></span> / <span itemprop="bestRating">10</span></strong></p>
36
- <p class="based-on"><?php echo $this->__('Based on %s reviews', '<span itemprop="ratingCount">' . $total->getVotes() . '</span>'); ?></p>
37
- </div>
38
- </div>
39
- <?php else: ?>
40
- <div class="block-content">
41
- <div class="total-block-stars"><span style="width: <?php echo $total->getPercentage(); ?>%"></span></div>
42
- <div class="total-block-text">
43
- <p><strong><?php echo $total->getStarsQty(); ?> / 10</strong></p>
44
- <p class="based-on"><?php echo $this->__('Based on %s reviews', '<span itemprop="ratingCount">' . $total->getVotes() . '</span>'); ?></p>
45
- </div>
46
- </div>
47
- <?php endif; ?>
48
- <?php endif; ?>
49
- <?php $i=0; foreach($sidebarreviews as $sidebarreview): ?>
50
- <?php $content = $this->formatContent($sidebarreview, 'right'); ?>
51
- <div class="block-content">
52
- <div class="feedbackcompany-sidebar-block">
53
- <p><u><?php echo $sidebarreview->getCustomerName(); ?></u>: "<?php echo $content; ?>"</p>
54
- <span class="rating-name"><?php echo Mage::helper('core')->formatDate($sidebarreview->getDateCreated(), 'medium', false) ; ?></span>
55
- <?php if($sidebarreview->getScore()): ?>
56
- <span class="rating-empty"><span class="rating-star-<?php echo $sidebarreview->getScore();?>"></span></span>
57
- <?php endif; ?>
58
- </div>
59
- </div>
60
- <?php endforeach; ?>
61
- <?php if($reviewurl = $this->getReviewsUrl('right')): ?>
62
- <div class="block-content">
63
- <img src="<?php echo $this->getSkinUrl('magmodules/feedbackcompany/images/logo.png'); ?>" class="feedbackcompany-logo">
64
- <div class="actions">
65
- <?php echo $reviewurl; ?>
66
- </div>
67
- </div>
68
- <?php endif; ?>
69
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Magmodules
17
- * @package Magmodules_Feedbackcompany
18
- * @author Magmodules <info@magmodules.eu)
19
- * @copyright Copyright (c) 2016 (http://www.magmodules.eu)
20
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
  */
22
- $stats = $this->getTotals();
23
- $link = $this->getReviewsUrl();
24
  ?>
25
  <div id="feedbackcompany-header-widget" class="skip-content">
26
- <?php if($this->getSnippetsEnabled()): ?>
27
- <div itemscope itemtype="http://schema.org/WebPage">
28
- <div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
29
- <?php if($link) echo '<a href="' . $link . '" target="_blank">'; ?>
30
- <?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>'); ?>
31
- <div class="total-block-stars-small"><span style="width: <?php echo $stats->getPercentage(); ?>%"></span></div>
32
- <?php if($link) echo '</a>'; ?>
33
- </div>
34
- </div>
35
- <?php else: ?>
36
- <?php if($link) echo '<a href="' . $link . '" target="_blank">'; ?>
37
- <?php echo $this->__('%s/%s with %s reviews', $stats->getScore(), $stats->getScoremax(), $stats->getVotes()); ?>
38
- <div class="total-block-stars-small"><span style="width: <?php echo $stats->getPercentage(); ?>%"></span></div>
39
- <?php if($link) echo '</a>'; ?>
40
- <?php endif; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 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
- $total = $this->getTotals();
22
- $link = $this->getReviewsUrl('medium');
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"><img src="<?php echo $this->getSkinUrl('magmodules/feedbackcompany/images/logo.png', array('_secure'=>true)); ?>" class="feedbackcompany-medium-image"></a>
30
- <?php } else { ?>
31
- <img src="<?php echo $this->getSkinUrl('magmodules/feedbackcompany/images/logo.png', array('_secure'=>true)); ?>" class="feedbackcompany-medium-image">
32
- <?php } ?>
33
- <div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
34
- <?php echo $this->getHtmlStars($total->getPercentage(), 'medium'); ?>
35
- <p class="feedbackcompany-small-text">
36
- <?php if($link) { ?>
37
- <?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>'); ?>
38
- <?php } else { ?>
39
- <?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>'); ?>
40
- <?php } ?>
41
- </p>
42
- <?php if($review = $this->getLatestReview()) { ?>
43
- <?php echo $this->formatContent($review, 'medium'); ?>
44
- <p class="client-details"><?php echo $review->getCustomerName() . ', ' . Mage::helper('core')->formatDate($review->getDateCreated(), 'medium', false); ?></p>
45
- <?php } ?>
46
- </div>
47
- </div>
48
- <?php } else { ?>
49
- <?php if($link) { ?>
50
- <a href="<?php echo $link; ?>" target="_blank"><img src="<?php echo $this->getSkinUrl('magmodules/feedbackcompany/images/logo.png'); ?>" class="feedbackcompany-medium-image"></a>
51
- <?php } else { ?>
52
- <img src="<?php echo $this->getSkinUrl('magmodules/feedbackcompany/images/logo.png'); ?>" class="feedbackcompany-medium-image">
53
- <?php } ?>
54
- <?php echo $this->getHtmlStars($total->getPercentage(), 'medium'); ?>
55
- <p class="feedbackcompany-small-text">
56
- <?php if($link) { ?>
57
- <?php echo $this->__('Reviews from customers: %s - <a href="%s" target="_blank">%s reviews</a>', $total->getStarsQty() . ' / 10', $link, $total->getVotes()); ?>
58
- <?php } else { ?>
59
- <?php echo $this->__('Reviews from customers: %s - %s reviews', $total->getStarsQty() . ' / 10', $total->getVotes()); ?>
60
- <?php } ?>
61
- </p>
62
- <?php if($review = $this->getLatestReview()) { ?>
63
- <?php echo $this->formatContent($review, 'medium'); ?>
64
- <p class="client-details"><?php echo $review->getCustomerName() . ', ' . Mage::helper('core')->formatDate($review->getDateCreated(), 'medium', false); ?></p>
65
- <?php } ?>
66
- <?php } ?>
67
- </div>
 
 
 
 
 
 
 
 
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 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
- $sidebarreviews = $this->getReviews();
22
- $total = $this->getTotals();
23
- $link = $this->getReviewsUrl('sidebar');
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"><span style="width: <?php echo $total->getPercentage(); ?>%"></span></div>
34
- <div class="total-block-text" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
35
- <p><strong><span itemprop="ratingValue"><?php echo $total->getStarsQty(); ?></span> / <span itemprop="bestRating">10</span></strong></p>
36
- <p class="based-on"><?php echo $this->__('Based on %s reviews', '<span itemprop="ratingCount">' . $total->getVotes() . '</span>'); ?></p>
37
- </div>
38
- </div>
39
- <?php else: ?>
40
- <div class="block-content">
41
- <div class="total-block-stars"><span style="width: <?php echo $total->getPercentage(); ?>%"></span></div>
42
- <div class="total-block-text">
43
- <p><strong><?php echo $total->getStarsQty(); ?> / 10</strong></p>
44
- <p class="based-on"><?php echo $this->__('Based on %s reviews', '<span>' . $total->getVotes() . '</span>'); ?></p>
45
- </div>
46
- </div>
47
- <?php endif; ?>
48
- <?php endif; ?>
49
- <?php $i=0; foreach($sidebarreviews as $sidebarreview): ?>
50
- <?php $content = $this->formatContent($sidebarreview, 'block'); ?>
51
- <div class="block-content">
52
- <div class="feedbackcompany-sidebar-block">
53
- <p><u><?php echo $sidebarreview->getCustomerName(); ?></u>: "<?php echo $content; ?>"</p>
54
- <span class="rating-name"><?php echo Mage::helper('core')->formatDate($sidebarreview->getDateCreated(), 'medium', false) ; ?></span>
55
- <?php if($sidebarreview->getScore()): ?>
56
- <span class="rating-empty"><span class="rating-star-<?php echo $sidebarreview->getScore();?>"></span></span>
57
- <?php endif; ?>
58
- </div>
59
- </div>
60
- <?php endforeach; ?>
61
- <div class="block-content">
62
- <?php if($link) { ?>
63
- <a href="<?php echo $link; ?>" target="_blank"><img src="<?php echo $this->getSkinUrl('magmodules/feedbackcompany/images/logo.png'); ?>" class="feedbackcompany-logo"></a>
64
- <?php } else { ?>
65
- <img src="<?php echo $this->getSkinUrl('magmodules/feedbackcompany/images/logo.png'); ?>" class="feedbackcompany-logo">
66
- <?php } ?>
67
- </div>
68
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Magmodules
17
- * @package Magmodules_Feedbackcompany
18
- * @author Magmodules <info@magmodules.eu)
19
- * @copyright Copyright (c) 2016 (http://www.magmodules.eu)
20
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
  */
22
- $total = $this->getTotals();
23
- $link = $this->getReviewsUrl('small');
24
- ?>
25
  <div class="feedbackcompany-small-widget">
26
- <?php if($this->getSnippetsEnabled('small')) { ?>
27
- <div itemscope itemtype="http://schema.org/WebPage">
28
- <div class="feedbackcompany-small-score">
29
- <div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
30
- <?php echo $this->getHtmlStars($total->getPercentage(), 'small'); ?>
31
- <p class="feedbackcompany-small-text">
32
- <?php if($link) { ?>
33
- <?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>'); ?>
34
- <?php } else { ?>
35
- <?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>'); ?>
36
- <?php } ?>
37
- </p>
38
- </div>
39
- </div>
40
- </div>
41
- <?php } else { ?>
42
- <?php echo $this->getHtmlStars($total->getPercentage(), 'small'); ?>
43
- <p class="feedbackcompany-small-text">
44
- <?php if($link) { ?>
45
- <?php echo $this->__('Reviews from customers: %s - <a href="%s" target="_blank">%s reviews</a>', $total->getStarsQty() . ' / 10', $link, $total->getVotes()); ?>
46
- <?php } else { ?>
47
- <?php echo $this->__('Reviews from customers: %s - %s reviews', $total->getStarsQty() . ' / 10', $total->getVotes()); ?>
48
- <?php } ?>
49
- </p>
50
- <?php } ?>
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 Magmodules
17
- * @package Magmodules_Feedbackcompany
18
- * @author Magmodules <info@magmodules.eu)
19
- * @copyright Copyright (c) 2016 (http://www.magmodules.eu)
20
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
  */
22
- $stats = $this->getTotals();
23
- $link = $this->getReviewsUrl();
24
  ?>
25
  <div id="feedbackcompany-header-widget" class="feedbackcompany-header-widget-searchbar skip-content">
26
- <?php if($this->getSnippetsEnabled()): ?>
27
- <div itemscope itemtype="http://schema.org/WebPage">
28
- <div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
29
- <?php if($link) echo '<a href="' . $link . '" target="_blank">'; ?>
30
- <?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>'); ?>
31
- <div class="total-block-stars-small"><span style="width: <?php echo $stats->getPercentage(); ?>%"></span></div>
32
- <?php if($link) echo '</a>'; ?>
33
- </div>
34
- </div>
35
- <?php else: ?>
36
- <?php if($link) echo '<a href="' . $link . '" target="_blank">'; ?>
37
- <?php echo $this->__('%s/%s with %s reviews', $stats->getScore(), $stats->getScoremax(), $stats->getVotes()); ?>
38
- <div class="total-block-stars-small"><span style="width: <?php echo $stats->getPercentage(); ?>%"></span></div>
39
- <?php if($link) echo '</a>'; ?>
40
- <?php endif; ?>
 
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
- <modules>
4
- <Magmodules_Feedbackcompany>
5
- <active>true</active>
6
- <codePool>community</codePool>
7
- </Magmodules_Feedbackcompany>
8
- </modules>
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 e-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,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.4.9</version>
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>2016-10-24</date>
14
- <time>18:04:32</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="0b35dd7762cf181dc8215a1283d81e5f"/></dir><file name="Feedbacklog.php" hash="03448637e329d9aed31916c403f237a7"/><dir name="Feedbackreviews"><file name="Grid.php" hash="034b652b83b627d464f4d566b1a8dd19"/><dir name="Renderer"><file name="Experience.php" hash="58e6b4524ee8c4e95e76a2fa29309f4f"/></dir></dir><file name="Feedbackreviews.php" hash="b9c0059184019f277dde9b70b94bfa37"/><dir name="Widget"><dir name="Buttons"><file name="Process.php" hash="fba16d7671930510e1d2d70483e43581"/><file name="Productreviews.php" hash="1e7da9da2ec3eb28e5fde451c8cfb781"/><file name="Test.php" hash="040ecb43856a68dca4699a63c1e9c9f8"/></dir><dir name="Field"><file name="Version.php" hash="e67d6a20e44fa7aebaabc3b03fe35fdf"/></dir><dir name="Form"><file name="Heading.php" hash="6392f0a879d8b475c5ec93aec74fa11d"/><file name="Note.php" hash="80abe28a9156c42dfc3ea61a2e265fc3"/></dir><dir name="Grid"><file name="Log.php" hash="c42810f0bcb7ea10504d12b91e892bff"/><file name="Seconds.php" hash="a3c061430ffb9bb59bc18308d8bf1bbf"/><file name="Stars.php" hash="bc6bbb13c6e58fcb0c389e94def62ecb"/></dir><dir name="Info"><file name="Info.php" hash="741a84f9887c99e6bc11e1c3c1b5815d"/></dir></dir></dir><file name="Custom.php" hash="1afd6a6a0c8d464047719172602fe684"/><file name="Header.php" hash="44a5dc7866157c032b0c90f27d162b5f"/><file name="Reviews.php" hash="88505fc0d4c17fa6bf89448bdf547ceb"/><file name="Sidebar.php" hash="446fdbf3b47e27bbc76118f2db2eeb7f"/></dir><dir name="Helper"><file name="Data.php" hash="44f7ddeca905ed47a071e6b42c692e22"/></dir><dir name="Model"><file name="Api.php" hash="b381b0c908fb82277545cf606ca1aded"/><file name="Export.php" hash="228b209a4c2eeb7d39ba56eb7649c98d"/><file name="Log.php" hash="978daaa3a3621b8551932a9315579aac"/><dir name="Mysql4"><dir name="Log"><file name="Collection.php" hash="ae1342456877a1fae35eae8724c923c4"/></dir><file name="Log.php" hash="78b2b64a97bb8f6fa76afd60c6a5757f"/><dir name="Reviews"><file name="Collection.php" hash="59f40c5d3de2c2c00eda58edf82afec3"/></dir><file name="Reviews.php" hash="f5237ea23f972634b63cb3aeadb4a0ec"/><dir name="Stats"><file name="Collection.php" hash="c5556305c5bd4a47d962755df17c14d4"/></dir><file name="Stats.php" hash="071d7308b21fe3069f262b9105597a89"/></dir><file name="Observer.php" hash="a7ff7915347cdaf1fb10490b71b26c52"/><file name="Productreviews.php" hash="5e248d64c4048ac029e5e35962d12e5a"/><dir name="Resource"><file name="Review.php" hash="0b5df37c1e4c01c184eae9118829e07f"/></dir><file name="Reviews.php" hash="7d4793c438ab6e5b9c98a341740843e4"/><file name="Stats.php" hash="3587c044916b4c45d741de7a911295c0"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Attribute.php" hash="91c88ae96b609900a6b53ecfff8e2828"/><file name="Category.php" hash="2fe30678feee498bd105d259cadae215"/><file name="Cronfrequency.php" hash="bbe3bdce74a2205d42f1bb343ed8cd56"/><file name="Cronfrequencylong.php" hash="98f8af8e23c22f1cc9adc678d1d8097c"/><file name="Orderstatus.php" hash="a5e23aa216840cf22c545ba024da3d7e"/><file name="Position.php" hash="32dba14b3fbba1b4e16836b5c9c25807"/><file name="Reviewlink.php" hash="d5d8ad2ab7e11a13b980288b34c6eba7"/><file name="Reviewrating.php" hash="1f7712ec677f95ada3450bcdc8c5c837"/><file name="Reviewstatus.php" hash="fa704d1e65eb64b01ad54bbc79e8c020"/><file name="Sidebarlink.php" hash="19eeff07235ee02fea3634e0f32e10a7"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="FeedbacklogController.php" hash="f96738f3b9849e334fed21579d1e09cc"/><file name="FeedbackreviewsController.php" hash="6af805538fd983d8055d7e3635498a5a"/></dir><file name="IndexController.php" hash="b388778f34531a73e8fc2fc91a6a784c"/></dir><dir name="data"><dir name="feedbackcompany_setup"><file name="data-upgrade-1.4.1-1.4.2.php" hash="66373ddaefafb4ea0fc6b3247e052070"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="dacdccdb319e33a400d9872d6ec9ec02"/><file name="config.xml" hash="fa736c2f38a53ab41259933440c6dd6d"/><file name="system.xml" hash="cd14a037f77b05502f20785730c363e9"/></dir><dir name="sql"><dir name="feedbackcompany_setup"><file name="mysql4-install-0.9.0.php" hash="e5e350306db02211bf1926ccb46d62fb"/><file name="mysql4-upgrade-1.2.1-1.2.2.php" hash="d2823271b6fcdbe69212c58bbe99ab65"/><file name="mysql4-upgrade-1.2.5-1.2.6.php" hash="0b7697b895677239dd9b4378e7578b90"/><file name="mysql4-upgrade-1.3.0-1.3.1.php" hash="32d63d431f7987492f31502ec1939599"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="magmodules_feedbackcompany.xml" hash="3cca540d05eb59dab5ab24278841833a"/></dir><dir name="template"><dir name="magmodules"><dir name="feedbackcompany"><file name="index.phtml" hash="35e543c38a0ef1732463e6c8019cdd3e"/><dir name="sidebar"><file name="left.phtml" hash="8c235d9ffd16096f50c2e36054bdf8f9"/><file name="right.phtml" hash="383c7db6e01441cddbbe07b2914a84a6"/></dir><dir name="widget"><file name="header.phtml" hash="cd1c71fe6c9a0f0b28ccc5951da027fb"/><file name="medium.phtml" hash="d9e0025c3c189e9ad3b512fbfc7c59dd"/><file name="sidebar.phtml" hash="852632fc6b4f223f42459da0498efd9f"/><file name="small.phtml" hash="b6e07949b3bccbd244651328a329f33e"/></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="f2ead7879b2f8d48f650ab9d133d6c3a"/></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="886af6aabcc892da5074c93ad0263006"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Magmodules_Feedbackcompany.xml" hash="bcf891696a8602a49ef00ec0440b944a"/></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="07065c3e53560af157a7884b2e43ba91"/></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="d41d8cd98f00b204e9800998ecf8427e"/><file name="sidebar.css" hash="4519f6b32ecc4ec12c3a909331e9a87f"/><file name="style.css" hash="53c93412d6fb3025bd54c2b4ee13a645"/></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="ea7e85df839bf0eb7bc6882608da80b0"/><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>
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 Magmodules
16
- * @package Magmodules_Feedbackcompany
17
- * @author Magmodules <info@magmodules.eu)
18
- * @copyright Copyright (c) 2014 (http://www.magmodules.eu)
19
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
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
- background: url('star.png') 0 0;
25
- margin-right: 5px;
26
- height: 16px;
27
- float: left;
28
- width: 80px;
29
  }
30
 
31
- .rating-star-1 {
32
- width: 16px;
33
  }
34
 
35
- .rating-star-2 {
36
- width: 32px;
37
  }
38
 
39
- .rating-star-3 {
40
- width: 48px;
41
  }
42
 
43
- .rating-star-4 {
44
- width: 64px;
45
  }
46
 
47
- .rating-star-5 {
48
- width: 80px;
49
  }
50
 
51
- .rating-empty {
52
- float: left;
53
- width: 80px;
54
- background: url('star.png') 0 -16px;
55
  }
56
 
57
  a.magtooltip span {
58
- display:none;
59
- padding:2px 3px;
60
- margin-left:8px;
61
- width:550px;
62
  }
63
 
64
  a.magtooltip:hover span {
65
- display:inline;
66
- position:absolute;
67
- background:#ffffff;
68
- border:1px solid #cccccc;
69
- color:#000;
70
- padding: 10px;
 
71
  }
72
 
73
  .magtooltip hr {
74
- height:1px;
75
- border: 1px dotted #606;
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 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
  .feedbackcompany-sidebar-block {
23
- padding: 10px;
24
  }
25
 
26
  .feedbackcompany-sidebar-block .rating-name {
27
- font-style: italic;
28
  }
29
 
30
  .feedbackcompany-logo {
31
- width: 100px;
32
- margin: auto;
33
  }
34
 
35
  .feedbackcompany-medium-image {
36
- width: 125px;
37
- padding: 7px;
38
  }
39
 
40
  /** Discrete stars **/
41
- .feedbackcompany-sidebar-block .rating-empty { float: right; display: block; width: 80px; height: 16px; background: url('./images/star.png') 0 -16px; margin-right: 5px; }
42
- .feedbackcompany-sidebar-block .rating-star-1 { float: left; display: block; width: 16px; height: 16px; background: url('./images/star.png') 0 0; margin-right: 5px; }
43
- .feedbackcompany-sidebar-block .rating-star-2 { float: left; display: block; width: 32px; height: 16px; background: url('./images/star.png') 0 0; margin-right: 5px; }
44
- .feedbackcompany-sidebar-block .rating-star-3 { float: left; display: block; width: 48px; height: 16px; background: url('./images/star.png') 0 0; margin-right: 5px; }
45
- .feedbackcompany-sidebar-block .rating-star-4 { float: left; display: block; width: 64px; height: 16px; background: url('./images/star.png') 0 0; margin-right: 5px; }
46
- .feedbackcompany-sidebar-block .rating-star-5 { float: left; display: block; width: 80px; height: 16px; background: url('./images/star.png') 0 0; margin-right: 5px; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
 
48
  /** Continuous stars **/
49
 
 
 
 
 
 
 
 
 
 
 
 
 
50
 
51
- .feedbackcompany-small-widget .rating-box {height: 21px;background: url('./images/stars-colorful-small-empty.png') no-repeat !important;margin: 5px 0px 0px;width: 75px;}
52
- .feedbackcompany-small-widget .rating {display: block;height: 21px;background: url('./images/stars-colorful-small-filling.png') no-repeat !important;}
53
- .feedbackcompany-small-widget .feedbackcompany-small-text {padding: 5px 0px 0px 0px;}
54
 
 
 
 
 
 
 
55
 
56
- .feedbackcompany-medium-widget .rating-box { height: 21px; background: url('./images/stars-colorful-big-empty.png') no-repeat;margin: 10px 0px 5px;width: 110px;}
57
- .feedbackcompany-medium-widget .rating {display: block;height: 21px;background: url('./images/stars-colorful-big-filling.png') no-repeat !important;}
58
- .feedbackcompany-medium-widget .feedbackcompany-small-text { padding:4px 0px 0px 0px;}
 
 
59
 
60
- .feedbackcompany-small-score .rating-box { height: 21px; background: url('./images/stars-colorful-big-empty.png') no-repeat;margin: 5px 15px;width: 109px;float: left;}
61
- .feedbackcompany-small-score .rating { display: block; height: 21px;background: url('./images/stars-colorful-big-filling.png') no-repeat;}
62
- .feedbackcompany-small-score .feedbackcompany-small-text { padding:4px 0px 0px 0px;}
63
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
 
65
  /** big colorful review stars **/
66
- .block-content p.company-name { text-align: center; margin: 5px auto; font-size: 12px; }
67
- .total-block-text { border-bottom: 1px solid #ccc; padding-bottom: 5px; }
68
- .total-block-text p { text-align: center; padding-top: 5px; margin-bottom: 2px; font-size: 18px; }
69
- .total-block-text p.based-on { text-align: center; padding-top: 0px; font-size: 11px; font-style: italic; }
70
- .total-block-stars { height: 21px; width: 110px; background: url('./images/stars-colorful-big-empty.png') no-repeat; margin: 5px auto; }
71
- .total-block-stars span{ display: block; height: 21px; background: url('./images/stars-colorful-big-filling.png') no-repeat; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
 
73
  /** medium colorful review stars **/
74
- .total-block-stars-medium { height: 20px; width: 108px; background: url('./images/stars-colorful-medium-empty.png') no-repeat; }
75
- .total-block-stars-medium span{ display: block; height: 20px; background: url('./images/stars-colorful-medium-filling.png') no-repeat; }
 
 
 
76
 
 
 
 
 
 
77
 
78
  /** small colorful review stars **/
79
- .total-block-stars-small { height: 14px; width: 74px; background: url('./images/stars-colorful-small-empty.png') no-repeat; margin: 5px auto; }
80
- .total-block-stars-small span{ display: block; height: 14px; background: url('./images/stars-colorful-small-filling.png') no-repeat; }
 
 
 
 
 
 
 
 
 
 
81
 
82
  /** small grayscale review stars **/
83
- .total-block-stars-grey { height: 14px; width: 74px; background: url('./images/stars-grayscale-small-empty.png') no-repeat; display: inline-block}
84
- .total-block-stars-grey span{ display: block; height: 14px; background: url('./images/stars-grayscale-small-filling.png') no-repeat; }
 
 
 
 
 
 
 
 
 
 
85
 
86
- @media (-webkit-min-device-pixel-ratio: 2), not all, not all, not all, (min-resolution: 192dpi), (min-resolution: 2dppx){
87
- /** big colorful review stars **/
88
- .total-block-stars { background: url('./images/stars-colorful-big-empty@2x.png') no-repeat; background-size: 110px 21px;}
89
- .total-block-stars span{ background: url('./images/stars-colorful-big-filling@2x.png') no-repeat; background-size: 110px 21px;}
 
 
90
 
91
- /** medium colorful review stars **/
92
- .total-block-stars-small { background: url('./images/stars-colorful-medium-empty@2x.png') no-repeat; background-size: 108px 20px;}
93
- .total-block-stars-small span{ background: url('./images/stars-colorful-medium-filling@2x.png') no-repeat; background-size: 108px 20px;}
 
94
 
95
- /** small colorful review stars **/
96
- .total-block-stars-small { background: url('./images/stars-colorful-small-empty@2x.png') no-repeat; background-size: 74px 14px;}
97
- .total-block-stars-small span{ background: url('./images/stars-colorful-small-filling@2x.png') no-repeat; background-size: 74px 14px;}
 
 
98
 
99
- /** small grayscale review stars **/
100
- .total-block-stars-grey { background: url('./images/stars-grayscale-small-empty@2x.png') no-repeat; background-size: 74px 14px;}
101
- .total-block-stars-grey span{ background: url('./images/stars-grayscale-small-filling@2x.png') no-repeat; background-size: 74px 14px;}
102
- }
 
 
 
 
 
 
103
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
104
 
105
  /* CUSTOM BLOCK */
106
  .feedbackcompany-custom {
107
- font-weight: bold;
108
- font-size: 13px;
109
- display: block;
110
- border: .25em solid #eee;
111
- background: #f6f6f6;
112
- padding: 1.0em;
113
- width: 30%;
114
- text-align: center;
115
  }
116
 
117
- .feedbackcompany-custom .client {
118
- font-size: 16px;
119
  }
120
 
121
  .feedbackcompany-custom .rating-box {
122
- margin-left: 40%;
123
- margin-top: 10px;
124
- margin-bottom: 10px;
125
  }
126
- .feedbackcompany-custom .number {
127
- font-size: 11px;
128
- font-style: italic;
129
- font-weight: 300;
 
130
  }
131
 
132
  #feedbackcompany-header-widget {
133
- font-size: 12px;
134
- border-radius: 2px;
135
- border: 1px solid silver;
136
- padding: 10px 15px 10px 10px;
137
- line-height: 18px;
138
  }
139
 
140
  #feedbackcompany-header-widget.feedbackcompany-header-widget-searchbar {
141
- position: absolute;
142
- top: 55px;
143
- right: 25%;
144
- margin-right: 18px;
145
  }
146
 
147
  #feedbackcompany-header-widget .total-block-stars-small {
148
- display: inline-block;
149
- vertical-align: middle;
150
- margin: -1px 10px 0 8px;
151
  }
152
 
153
  .feedbackcompany-logo {
@@ -155,7 +324,15 @@
155
  }
156
 
157
  @media (min-width: 961px) {
158
- #feedbackcompany-header-widget{ display: inline-block; }
159
- #feedbackcompany-header-widget > * { display: inline-block; }
160
- #feedbackcompany-header-widget a:hover {text-decoration: none;}
 
 
 
 
 
 
 
 
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 Magmodules
16
- * @package Magmodules_Feedbackcompany
17
- * @author Magmodules <info@magmodules.eu)
18
- * @copyright Copyright (c) 2014 (http://www.magmodules.eu)
19
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
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,.feedbackcompany .total-feedbackcompany.total-feedbackcompany-mobile .total-block-stars{
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 0px 0px 3px;
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 #e0e0e0;
119
  padding: 6px 3px 10px;
120
  }
121
 
@@ -154,12 +152,12 @@
154
  font-weight: bold;
155
  clear: left;
156
  float: left;
157
- width: 40%;
158
  }
159
 
160
  .feedbackcompany dl dd {
161
  float: left;
162
- width: 60%;
163
  }
164
 
165
  .feedbackcompany .sprites-icon {
@@ -173,22 +171,11 @@
173
  vertical-align: middle;
174
  }
175
 
176
- @include bp(min-width, $bp-small) {
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: #fff;
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: #fff transparent;
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
- .feedbackcompany .total-feedbackcompany{
 
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: 0px;
302
  }
303
 
304
  .feedbackcompany dl.dl-feedback {
@@ -306,7 +293,7 @@
306
  }
307
 
308
  .feedbackcompany dl.dl-feedback dt {
309
- width: 16%;
310
  }
311
 
312
  .feedbackcompany dl.dl-feedback .upper {
@@ -315,15 +302,15 @@
315
  }
316
 
317
  .feedbackcompany dl.dl-feedback dd {
318
- width: 84%;
319
  }
320
 
321
  .feedbackcompany dl.summary-index dt {
322
- width: 32%;
323
  }
324
 
325
  .feedbackcompany dl.summary-index dd {
326
- width: 68%;
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 {