Magmodules_Webwinkelconnect - Version 1.0.0

Version Notes

First stable release

Download this release

Release Info

Developer Magmodules
Extension Magmodules_Webwinkelconnect
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

Files changed (58) hide show
  1. app/code/local/Magmodules/Webwinkelkeur/Block/Adminhtml/Webwinkellog.php +39 -0
  2. app/code/local/Magmodules/Webwinkelkeur/Block/Adminhtml/Webwinkellog/Grid.php +116 -0
  3. app/code/local/Magmodules/Webwinkelkeur/Block/Adminhtml/Webwinkelreviews.php +39 -0
  4. app/code/local/Magmodules/Webwinkelkeur/Block/Adminhtml/Webwinkelreviews/Grid.php +171 -0
  5. app/code/local/Magmodules/Webwinkelkeur/Block/Adminhtml/Webwinkelreviews/Renderer/Experience.php +36 -0
  6. app/code/local/Magmodules/Webwinkelkeur/Block/Adminhtml/Widget/Buttons/Process.php +38 -0
  7. app/code/local/Magmodules/Webwinkelkeur/Block/Adminhtml/Widget/Buttons/Test.php +36 -0
  8. app/code/local/Magmodules/Webwinkelkeur/Block/Adminhtml/Widget/Form/Heading.php +32 -0
  9. app/code/local/Magmodules/Webwinkelkeur/Block/Adminhtml/Widget/Grid/Log.php +55 -0
  10. app/code/local/Magmodules/Webwinkelkeur/Block/Adminhtml/Widget/Grid/Seconds.php +34 -0
  11. app/code/local/Magmodules/Webwinkelkeur/Block/Adminhtml/Widget/Grid/Stars.php +36 -0
  12. app/code/local/Magmodules/Webwinkelkeur/Block/Adminhtml/Widget/Info/Info.php +56 -0
  13. app/code/local/Magmodules/Webwinkelkeur/Block/Reviews.php +66 -0
  14. app/code/local/Magmodules/Webwinkelkeur/Block/Sidebar.php +113 -0
  15. app/code/local/Magmodules/Webwinkelkeur/Block/Snippets.php +51 -0
  16. app/code/local/Magmodules/Webwinkelkeur/Helper/Data.php +54 -0
  17. app/code/local/Magmodules/Webwinkelkeur/Model/Api.php +97 -0
  18. app/code/local/Magmodules/Webwinkelkeur/Model/Log.php +62 -0
  19. app/code/local/Magmodules/Webwinkelkeur/Model/Mysql4/Log.php +28 -0
  20. app/code/local/Magmodules/Webwinkelkeur/Model/Mysql4/Log/Collection.php +29 -0
  21. app/code/local/Magmodules/Webwinkelkeur/Model/Mysql4/Reviews.php +28 -0
  22. app/code/local/Magmodules/Webwinkelkeur/Model/Mysql4/Reviews/Collection.php +29 -0
  23. app/code/local/Magmodules/Webwinkelkeur/Model/Mysql4/Stats.php +28 -0
  24. app/code/local/Magmodules/Webwinkelkeur/Model/Mysql4/Stats/Collection.php +29 -0
  25. app/code/local/Magmodules/Webwinkelkeur/Model/Observer.php +121 -0
  26. app/code/local/Magmodules/Webwinkelkeur/Model/Reviews.php +99 -0
  27. app/code/local/Magmodules/Webwinkelkeur/Model/Stats.php +89 -0
  28. app/code/local/Magmodules/Webwinkelkeur/Model/System/Config/Source/Cronfrequency.php +35 -0
  29. app/code/local/Magmodules/Webwinkelkeur/Model/System/Config/Source/Orderstatus.php +39 -0
  30. app/code/local/Magmodules/Webwinkelkeur/Model/System/Config/Source/Position.php +31 -0
  31. app/code/local/Magmodules/Webwinkelkeur/Model/System/Config/Source/Sidebarlink.php +32 -0
  32. app/code/local/Magmodules/Webwinkelkeur/controllers/Adminhtml/WebwinkellogController.php +67 -0
  33. app/code/local/Magmodules/Webwinkelkeur/controllers/Adminhtml/WebwinkelreviewsController.php +147 -0
  34. app/code/local/Magmodules/Webwinkelkeur/controllers/IndexController.php +51 -0
  35. app/code/local/Magmodules/Webwinkelkeur/etc/adminhtml.xml +86 -0
  36. app/code/local/Magmodules/Webwinkelkeur/etc/config.xml +229 -0
  37. app/code/local/Magmodules/Webwinkelkeur/etc/system.xml +582 -0
  38. app/code/local/Magmodules/Webwinkelkeur/sql/webwinkelkeur_setup/mysql4-install-0.9.0.php +78 -0
  39. app/design/adminhtml/default/default/layout/magmodules_webwinkelkeur.xml +16 -0
  40. app/design/frontend/base/default/layout/magmodules_webwinkelkeur.xml +39 -0
  41. app/design/frontend/base/default/template/magmodules/webwinkelkeur/index.phtml +132 -0
  42. app/design/frontend/base/default/template/magmodules/webwinkelkeur/sidebar/js-sidebar.phtml +47 -0
  43. app/design/frontend/base/default/template/magmodules/webwinkelkeur/sidebar/left.phtml +70 -0
  44. app/design/frontend/base/default/template/magmodules/webwinkelkeur/sidebar/right.phtml +71 -0
  45. app/design/frontend/base/default/template/magmodules/webwinkelkeur/widget/richsnippets.phtml +34 -0
  46. app/etc/modules/Magmodules_Webwinkelkeur.xml +9 -0
  47. app/locale/en_US/Magmodules_Webwinkelkeur.csv +108 -0
  48. app/locale/nl_NL/Magmodules_Webwinkelkeur.csv +108 -0
  49. package.xml +18 -0
  50. skin/adminhtml/default/default/magmodules/webwinkelkeur/grid.css +71 -0
  51. skin/adminhtml/default/default/magmodules/webwinkelkeur/star.png +0 -0
  52. skin/frontend/base/default/magmodules/webwinkelkeur/images/5-stars-empty.png +0 -0
  53. skin/frontend/base/default/magmodules/webwinkelkeur/images/5-stars-full.png +0 -0
  54. skin/frontend/base/default/magmodules/webwinkelkeur/images/greystar.png +0 -0
  55. skin/frontend/base/default/magmodules/webwinkelkeur/images/star.png +0 -0
  56. skin/frontend/base/default/magmodules/webwinkelkeur/richsnippets.css +41 -0
  57. skin/frontend/base/default/magmodules/webwinkelkeur/sidebar.css +38 -0
  58. skin/frontend/base/default/magmodules/webwinkelkeur/style.css +118 -0
app/code/local/Magmodules/Webwinkelkeur/Block/Adminhtml/Webwinkellog.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Webwinkelkeur
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
+ class Magmodules_Webwinkelkeur_Block_Adminhtml_Webwinkellog extends Mage_Adminhtml_Block_Widget_Grid_Container {
23
+
24
+ public function __construct() {
25
+ $this->_controller = 'adminhtml_webwinkellog';
26
+ $this->_blockGroup = 'webwinkelkeur';
27
+ $this->_headerText = Mage::helper('webwinkelkeur')->__('Webwinkelkeur Logs');
28
+ parent::__construct();
29
+ $this->_removeButton('add');
30
+
31
+ $this->_addButton('module_controller', array(
32
+ 'label' => Mage::helper('webwinkelkeur')->__('Cleanup Log'),
33
+ 'onclick' => "setLocation('{$this->getUrl('adminhtml/webwinkellog/clean')}')",
34
+ 'confirm' => Mage::helper('webwinkelkeur')->__('Are you sure you want to cleanup logfiles?'),
35
+ ));
36
+
37
+ }
38
+
39
+ }
app/code/local/Magmodules/Webwinkelkeur/Block/Adminhtml/Webwinkellog/Grid.php ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Webwinkelkeur
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
+ class Magmodules_Webwinkelkeur_Block_Adminhtml_Webwinkellog_Grid extends Mage_Adminhtml_Block_Widget_Grid {
23
+
24
+ public function __construct() {
25
+ parent::__construct();
26
+ $this->setId('webwinkellogGrid');
27
+ $this->setDefaultSort('date');
28
+ $this->setDefaultDir('DESC');
29
+ $this->setSaveParametersInSession(true);
30
+ }
31
+
32
+ protected function _prepareCollection() {
33
+ $collection = Mage::getModel('webwinkelkeur/log')->getCollection();
34
+ $this->setCollection($collection);
35
+ return parent::_prepareCollection();
36
+ }
37
+
38
+ protected function _prepareColumns() {
39
+
40
+ $this->addColumn('company', array(
41
+ 'header' => Mage::helper('webwinkelkeur')->__('Shop'),
42
+ 'index' => 'company',
43
+ 'width' => '120px',
44
+ ));
45
+
46
+ $this->addColumn('type', array(
47
+ 'header' => Mage::helper('webwinkelkeur')->__('Type'),
48
+ 'align' => 'left',
49
+ 'index' => 'type',
50
+ 'width' => '120',
51
+ 'type' => 'options',
52
+ 'options' => array(
53
+ 'reviews' => Mage::helper('webwinkelkeur')->__('Reviews'),
54
+ 'invitation' => Mage::helper('webwinkelkeur')->__('Invitation Call'),
55
+ ),
56
+ ));
57
+
58
+ $this->addColumn('qty', array(
59
+ 'header' => Mage::helper('webwinkelkeur')->__('Description'),
60
+ 'align' => 'left',
61
+ 'index' => 'qty',
62
+ 'renderer' => 'webwinkelkeur/adminhtml_widget_grid_log',
63
+ 'filter' => false,
64
+ 'sortable' => false,
65
+ ));
66
+
67
+ $this->addColumn('cron', array(
68
+ 'header' => Mage::helper('webwinkelkeur')->__('Cron'),
69
+ 'align' => 'left',
70
+ 'index' => 'cron',
71
+ 'width' => '120',
72
+ 'type' => 'options',
73
+ 'options' => array(
74
+ '' => Mage::helper('webwinkelkeur')->__('Manual'),
75
+ 'stats' => Mage::helper('webwinkelkeur')->__('Stats Cron'),
76
+ 'reviews' => Mage::helper('webwinkelkeur')->__('Reviews Cron'),
77
+ 'orderupdate' => Mage::helper('webwinkelkeur')->__('Invitation'),
78
+ ),
79
+ ));
80
+
81
+ $this->addColumn('time', array(
82
+ 'header' => Mage::helper('webwinkelkeur')->__('Time'),
83
+ 'align' => 'left',
84
+ 'index' => 'time',
85
+ 'width' => '60',
86
+ 'renderer' => 'webwinkelkeur/adminhtml_widget_grid_seconds',
87
+ ));
88
+
89
+ $this->addColumn('date', array(
90
+ 'header' => Mage::helper('webwinkelkeur')->__('Date'),
91
+ 'align' => 'left',
92
+ 'type' => 'datetime',
93
+ 'index' => 'date',
94
+ 'width' => '140',
95
+ ));
96
+
97
+ return parent::_prepareColumns();
98
+ }
99
+
100
+ protected function _prepareMassaction() {
101
+ $this->setMassactionIdField('id');
102
+ $this->getMassactionBlock()->setFormFieldName('logids');
103
+
104
+ $this->getMassactionBlock()->addItem('hide', array(
105
+ 'label' => Mage::helper('webwinkelkeur')->__('Delete'),
106
+ 'url' => $this->getUrl('*/*/massDelete'),
107
+ ));
108
+ return $this;
109
+ }
110
+
111
+ public function getRowUrl($row)
112
+ {
113
+ return;
114
+ }
115
+
116
+ }
app/code/local/Magmodules/Webwinkelkeur/Block/Adminhtml/Webwinkelreviews.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Webwinkelkeur
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
+ class Magmodules_Webwinkelkeur_Block_Adminhtml_Webwinkelreviews extends Mage_Adminhtml_Block_Widget_Grid_Container {
23
+
24
+ public function __construct() {
25
+ $this->_controller = 'adminhtml_webwinkelreviews';
26
+ $this->_blockGroup = 'webwinkelkeur';
27
+ $this->_headerText = Mage::helper('webwinkelkeur')->__('WebwinkelKeur Reviews');
28
+ parent::__construct();
29
+ $this->_removeButton('add');
30
+
31
+ $this->_addButton('module_controller', array(
32
+ 'label' => Mage::helper('webwinkelkeur')->__('Delete all reviews'),
33
+ 'onclick' => "setLocation('{$this->getUrl('adminhtml/webwinkelreviews/truncate')}')",
34
+ 'confirm' => Mage::helper('webwinkelkeur')->__('Are you sure you want to delete all reviews?'),
35
+ ));
36
+
37
+ }
38
+
39
+ }
app/code/local/Magmodules/Webwinkelkeur/Block/Adminhtml/Webwinkelreviews/Grid.php ADDED
@@ -0,0 +1,171 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Webwinkelkeur
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
+ class Magmodules_Webwinkelkeur_Block_Adminhtml_Webwinkelreviews_Grid extends Mage_Adminhtml_Block_Widget_Grid {
23
+
24
+ public function __construct() {
25
+ parent::__construct();
26
+ $this->setId('reviewsGrid');
27
+ $this->setDefaultSort('date');
28
+ $this->setDefaultDir('ASC');
29
+ $this->setSaveParametersInSession(true);
30
+ }
31
+
32
+ protected function _prepareCollection() {
33
+ $collection = Mage::getModel('webwinkelkeur/reviews')->getCollection();
34
+ $this->setCollection($collection);
35
+ return parent::_prepareCollection();
36
+ }
37
+
38
+ protected function _prepareColumns() {
39
+
40
+ $this->addColumn('company', array(
41
+ 'header' => Mage::helper('webwinkelkeur')->__('Shop'),
42
+ 'index' => 'company',
43
+ 'width' => '120px',
44
+ ));
45
+
46
+ $this->addColumn('name', array(
47
+ 'header' => Mage::helper('webwinkelkeur')->__('Name'),
48
+ 'align' => 'left',
49
+ 'index' => 'name',
50
+ ));
51
+
52
+ $this->addColumn('experience', array(
53
+ 'header' => Mage::helper('webwinkelkeur')->__('Experience'),
54
+ 'align' => 'left',
55
+ 'index' => 'experience',
56
+ 'renderer' => 'webwinkelkeur/adminhtml_webwinkelreviews_renderer_experience',
57
+ ));
58
+
59
+ $this->addColumn('rating', array(
60
+ 'header' => Mage::helper('webwinkelkeur')->__('Rating'),
61
+ 'align' => 'left',
62
+ 'index' => 'rating',
63
+ 'renderer' => 'webwinkelkeur/adminhtml_widget_grid_stars',
64
+ 'width' => '90',
65
+ 'filter' => false,
66
+ 'sortable' => true,
67
+ ));
68
+
69
+ $this->addColumn('delivery_time', array(
70
+ 'header' => Mage::helper('webwinkelkeur')->__('Delivery Time'),
71
+ 'align' => 'left',
72
+ 'index' => 'delivery_time',
73
+ 'renderer' => 'webwinkelkeur/adminhtml_widget_grid_stars',
74
+ 'width' => '90',
75
+ 'filter' => false,
76
+ 'sortable' => true,
77
+ ));
78
+
79
+ $this->addColumn('userfriendlyness', array(
80
+ 'header' => Mage::helper('webwinkelkeur')->__('Userfriendlyness'),
81
+ 'align' => 'left',
82
+ 'index' => 'userfriendlyness',
83
+ 'renderer' => 'webwinkelkeur/adminhtml_widget_grid_stars',
84
+ 'width' => '90',
85
+ 'filter' => false,
86
+ 'sortable' => true,
87
+ ));
88
+
89
+ $this->addColumn('price_quality', array(
90
+ 'header' => Mage::helper('webwinkelkeur')->__('Price / Quality'),
91
+ 'align' => 'left',
92
+ 'index' => 'price_quality',
93
+ 'renderer' => 'webwinkelkeur/adminhtml_widget_grid_stars',
94
+ 'width' => '90',
95
+ 'filter' => false,
96
+ 'sortable' => true,
97
+ ));
98
+
99
+ $this->addColumn('aftersales', array(
100
+ 'header' => Mage::helper('webwinkelkeur')->__('Aftersales'),
101
+ 'align' => 'left',
102
+ 'index' => 'aftersales',
103
+ 'renderer' => 'webwinkelkeur/adminhtml_widget_grid_stars',
104
+ 'width' => '90',
105
+ 'filter' => false,
106
+ 'sortable' => true,
107
+ ));
108
+
109
+ $this->addColumn('date', array(
110
+ 'header' => Mage::helper('webwinkelkeur')->__('Date'),
111
+ 'align' => 'left',
112
+ 'type' => 'date',
113
+ 'index' => 'date',
114
+ 'width' => '140',
115
+ ));
116
+
117
+ $this->addColumn('sidebar', array(
118
+ 'header' => Mage::helper('webwinkelkeur')->__('Sidebar'),
119
+ 'align' => 'left',
120
+ 'width' => '80px',
121
+ 'index' => 'sidebar',
122
+ 'type' => 'options',
123
+ 'options' => array(
124
+ 0 => Mage::helper('webwinkelkeur')->__('No'),
125
+ 1 => Mage::helper('webwinkelkeur')->__('Yes'),
126
+ ),
127
+ ));
128
+
129
+ $this->addColumn('status', array(
130
+ 'header' => Mage::helper('webwinkelkeur')->__('Active'),
131
+ 'align' => 'left',
132
+ 'width' => '80px',
133
+ 'index' => 'status',
134
+ 'type' => 'options',
135
+ 'options' => array(
136
+ 0 => Mage::helper('webwinkelkeur')->__('No'),
137
+ 1 => Mage::helper('webwinkelkeur')->__('Yes'),
138
+ ),
139
+ ));
140
+
141
+ return parent::_prepareColumns();
142
+ }
143
+
144
+ protected function _prepareMassaction() {
145
+ $this->setMassactionIdField('review_id');
146
+ $this->getMassactionBlock()->setFormFieldName('reviewids');
147
+
148
+ $this->getMassactionBlock()->addItem('hide', array(
149
+ 'label' => Mage::helper('webwinkelkeur')->__('Set to invisible'),
150
+ 'url' => $this->getUrl('*/*/massDisable'),
151
+ ));
152
+ $this->getMassactionBlock()->addItem('visible', array(
153
+ 'label' => Mage::helper('webwinkelkeur')->__('Set to visible'),
154
+ 'url' => $this->getUrl('*/*/massEnable'),
155
+ ));
156
+ $this->getMassactionBlock()->addItem('addsidebar', array(
157
+ 'label' => Mage::helper('webwinkelkeur')->__('Add to Sidebar'),
158
+ 'url' => $this->getUrl('*/*/massEnableSidebar'),
159
+ ));
160
+ $this->getMassactionBlock()->addItem('removesidebar', array(
161
+ 'label' => Mage::helper('webwinkelkeur')->__('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
+ }
app/code/local/Magmodules/Webwinkelkeur/Block/Adminhtml/Webwinkelreviews/Renderer/Experience.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Webwinkelkeur
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
+ class Magmodules_Webwinkelkeur_Block_Adminhtml_Webwinkelreviews_Renderer_Experience extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract {
23
+
24
+ public function render(Varien_Object $row) {
25
+ $value = $row->getData($this->getColumn()->getIndex());
26
+ $char_limit = '120';
27
+ if(strlen($value) > $char_limit) {
28
+ $content_small = Mage::helper('core/string')->truncate($value, $char_limit, ' ... <a href="#" class="magtooltip" alt="">' . Mage::helper('webwinkelkeur')->__('(more)'), $_remainder, false);
29
+ $content = $content_small . '<span>' . $value . '</span></a>';
30
+ return $content;
31
+ } else {
32
+ return $value;
33
+ }
34
+ }
35
+
36
+ }
app/code/local/Magmodules/Webwinkelkeur/Block/Adminhtml/Widget/Buttons/Process.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Webwinkelkeur
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
+ class Magmodules_Webwinkelkeur_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
+ $this->setElement($element);
26
+ $url = $this->getUrl('*/webwinkelreviews/process');
27
+
28
+ $html = $this->getLayout()->createBlock('adminhtml/widget_button')
29
+ ->setType('button')
30
+ ->setClass('scalable')
31
+ ->setLabel(Mage::helper('webwinkelkeur')->__('Process Manually'))
32
+ ->setOnClick("setLocation('$url')")
33
+ ->toHtml();
34
+
35
+ return $html;
36
+ }
37
+
38
+ }
app/code/local/Magmodules/Webwinkelkeur/Block/Adminhtml/Widget/Buttons/Test.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Webwinkelkeur
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
+ class Magmodules_Webwinkelkeur_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('*/webwinkelreviews/testapi');
27
+ $html = $this->getLayout()->createBlock('adminhtml/widget_button')
28
+ ->setType('button')
29
+ ->setClass('scalable')
30
+ ->setLabel(Mage::helper('webwinkelkeur')->__('Test API'))
31
+ ->setOnClick("setLocation('$url')")
32
+ ->toHtml();
33
+ return $html;
34
+ }
35
+
36
+ }
app/code/local/Magmodules/Webwinkelkeur/Block/Adminhtml/Widget/Form/Heading.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Webwinkelkeur
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
+ class Magmodules_Webwinkelkeur_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
+ }
app/code/local/Magmodules/Webwinkelkeur/Block/Adminhtml/Widget/Grid/Log.php ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
4
+ * =============================================================
5
+ * NOTICE OF LICENSE [Single domain license]
6
+ * This source file is subject to the EULA that is
7
+ * available through the world-wide-web at:
8
+ * http://www.magmodules.eu/license-agreement/
9
+ * =============================================================
10
+ * @category Magmodules
11
+ * @package Magmodules_Shopreview
12
+ * @author Magmodules <info@magmodules.eu>
13
+ * @copyright Copyright (c) 2013 (http://www.magmodules.eu)
14
+ * @license http://www.magmodules.eu/license-agreement/
15
+ * =============================================================
16
+ */
17
+
18
+ class Magmodules_Webwinkelkeur_Block_Adminhtml_Widget_Grid_Log extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Action {
19
+
20
+ public function render(Varien_Object $row) {
21
+ $type = $row->getType();
22
+ $msg = '';
23
+
24
+ if($type == 'reviews') {
25
+ $updates = '';
26
+ if($row->getReviewNew() > 0) {
27
+ $msg .= Mage::helper('webwinkelkeur')->__('%s new review(s)', $row->getReviewNew());
28
+ $updates++;
29
+ }
30
+ if($row->getReviewUpdate() > 0) {
31
+ if($updates > 0) {
32
+ $msg .= ', ';
33
+ }
34
+ $msg .= Mage::helper('webwinkelkeur')->__('%s review(s) updated', $row->getReviewUpdate());
35
+ $updates++;
36
+ }
37
+ if($updates > 0) {
38
+ $msg .= ' & ';
39
+ }
40
+ $msg .= Mage::helper('webwinkelkeur')->__('total score updated.');
41
+ }
42
+
43
+ if($type == 'invitation') {
44
+ if($row->getOrderId()) {
45
+ $order = Mage::getModel('sales/order')->load($row->getOrderId());
46
+ $increment_id = $order->getIncrementId();
47
+ $order_url = Mage::helper('adminhtml')->getUrl("adminhtml/sales_order/view", array('order_id'=> $row->getOrderId()));
48
+ $msg = Mage::helper('webwinkelkeur')->__('%s - Repsonse: %s', '<a href="' . $order_url . '">#' . $increment_id .'</a>', $row->getResponse());
49
+ }
50
+ }
51
+
52
+ return ucfirst($msg);
53
+ }
54
+
55
+ }
app/code/local/Magmodules/Webwinkelkeur/Block/Adminhtml/Widget/Grid/Seconds.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Webwinkelkeur
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
+ class Magmodules_Webwinkelkeur_Block_Adminhtml_Widget_Grid_Seconds extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Action {
23
+
24
+ public function render(Varien_Object $row) {
25
+ $value = $row->getData($this->getColumn()->getIndex());
26
+
27
+ if($value > 0) {
28
+ $value = number_format($value, 3, '.', '');
29
+ }
30
+
31
+ return $value;
32
+ }
33
+
34
+ }
app/code/local/Magmodules/Webwinkelkeur/Block/Adminhtml/Widget/Grid/Stars.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Webwinkelkeur
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
+ class Magmodules_Webwinkelkeur_Block_Adminhtml_Widget_Grid_Stars extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Action {
23
+
24
+ public function render(Varien_Object $row) {
25
+ $value = $row->getData($this->getColumn()->getIndex());
26
+
27
+ if($value == '0') {
28
+ $output = '';
29
+ } else {
30
+ $output = '<span class="rating-empty"><span class="rating-star-' . $value . '"></span></span>';
31
+ }
32
+
33
+ return $output;
34
+ }
35
+
36
+ }
app/code/local/Magmodules/Webwinkelkeur/Block/Adminhtml/Widget/Info/Info.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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:
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_Webwinkelkeur
18
+ * @author Magmodules <info@magmodules.eu)
19
+ * @copyright Copyright (c) 2014 (http://www.magmodules.eu)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ */
22
+
23
+ class Magmodules_Webwinkelkeur_Block_Adminhtml_Widget_Info_Info extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface {
24
+
25
+ public function render(Varien_Data_Form_Element_Abstract $element)
26
+ {
27
+ $html = '<div style="background:url(\'http://www.magmodules.eu/_logo.png\') no-repeat scroll 15px center #EAF0EE;border:1px solid #CCCCCC;margin-bottom:10px;padding:10px 5px 5px 200px;">
28
+ <h4>About Magmodules.eu</h4>
29
+ <p>We are a Magento only E-commerce Agency located in the Netherlands.<br>
30
+ <br />
31
+ <table width="500px" border="0">
32
+ <tr>
33
+ <td width="58%">View more extensions from us:</td>
34
+ <td width="42%"><a href="http://www.magentocommerce.com/magento-connect/developer/Magmodules" target="_blank">Magento Connect</a></td>
35
+ </tr>
36
+ <tr>
37
+ <td>Question about this extension?</td>
38
+ <td><a href="http://www.magmodules.eu/contactus">Contact us</a></td>
39
+ </tr>
40
+ <tr>
41
+ <td>&nbsp;</td>
42
+ <td>&nbsp;</td>
43
+ </tr>
44
+ <td>Send us an E-mail:
45
+ <td><a href="mailto:info@magmodules.eu">info@magmodules.eu</a></td>
46
+ </tr>
47
+ <tr>
48
+ <td height="30">Visit our website:</td>
49
+ <td><a href="http://www.magmodules.eu" target="_blank">www.magmodules.eu</a></td>
50
+ </tr>
51
+ </table>
52
+ </div>';
53
+
54
+ return $html;
55
+ }
56
+ }
app/code/local/Magmodules/Webwinkelkeur/Block/Reviews.php ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Webwinkelkeur
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
+ class Magmodules_Webwinkelkeur_Block_Reviews extends Mage_Core_Block_Template {
23
+
24
+ public function __construct() {
25
+ parent::__construct();
26
+
27
+ // TODO CHECK IF IS ENABLED (extension & index page)
28
+
29
+ // Load Reviews
30
+ $collection = Mage::getModel('webwinkelkeur/reviews')->getCollection();
31
+ $collection->setOrder('date', 'DESC');
32
+ $collection->addFieldToFilter('status',1);
33
+ $collection->addFieldToFilter('shop_id', Mage::getStoreConfig('webwinkelkeur/general/api_id'));
34
+ $this->setReviews($collection);
35
+
36
+ // Load Stats
37
+ $stats = Mage::getModel('webwinkelkeur/stats')->load(Mage::getStoreConfig('webwinkelkeur/general/api_id'), 'shop_id');
38
+ $this->setStats($stats);
39
+ }
40
+
41
+ public function _prepareLayout() {
42
+ parent::_prepareLayout();
43
+ $pager = $this->getLayout()->createBlock('page/html_pager', 'webwinkelkeur.pager');
44
+ if(Mage::getStoreConfig('webwinkelkeur/overview/enable_paging')) {
45
+ $fieldPerPage = Mage::getStoreConfig('webwinkelkeur/overview/paging_settings');
46
+ $fieldPerPage = explode(',', $fieldPerPage);
47
+ $fieldPerPage = array_combine($fieldPerPage, $fieldPerPage);
48
+ $pager->setAvailableLimit($fieldPerPage);
49
+ } else {
50
+ $pager->setAvailableLimit(array('all'=>'all'));
51
+ }
52
+ $pager->setCollection($this->getReviews());
53
+ $this->setChild('pager', $pager);
54
+ $this->getReviews()->load();
55
+ return $this;
56
+ }
57
+
58
+ public function getPagerHtml() {
59
+ return $this->getChildHtml('pager');
60
+ }
61
+
62
+ public function getFormUrl() {
63
+ return $this->helper('webwinkelkeur')->getFormUrl();
64
+ }
65
+
66
+ }
app/code/local/Magmodules/Webwinkelkeur/Block/Sidebar.php ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Webwinkelkeur
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
+ class Magmodules_Webwinkelkeur_Block_Sidebar extends Mage_Core_Block_Template {
23
+
24
+ protected function _construct() {
25
+ parent::_construct();
26
+ }
27
+
28
+ function getSidebarCollection($sidebar) {
29
+
30
+ $enabled = '';
31
+ $qty = '5';
32
+
33
+ if($sidebar == 'left'):
34
+ $qty = Mage::getStoreConfig('webwinkelkeur/sidebar/left_qty');
35
+ $enabled = Mage::getStoreConfig('webwinkelkeur/sidebar/left');
36
+ endif;
37
+ if($sidebar == 'right'):
38
+ $qty = Mage::getStoreConfig('webwinkelkeur/sidebar/right_qty');
39
+ $enabled = Mage::getStoreConfig('webwinkelkeur/sidebar/right');
40
+ endif;
41
+
42
+ if($enabled):
43
+ $shop_id = Mage::getStoreConfig('webwinkelkeur/general/api_id');
44
+ $collection = Mage::getModel("webwinkelkeur/reviews")->getCollection();
45
+ $collection->setOrder('date', 'DESC');
46
+ $collection->addFieldToFilter('status',1);
47
+ $collection->addFieldToFilter('sidebar',1);
48
+ $collection->addFieldToFilter('shop_id', array('eq'=> array($shop_id)));
49
+ $collection->setPageSize($qty);
50
+ $collection->load();
51
+ return $collection;
52
+ else:
53
+ return false;
54
+ endif;
55
+ }
56
+
57
+ function formatContent($sidebarreview, $sidebar = 'left') {
58
+
59
+ $content = $sidebarreview->getExperience();
60
+
61
+ if($sidebar == 'left'):
62
+ $char_limit = Mage::getStoreConfig('webwinkelkeur/sidebar/left_lenght');
63
+ endif;
64
+ if($sidebar == 'right'):
65
+ $char_limit = Mage::getStoreConfig('webwinkelkeur/sidebar/right_lenght');
66
+ endif;
67
+
68
+ $content = Mage::helper('core/string')->truncate($content, $char_limit, ' ...', $_remainder, false);
69
+ return $content;
70
+
71
+ }
72
+
73
+ function getReviewsUrl($sidebar = 'left') {
74
+
75
+ if($sidebar == 'left'):
76
+ $link = Mage::getStoreConfig('webwinkelkeur/sidebar/left_link');
77
+ endif;
78
+ if($sidebar == 'right'):
79
+ $link = Mage::getStoreConfig('webwinkelkeur/sidebar/left_right');
80
+ endif;
81
+
82
+ if($link == 'internal'):
83
+ $url = $this->getUrl('webwinkelkeur');
84
+ endif;
85
+ if($link == 'external'):
86
+ $url = Mage::getStoreConfig('webwinkelkeur/general/url');
87
+ $class = 'webwinkelkeurReviews';
88
+ endif;
89
+
90
+ if($url) {
91
+ return '<a href="' . $url . '" class="' . $class .'">' . $this->__('View all reviews') . '</a>';
92
+ } else {
93
+ return false;
94
+ }
95
+
96
+ }
97
+
98
+ function getSnippetsEnabled($sidebar = 'left') {
99
+ $enabled = Mage::getStoreConfig('webwinkelkeur/snippets/sidebar');
100
+ $homepage = Mage::getBlockSingleton('page/html_header')->getIsHomePage();
101
+
102
+ if($enabled && $homepage) {
103
+ return true;
104
+ } else {
105
+ return false;
106
+ }
107
+ }
108
+
109
+ public function getTotalScore() {
110
+ return $this->helper('webwinkelkeur')->getTotalScore();
111
+ }
112
+
113
+ }
app/code/local/Magmodules/Webwinkelkeur/Block/Snippets.php ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Webwinkelkeur
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
+ class Magmodules_Webwinkelkeur_Block_Snippets extends Mage_Core_Block_Template {
23
+
24
+ protected function _construct()
25
+ {
26
+ if(Mage::getStoreConfig('webwinkelkeur/general/enabled')) {
27
+ $this->setSnippetsEnabled(1);
28
+ } else {
29
+ $this->setSnippetsEnabled(0);
30
+ }
31
+
32
+ parent::_construct();
33
+ $this->setTemplate('magmodules/webwinkelkeur/widget/richsnippets.phtml');
34
+ }
35
+
36
+ public function getSnippets()
37
+ {
38
+ return $this->helper('webwinkelkeur')->getTotalScore();
39
+ }
40
+
41
+ public function getHtmlStars($rating)
42
+ {
43
+ return $this->helper('webwinkelkeur')->getHtmlStars($rating);
44
+ }
45
+
46
+ public function getExternalLink()
47
+ {
48
+ return $this->helper('webwinkelkeur')->getExternalLink();
49
+ }
50
+
51
+ }
app/code/local/Magmodules/Webwinkelkeur/Helper/Data.php ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Webwinkelkeur
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
+ class Magmodules_Webwinkelkeur_Helper_Data extends Mage_Core_Helper_Abstract {
23
+
24
+ public function getTotalScore() {
25
+ $qty = 0; $rating = 0;
26
+ $shop_id = Mage::getStoreConfig('webwinkelkeur/general/api_id');
27
+ $review_stats = Mage::getModel('webwinkelkeur/stats')->load($shop_id, 'shop_id');
28
+ if($review_stats->getAverage() > 0) {
29
+ $review_stats->setPercentage($review_stats->getAverage());
30
+ $review_stats->setStarsQty(number_format(($review_stats->getPercentage() / 20), 2, '.', ''));
31
+ return $review_stats;
32
+ } else {
33
+ return false;
34
+ }
35
+ }
36
+
37
+ function getExternalLink() {
38
+ if(Mage::getStoreConfig('webwinkelkeur/general/url')) {
39
+ return Mage::helper('webwinkelkeur')->__('on') . ' <a href="' . Mage::getStoreConfig('webwinkelkeur/general/url'). '" target="_blank">WebwinkelKeur.nl</a>';
40
+ } else {
41
+ return false;
42
+ }
43
+ }
44
+
45
+ function getHtmlStars($rating)
46
+ {
47
+ $perc = $rating;
48
+ $html = '<div class="rating-box">';
49
+ $html .= ' <div class="rating" style="width:' . $perc . '%"></div>';
50
+ $html .= '</div>';
51
+ return $html;
52
+ }
53
+
54
+ }
app/code/local/Magmodules/Webwinkelkeur/Model/Api.php ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Webwinkelkeur
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
+ class Magmodules_Webwinkelkeur_Model_Api extends Mage_Core_Model_Abstract {
23
+
24
+ public function processFeed($storeid = 0, $type) {
25
+ if($feed = $this->getFeed($storeid, $type)) {
26
+ $results = Mage::getModel('webwinkelkeur/reviews')->processFeed($feed, $storeid, $type);
27
+ $results['stats'] = Mage::getModel('webwinkelkeur/stats')->processFeed($feed, $storeid);
28
+ return $results;
29
+ } else {
30
+ return false;
31
+ }
32
+ }
33
+
34
+ public function getFeed($storeid, $type = '') {
35
+ $api_id = Mage::getStoreConfig('webwinkelkeur/general/api_id', $storeid);
36
+ $api_key = Mage::getStoreConfig('webwinkelkeur/general/api_key', $storeid);
37
+
38
+ if($type != 'stats') {
39
+ $api_url = 'https://www.webwinkelkeur.nl/apistatistics.php?id=' . $api_id . '&password=' . $api_key . '&showall=1';
40
+ } else {
41
+ $api_url = 'https://www.webwinkelkeur.nl/apistatistics.php?id=' . $api_id . '&password=' . $api_key;
42
+ }
43
+
44
+ if($api_id && $api_key) {
45
+ $xml = simplexml_load_file($api_url);
46
+ if($xml) {
47
+ return $xml;
48
+ } else {
49
+ return false;
50
+ }
51
+ } else {
52
+ return false;
53
+ }
54
+ }
55
+
56
+ public function sendInvitation($order) {
57
+ $start_time = microtime(true);
58
+ $crontype = 'orderupdate';
59
+ $order_id = $order->getIncrementId();
60
+ $api_id = Mage::getStoreConfig('webwinkelkeur/general/api_id', $order->getStoreId());
61
+ $api_key = Mage::getStoreConfig('webwinkelkeur/general/api_key', $order->getStoreId());
62
+ $delay = Mage::getStoreConfig('webwinkelkeur/invitation/delay', $order->getStoreId());
63
+ $email = $order->getCustomerEmail();
64
+ $api_url = 'https://www.webwinkelkeur.nl/api.php?id=' . $api_id . '&password=' . $api_key . '&email=' . $email . '&order=' . $order_id . '&delay=' . $delay;
65
+
66
+ // Connect to API
67
+ $winkelconnect = curl_init($api_url);
68
+ curl_setopt($winkelconnect, CURLOPT_VERBOSE, 1);
69
+ curl_setopt($winkelconnect, CURLOPT_FAILONERROR, false);
70
+ curl_setopt($winkelconnect, CURLOPT_HEADER, 0);
71
+ curl_setopt($winkelconnect, CURLOPT_FOLLOWLOCATION, 1);
72
+ curl_setopt($winkelconnect, CURLOPT_RETURNTRANSFER, 1);
73
+ curl_setopt($winkelconnect, CURLOPT_SSL_VERIFYPEER, false);
74
+ $repsonse = curl_exec($winkelconnect);
75
+ curl_close($winkelconnect);
76
+
77
+ // Write to log
78
+ $writelog = Mage::getModel('webwinkelkeur/log')->addToLog('invitation', $order->getStoreId(), '', $repsonse, (microtime(true) - $start_time), $crontype, $api_url, $order->getId());
79
+ return true;
80
+ }
81
+
82
+ public function getStoreIds() {
83
+ $resource = Mage::getSingleton('core/resource');
84
+ $read = $resource->getConnection('core_read');
85
+ $query = "SELECT DISTINCT value, scope_id FROM " . $resource->getTableName('core/config_data') . " WHERE path LIKE 'webwinkelkeur/general/api_id'";
86
+ $results = $read->fetchAll($query);
87
+ $storeids = array();
88
+
89
+ foreach($results as $result) {
90
+ if($result['value'] > 0) {
91
+ $storeids[] = $result['scope_id'];
92
+ }
93
+ }
94
+ return $storeids;
95
+ }
96
+
97
+ }
app/code/local/Magmodules/Webwinkelkeur/Model/Log.php ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Webwinkelkeur
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
+ class Magmodules_Webwinkelkeur_Model_Log extends Mage_Core_Model_Abstract {
23
+
24
+ public function _construct() {
25
+ parent::_construct();
26
+ $this->_init('webwinkelkeur/log');
27
+ }
28
+
29
+ public function addToLog($type, $storeid, $review = '', $inivation = '', $time, $crontype = '', $api_url = '', $orderid = '') {
30
+
31
+ if(Mage::getStoreConfig('webwinkelkeur/log/enabled')) {
32
+
33
+ $api_id = Mage::getStoreConfig('webwinkelkeur/general/api_id', $storeid);
34
+ $company = Mage::getStoreConfig('webwinkelkeur/general/company', $storeid);
35
+ $review_updates = '';
36
+ $review_new = '';
37
+
38
+ if($review) {
39
+ $company = $review['company'];
40
+ $review_updates = $review['review_updates'];
41
+ $review_new = $review['review_new'];
42
+ }
43
+
44
+ $model = Mage::getModel('webwinkelkeur/log');
45
+ $model->setType($type)
46
+ ->setShopId($api_id)
47
+ ->setCompany($company)
48
+ ->setReviewUpdate($review_updates)
49
+ ->setReviewNew($review_new)
50
+ ->setResponse($inivation)
51
+ ->setOrderId($orderid)
52
+ ->setCron($crontype)
53
+ ->setDate(now())
54
+ ->setTime($time)
55
+ ->setApiUrl($api_url)
56
+ ->save();
57
+ }
58
+
59
+ return;
60
+ }
61
+
62
+ }
app/code/local/Magmodules/Webwinkelkeur/Model/Mysql4/Log.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Webwinkelkeur
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
+ class Magmodules_Webwinkelkeur_Model_Mysql4_Log extends Mage_Core_Model_Mysql4_Abstract {
23
+
24
+ public function _construct() {
25
+ $this->_init('webwinkelkeur/log', 'id');
26
+ }
27
+
28
+ }
app/code/local/Magmodules/Webwinkelkeur/Model/Mysql4/Log/Collection.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Webwinkelkeur
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
+ class Magmodules_Webwinkelkeur_Model_Mysql4_Log_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
23
+
24
+ public function _construct() {
25
+ parent::_construct();
26
+ $this->_init('webwinkelkeur/log');
27
+ }
28
+
29
+ }
app/code/local/Magmodules/Webwinkelkeur/Model/Mysql4/Reviews.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Webwinkelkeur
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
+ class Magmodules_Webwinkelkeur_Model_Mysql4_Reviews extends Mage_Core_Model_Mysql4_Abstract {
23
+
24
+ public function _construct() {
25
+ $this->_init('webwinkelkeur/reviews', 'review_id');
26
+ }
27
+
28
+ }
app/code/local/Magmodules/Webwinkelkeur/Model/Mysql4/Reviews/Collection.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Webwinkelkeur
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
+ class Magmodules_Webwinkelkeur_Model_Mysql4_Reviews_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
23
+
24
+ public function _construct() {
25
+ parent::_construct();
26
+ $this->_init('webwinkelkeur/reviews');
27
+ }
28
+
29
+ }
app/code/local/Magmodules/Webwinkelkeur/Model/Mysql4/Stats.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Webwinkelkeur
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
+ class Magmodules_Webwinkelkeur_Model_Mysql4_Stats extends Mage_Core_Model_Mysql4_Abstract {
23
+
24
+ public function _construct() {
25
+ $this->_init('webwinkelkeur/stats', 'id');
26
+ }
27
+
28
+ }
app/code/local/Magmodules/Webwinkelkeur/Model/Mysql4/Stats/Collection.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Webwinkelkeur
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
+ class Magmodules_Webwinkelkeur_Model_Mysql4_Stats_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
23
+
24
+ public function _construct() {
25
+ parent::_construct();
26
+ $this->_init('webwinkelkeur/stats');
27
+ }
28
+
29
+ }
app/code/local/Magmodules/Webwinkelkeur/Model/Observer.php ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Webwinkelkeur
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
+ class Magmodules_Webwinkelkeur_Model_Observer {
23
+
24
+ public function processStats() {
25
+ $storeids = Mage::getModel('webwinkelkeur/api')->getStoreIds();
26
+ foreach($storeids as $storeid) {
27
+ $enabled = Mage::getStoreConfig('webwinkelkeur/general/enabled', $storeid);
28
+ $cron_enabled = Mage::getStoreConfig('webwinkelkeur/reviews/cron', $storeid);
29
+ if($enabled && $cron_enabled) {
30
+ $crontype = 'stats';
31
+ $start_time = microtime(true);
32
+ $feed = Mage::getModel('webwinkelkeur/api')->getFeed($storeid, $crontype);
33
+ $resuls = array();
34
+ $results['stats'] = Mage::getModel('webwinkelkeur/stats')->processFeed($feed, $storeid);
35
+ $results['company'] = $feed->company;
36
+ $log = Mage::getModel('webwinkelkeur/log')->addToLog('reviews', $storeid, $results, '', (microtime(true) - $start_time), $crontype);
37
+ }
38
+ }
39
+ }
40
+
41
+ public function processReviews() {
42
+ $storeids = Mage::getModel('webwinkelkeur/api')->getStoreIds();
43
+ foreach($storeids as $storeid) {
44
+ $enabled = Mage::getStoreConfig('webwinkelkeur/general/enabled', $storeid);
45
+ $cron_enabled = Mage::getStoreConfig('webwinkelkeur/reviews/cron', $storeid);
46
+ if($enabled && $cron_enabled) {
47
+ $crontype = 'reviews';
48
+ $start_time = microtime(true);
49
+ $feed = Mage::getModel('webwinkelkeur/api')->getFeed($storeid, $type);
50
+ $results = Mage::getModel('webwinkelkeur/reviews')->processFeed($feed, $storeid, $crontype);
51
+ $results['stats'] = Mage::getModel('webwinkelkeur/stats')->processFeed($feed, $storeid, $type);
52
+ $log = Mage::getModel('webwinkelkeur/log')->addToLog('reviews', $storeid, $results, '', (microtime(true) - $start_time), $crontype);
53
+ }
54
+ }
55
+ }
56
+
57
+ public function processHistory() {
58
+ $storeids = Mage::getModel('webwinkelkeur/api')->getStoreIds();
59
+ foreach($storeids as $storeid) {
60
+ $enabled = Mage::getStoreConfig('webwinkelkeur/general/enabled', $storeid);
61
+ $cron_enabled = Mage::getStoreConfig('webwinkelkeur/reviews/cron', $storeid);
62
+ if($enabled && $cron_enabled) {
63
+ $crontype = 'history';
64
+ $start_time = microtime(true); $storeid = 0;
65
+ $feed = Mage::getModel('webwinkelkeur/api')->getFeed($storeid, $type);
66
+ $results = Mage::getModel('webwinkelkeur/reviews')->processFeed($feed, $storeid, $crontype);
67
+ $results['stats'] = Mage::getModel('webwinkelkeur/stats')->processFeed($feed, $storeid);
68
+ $log = Mage::getModel('webwinkelkeur/log')->addToLog('reviews', $storeid, $results, '', (microtime(true) - $start_time), $crontype);
69
+ }
70
+ }
71
+ }
72
+
73
+ public function cleanLog() {
74
+ $enabled = Mage::getStoreConfig('webwinkelkeur/log/clean', 0);
75
+ $days = Mage::getStoreConfig('webwinkelkeur/log/clean_days', 0);
76
+ if(($enabled) && ($days > 0)) {
77
+ $logmodel = Mage::getModel('webwinkelkeur/log');
78
+ $deldate = date('Y-m-d', strtotime('-' . $days . ' days'));
79
+ $logs = $logmodel->getCollection()->addFieldToSelect('id')->addFieldToFilter('date', array('lteq' => $deldate));
80
+ foreach ($logs as $log) {
81
+ $logmodel->load($log->getId())->delete();
82
+ }
83
+ }
84
+ }
85
+
86
+ public function processInvitationcallAfterShipment($observer) {
87
+ $shipment = $observer->getEvent()->getShipment();
88
+ $order = $shipment->getOrder();
89
+ if((Mage::getStoreConfig('webwinkelkeur/invitation/enabled', $order->getStoreId())) && (Mage::getStoreConfig('webwinkelkeur/general/api_key', $order->getStoreId()))):
90
+ if($order->getStatus() == Mage::getStoreConfig('webwinkelkeur/invitation/status', $order->getStoreId())):
91
+ if(Mage::getStoreConfig('webwinkelkeur/invitation/backlog', $order->getStoreId()) > 0):
92
+ $date_diff = floor(time() - strtotime($order->getCreatedAt()))/(60*60*24);
93
+ if($date_diff < Mage::getStoreConfig('webwinkelkeur/invitation/backlog', $order->getStoreId())):
94
+ Mage::getModel('webwinkelkeur/api')->sendInvitation($order);
95
+ endif;
96
+ else:
97
+ Mage::getModel('webwinkelkeur/api')->sendInvitation($order);
98
+ endif;
99
+ endif;
100
+ endif;
101
+ }
102
+
103
+ public function processInvitationcall($observer) {
104
+ $order = $observer->getEvent()->getOrder();
105
+ if((Mage::getStoreConfig('webwinkelkeur/invitation/enabled', $order->getStoreId())) && (Mage::getStoreConfig('webwinkelkeur/general/api_key', $order->getStoreId()))):
106
+ if($order->getStatus() == Mage::getStoreConfig('webwinkelkeur/invitation/status', $order->getStoreId())):
107
+ if(Mage::getStoreConfig('webwinkelkeur/invitation/backlog', $order->getStoreId()) > 0):
108
+ $date_diff = floor(time() - strtotime($order->getCreatedAt()))/(60*60*24);
109
+ if($date_diff < Mage::getStoreConfig('webwinkelkeur/invitation/backlog', $order->getStoreId())):
110
+ Mage::log('SEND!');
111
+ $value = Mage::getModel('webwinkelkeur/api')->sendInvitation($order);
112
+ Mage::log($value);
113
+ endif;
114
+ else:
115
+ Mage::getModel('webwinkelkeur/api')->sendInvitation($order);
116
+ endif;
117
+ endif;
118
+ endif;
119
+ }
120
+
121
+ }
app/code/local/Magmodules/Webwinkelkeur/Model/Reviews.php ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Webwinkelkeur
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
+ class Magmodules_Webwinkelkeur_Model_Reviews extends Mage_Core_Model_Abstract {
23
+
24
+ public function _construct() {
25
+ parent::_construct();
26
+ $this->_init('webwinkelkeur/reviews');
27
+ }
28
+
29
+ public function loadbyHash($hash) {
30
+ $this->_getResource()->load($this, $hash, 'hash');
31
+ return $this;
32
+ }
33
+
34
+ public function processFeed($feed, $storeid = 0, $type) {
35
+
36
+ $updates = 0; $new = 0; $history = 0;
37
+ $api_id = Mage::getStoreConfig('webwinkelkeur/general/api_id', $storeid);
38
+ $company = $feed->company;
39
+
40
+ foreach($feed->reviews->review as $review) {
41
+ $hash = $review->hash;
42
+ $name = $review->name;
43
+ $experience = $review->experience;
44
+ $date = $review->date;
45
+ $rating = $review->rating;
46
+ $delivery_time = $review->ratings->delivery_time;
47
+ $userfriendlyness = $review->ratings->userfriendlyness;
48
+ $price_quality = $review->ratings->price_quality;
49
+ $aftersales = $review->ratings->aftersales;
50
+ $indatabase = $this->loadbyHash($hash);
51
+
52
+ if($indatabase->getReviewId()) {
53
+ if($type == 'history') {
54
+ $reviews = Mage::getModel('webwinkelkeur/reviews');
55
+ $reviews->setReviewId($indatabase->getReviewId())
56
+ ->setShopId($api_id)
57
+ ->setCompany($company)
58
+ ->setHash($hash)
59
+ ->setName($name)
60
+ ->setExperience($experience)
61
+ ->setDate($date)
62
+ ->setRating($rating)
63
+ ->setDeliveryTime($delivery_time)
64
+ ->setUserfriendlyness($userfriendlyness)
65
+ ->setPriceQuality($price_quality)
66
+ ->setAftersales($aftersales)
67
+ ->save();
68
+ $updates++;
69
+ } else {
70
+ break;
71
+ }
72
+ } else {
73
+ $reviews = Mage::getModel('webwinkelkeur/reviews');
74
+ $reviews->setShopId($api_id)
75
+ ->setCompany($company)
76
+ ->setHash($hash)
77
+ ->setName($name)
78
+ ->setExperience($experience)
79
+ ->setDate($date)
80
+ ->setRating($rating)
81
+ ->setDeliveryTime($delivery_time)
82
+ ->setUserfriendlyness($userfriendlyness)
83
+ ->setPriceQuality($price_quality)
84
+ ->setAftersales($aftersales)
85
+ ->save();
86
+ $new++;
87
+ }
88
+ }
89
+
90
+ $config = new Mage_Core_Model_Config();
91
+ $config->saveConfig('webwinkelkeur/reviews/lastrun', now(), 'default', $storeid);
92
+ $result = array();
93
+ $result['review_updates'] = $updates;
94
+ $result['review_new'] = $new;
95
+ $result['company'] = $company;
96
+ return $result;
97
+ }
98
+
99
+ }
app/code/local/Magmodules/Webwinkelkeur/Model/Stats.php ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Webwinkelkeur
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
+ class Magmodules_Webwinkelkeur_Model_Stats extends Mage_Core_Model_Abstract {
23
+
24
+ public function _construct() {
25
+ parent::_construct();
26
+ $this->_init('webwinkelkeur/stats');
27
+ }
28
+
29
+ public function processFeed($feed, $storeid = 0) {
30
+ $api_id = Mage::getStoreConfig('webwinkelkeur/general/api_id', $storeid);
31
+
32
+ if($storeid == 0) {
33
+ $config = new Mage_Core_Model_Config();
34
+ $config->saveConfig('webwinkelkeur/general/url', $feed->link, 'default', $storeid);
35
+ $config->saveConfig('webwinkelkeur/general/company', $feed->company, 'default', $storeid);
36
+ } else {
37
+ $config = new Mage_Core_Model_Config();
38
+ $config->saveConfig('webwinkelkeur/general/url', $feed->link, 'stores', $storeid);
39
+ $config->saveConfig('webwinkelkeur/general/company', $feed->company, 'stores', $storeid);
40
+ }
41
+
42
+ if($feed->votes > 0) {
43
+ $company = $feed->company;
44
+ $average = floatval($feed->average);
45
+ $average_stars = floatval($feed->average_stars);
46
+ $average = ($average * 10);
47
+ $average_stars = ($average_stars * 10);
48
+ $votes = $feed->votes;
49
+ $percentage_positive = $feed->percentage_positive;
50
+ $number_positive = $feed->number_positive;
51
+ $percentage_neutral = $feed->percentage_neutral;
52
+ $number_neutral = $feed->number_neutral;
53
+ $percentage_negative = $feed->percentage_negative;
54
+ $number_negative = $feed->number_negative;
55
+
56
+ // Check for update or save
57
+ if($indatabase = $this->loadbyApiId($api_id)) {
58
+ $id = $indatabase->getId();
59
+ } else {
60
+ $id = '';
61
+ }
62
+
63
+ // Save Review Stats
64
+ $model = Mage::getModel('webwinkelkeur/stats');
65
+ $model->setId($id)
66
+ ->setShopId($api_id)
67
+ ->setCompany($company)
68
+ ->setAverage($average)
69
+ ->setAverageStars($average_stars)
70
+ ->setVotes($votes)
71
+ ->setPercentagePositive($percentage_positive)
72
+ ->setNumberPositive($number_positive)
73
+ ->setPercentageNeutral($percentage_neutral)
74
+ ->setNumberNeutral($number_neutral)
75
+ ->setPercentageNegative($percentage_negative)
76
+ ->setNumberNegative($number_negative)
77
+ ->save();
78
+ return true;
79
+ } else {
80
+ return false;
81
+ }
82
+ }
83
+
84
+ public function loadbyApiId($api_id) {
85
+ $this->_getResource()->load($this, $api_id, 'shop_id');
86
+ return $this;
87
+ }
88
+
89
+ }
app/code/local/Magmodules/Webwinkelkeur/Model/System/Config/Source/Cronfrequency.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Webwinkelkeur
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
+ class Magmodules_Webwinkelkeur_Model_System_Config_Source_Cronfrequency {
23
+
24
+ public function toOptionArray() {
25
+ return array(
26
+ '*/15 * * * *' => Mage::helper('webwinkelkeur')->__('Every 15 minutes'),
27
+ '0 * * * *' => Mage::helper('webwinkelkeur')->__('Every Hour'),
28
+ '0 */2 * * *' => Mage::helper('webwinkelkeur')->__('Every other Hour'),
29
+ '0 8,20 * * *' => Mage::helper('webwinkelkeur')->__('Twice a Day'),
30
+ '0 02 * * *' => Mage::helper('webwinkelkeur')->__('Once a Day'),
31
+ '0 02 0 * *' => Mage::helper('webwinkelkeur')->__('Once a Week'),
32
+ );
33
+ }
34
+
35
+ }
app/code/local/Magmodules/Webwinkelkeur/Model/System/Config/Source/Orderstatus.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Webwinkelkeur
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
+ class Magmodules_Webwinkelkeur_Model_System_Config_Source_Orderstatus {
23
+
24
+ public function toOptionArray() {
25
+ $storeModel = Mage::getSingleton('adminhtml/system_store');
26
+ $statuses = Mage::getSingleton('sales/order_config')->getStatuses();
27
+ $options = array();
28
+
29
+ $this->_options = array(array('value' => 0, 'label' => Mage::helper('webwinkelkeur') -> __('-- none')));
30
+
31
+ foreach($statuses as $k=>$v) {
32
+ $options[] = array('label' => $v, 'value' => $k);
33
+ }
34
+
35
+ $this->_options = array_merge($this->_options, $options);
36
+ return $this->_options;
37
+ }
38
+
39
+ }
app/code/local/Magmodules/Webwinkelkeur/Model/System/Config/Source/Position.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Webwinkelkeur
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
+ class Magmodules_Webwinkelkeur_Model_System_Config_Source_Position {
23
+
24
+ public function toOptionArray() {
25
+ $position = array();
26
+ $position[] = array('value'=>'left', 'label'=> Mage::helper('webwinkelkeur')->__('Left'));
27
+ $position[] = array('value'=>'right', 'label'=> Mage::helper('webwinkelkeur')->__('Right'));
28
+ return $position;
29
+ }
30
+
31
+ }
app/code/local/Magmodules/Webwinkelkeur/Model/System/Config/Source/Sidebarlink.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Webwinkelkeur
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
+ class Magmodules_Webwinkelkeur_Model_System_Config_Source_Sidebarlink {
23
+
24
+ public function toOptionArray() {
25
+ return array(
26
+ '' => Mage::helper('webwinkelkeur')->__('None'),
27
+ 'external' => Mage::helper('webwinkelkeur')->__('External (Webwinkelkeur.nl)'),
28
+ 'internal' => Mage::helper('webwinkelkeur')->__('Internal (/webwinkelkeur)'),
29
+ );
30
+ }
31
+
32
+ }
app/code/local/Magmodules/Webwinkelkeur/controllers/Adminhtml/WebwinkellogController.php ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Webwinkelkeur
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
+ class Magmodules_Webwinkelkeur_Adminhtml_WebwinkellogController extends Mage_Adminhtml_Controller_Action {
23
+
24
+ protected function _initAction() {
25
+ $this->loadLayout()->_setActiveMenu('webwinkelkeur/webwinkelreviews')->_addBreadcrumb(Mage::helper('adminhtml')->__('Items Manager'), Mage::helper('adminhtml')->__('Item Manager'));
26
+ return $this;
27
+ }
28
+
29
+ public function indexAction() {
30
+ $this->_initAction()->renderLayout();
31
+ }
32
+
33
+ public function massDeleteAction() {
34
+ $LogIds = $this->getRequest()->getParam('logids');
35
+ if(!is_array($LogIds)) {
36
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('webwinkelkeur')->__('Please select item(s)'));
37
+ } else {
38
+ try {
39
+ foreach ($LogIds as $id) {
40
+ $log = Mage::getModel('webwinkelkeur/log')->load($id)->delete();
41
+ }
42
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('webwinkelkeur')->__('Total of %d log record(s) deleted.', count($LogIds)));
43
+ } catch (Exception $e) {
44
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
45
+ }
46
+ }
47
+ $this->_redirect('*/*/index');
48
+ }
49
+
50
+ public function cleanAction() {
51
+ $enabled = Mage::getStoreConfig('webwinkelkeur/log/clean');
52
+ $days = Mage::getStoreConfig('webwinkelkeur/log/clean_days');
53
+ $i = 0;
54
+ if(($enabled) && ($days > 0)) {
55
+ $logmodel = Mage::getModel('webwinkelkeur/log');
56
+ $deldate = date('Y-m-d', strtotime('-' . $days . ' days'));
57
+ $logs = $logmodel->getCollection()->addFieldToSelect('id')->addFieldToFilter('date', array('lteq' => $deldate));
58
+ foreach ($logs as $log) {
59
+ $logmodel->load($log->getId())->delete();
60
+ $i++;
61
+ }
62
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('webwinkelkeur')->__('Total of %s log record(s) deleted.', $i));
63
+ }
64
+ $this->_redirect('*/*/index');
65
+ }
66
+
67
+ }
app/code/local/Magmodules/Webwinkelkeur/controllers/Adminhtml/WebwinkelreviewsController.php ADDED
@@ -0,0 +1,147 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Webwinkelkeur
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
+ class Magmodules_Webwinkelkeur_Adminhtml_WebwinkelreviewsController extends Mage_Adminhtml_Controller_Action {
23
+
24
+ protected function _initAction() {
25
+ $this->loadLayout()->_setActiveMenu('webwinkelkeur/webwinkelreviews')->_addBreadcrumb(Mage::helper('adminhtml')->__('Items Manager'), Mage::helper('adminhtml')->__('Item Manager'));
26
+ return $this;
27
+ }
28
+
29
+ public function indexAction() {
30
+ $this->_initAction()->renderLayout();
31
+ }
32
+
33
+ public function processAction() {
34
+ $storeids = Mage::getModel('webwinkelkeur/api')->getStoreIds();
35
+ $start_time = microtime(true);
36
+ foreach($storeids as $storeid) {
37
+ $msg = '';
38
+ $api_id = Mage::getStoreConfig('webwinkelkeur/general/api_id', $storeid);
39
+ $result = Mage::getModel('webwinkelkeur/api')->processFeed($storeid, 'history');
40
+ $log = Mage::getModel('webwinkelkeur/log')->addToLog('reviews', $storeid, $result, '', (microtime(true) - $start_time), '', '');
41
+
42
+ if(($result['review_new'] > 0) || ($result['review_updates'] > 0) || ($result['stats'] == true)) {
43
+ $msg = Mage::helper('webwinkelkeur')->__('Webwinkel ID %s:', $api_id) . ' ';
44
+ $msg .= Mage::helper('webwinkelkeur')->__('%s new review(s)', $result['review_new']) . ', ';
45
+ $msg .= Mage::helper('webwinkelkeur')->__('%s review(s) updated', $result['review_updates']) . ' & ';
46
+ $msg .= Mage::helper('webwinkelkeur')->__('and total score updated.');
47
+ }
48
+
49
+ if($msg) {
50
+ Mage::getSingleton('adminhtml/session')->addSuccess($msg);
51
+ } else {
52
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('webwinkelkeur')->__('Webwinkel ID %s: no updates found, feed is empty or not foud!', $api_id));
53
+ }
54
+ }
55
+ $this->_redirect('adminhtml/system_config/edit/section/webwinkelkeur');
56
+ }
57
+
58
+ public function testapiAction() {
59
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('webwinkelkeur')->__('TODO: repsonse code van de API', $xml));
60
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('webwinkelkeur')->__('TODO: repsonse code van de API', $xml));
61
+ $this->_redirect('adminhtml/system_config/edit/section/webwinkelkeur');
62
+ }
63
+
64
+ public function massDisableAction() {
65
+ $reviewIds = $this->getRequest()->getParam('reviewids');
66
+ if(!is_array($reviewIds)) {
67
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('webwinkelkeur')->__('Please select item(s)'));
68
+ } else {
69
+ try {
70
+ foreach ($reviewIds as $review_id) {
71
+ $reviews = Mage::getModel('webwinkelkeur/reviews')->load($review_id);
72
+ $reviews->setStatus(0)->save();
73
+ }
74
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('webwinkelkeur')->__('Total of %d review(s) were disabled.', count($reviewIds)));
75
+ } catch (Exception $e) {
76
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
77
+ }
78
+ }
79
+ $this->_redirect('*/*/index');
80
+ }
81
+
82
+ public function massEnableAction() {
83
+ $reviewIds = $this->getRequest()->getParam('reviewids');
84
+ if(!is_array($reviewIds)) {
85
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('webwinkelkeur')->__('Please select item(s)'));
86
+ } else {
87
+ try {
88
+ foreach ($reviewIds as $review_id) {
89
+ $reviews = Mage::getModel('webwinkelkeur/reviews')->load($review_id);
90
+ $reviews->setStatus(1)->save();
91
+ }
92
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('webwinkelkeur')->__('Total of %d review(s) were enabled.', count($reviewIds)));
93
+ } catch (Exception $e) {
94
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
95
+ }
96
+ }
97
+ $this->_redirect('*/*/index');
98
+ }
99
+
100
+ public function massEnableSidebarAction() {
101
+ $reviewIds = $this->getRequest()->getParam('reviewids');
102
+ if(!is_array($reviewIds)) {
103
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('webwinkelkeur')->__('Please select item(s)'));
104
+ } else {
105
+ try {
106
+ foreach ($reviewIds as $review_id) {
107
+ $reviews = Mage::getModel('webwinkelkeur/reviews')->load($review_id);
108
+ $reviews->setSidebar(1)->save();
109
+ }
110
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('webwinkelkeur')->__('Total of %d review(s) were added to the sidebar.', count($reviewIds)));
111
+ } catch (Exception $e) {
112
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
113
+ }
114
+ }
115
+ $this->_redirect('*/*/index');
116
+ }
117
+
118
+ public function massDisableSidebarAction() {
119
+ $reviewIds = $this->getRequest()->getParam('reviewids');
120
+ if(!is_array($reviewIds)) {
121
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('webwinkelkeur')->__('Please select item(s)'));
122
+ } else {
123
+ try {
124
+ foreach ($reviewIds as $review_id) {
125
+ $reviews = Mage::getModel('webwinkelkeur/reviews')->load($review_id);
126
+ $reviews->setSidebar(0)->save();
127
+ }
128
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('webwinkelkeur')->__('Total of %d review(s) were removed from the sidebar.', count($reviewIds)));
129
+ } catch (Exception $e) {
130
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
131
+ }
132
+ }
133
+ $this->_redirect('*/*/index');
134
+ }
135
+
136
+ public function truncateAction() {
137
+ $i = 0;
138
+ $collection = Mage::getModel('webwinkelkeur/reviews')->getCollection();
139
+ foreach ($collection as $item) {
140
+ $item->delete();
141
+ $i++;
142
+ }
143
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('webwinkelkeur')->__('Succefully deleted all %s saved review(s).', $i));
144
+ $this->_redirect('*/*/index');
145
+ }
146
+
147
+ }
app/code/local/Magmodules/Webwinkelkeur/controllers/IndexController.php ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Webwinkelkeur
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
+ class Magmodules_Webwinkelkeur_IndexController extends Mage_Core_Controller_Front_Action {
23
+
24
+ public function indexAction() {
25
+
26
+ $enabled = Mage::getStoreConfig('webwinkelkeur/general/enabled');
27
+ $overview = Mage::getStoreConfig('webwinkelkeur/overview/enabled');
28
+
29
+ if($enabled && $overview) {
30
+ $this->loadLayout();
31
+ $head = $this->getLayout()->getBlock('head');
32
+
33
+ if($title = Mage::getStoreConfig('webwinkelkeur/overview/meta_title')):
34
+ $head->setTitle($title);
35
+ endif;
36
+
37
+ if($description = Mage::getStoreConfig('webwinkelkeur/overview/meta_description')):
38
+ $head->setDescription($description);
39
+ endif;
40
+
41
+ if($keywords = Mage::getStoreConfig('webwinkelkeur/overview/meta_keywords')):
42
+ $head->setKeywords($keywords);
43
+ endif;
44
+
45
+ $this->renderLayout();
46
+ } else {
47
+ $this->_redirect('/');
48
+ }
49
+ }
50
+
51
+ }
app/code/local/Magmodules/Webwinkelkeur/etc/adminhtml.xml ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Webwinkelkeur
19
+ * @author Magmodules <info@magmodules.eu)
20
+ * @copyright Copyright (c) 2014 (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
+ <webwinkelkeur module="webwinkelkeur">
27
+ <title>WebwinkelKeur</title>
28
+ <sort_order>60</sort_order>
29
+ <children>
30
+ <webwinkelkeur_reviews module="webwinkelkeur">
31
+ <title>WebwinkelKeur Reviews</title>
32
+ <sort_order>100</sort_order>
33
+ <action>adminhtml/webwinkelreviews/</action>
34
+ </webwinkelkeur_reviews>
35
+ <webwinkelkeur_log module="webwinkelkeur">
36
+ <title>WebwinkelKeur Log</title>
37
+ <sort_order>110</sort_order>
38
+ <action>adminhtml/webwinkellog/</action>
39
+ </webwinkelkeur_log>
40
+ <webwinkelkeur_config module="webwinkelkeur">
41
+ <title>WebwinkelKeur Config</title>
42
+ <sort_order>120</sort_order>
43
+ <action>adminhtml/system_config/edit/section/webwinkelkeur</action>
44
+ </webwinkelkeur_config>
45
+ </children>
46
+ </webwinkelkeur>
47
+ </menu>
48
+ <acl>
49
+ <resources>
50
+ <all>
51
+ <title>Allow Everything</title>
52
+ </all>
53
+ <admin>
54
+ <children>
55
+ <system>
56
+ <children>
57
+ <config>
58
+ <children>
59
+ <webwinkelkeur translate="title" module="webwinkelkeur">
60
+ <title>WebwinkelKeur Permission Setting</title>
61
+ </webwinkelkeur>
62
+ </children>
63
+ </config>
64
+ </children>
65
+ </system>
66
+ <webwinkelkeur module="webwinkelkeur">
67
+ <title>WebwinkelKeur</title>
68
+ <sort_order>60</sort_order>
69
+ <children>
70
+ <webwinkelkeur_reviews module="webwinkelkeur">
71
+ <title>WebwinkelKeur Reviews</title>
72
+ <sort_order>100</sort_order>
73
+ <action>adminhtml/webwinkelreviews/</action>
74
+ </webwinkelkeur_reviews>
75
+ <webwinkelkeur_log module="webwinkelkeur">
76
+ <title>WebwinkelKeur Log</title>
77
+ <sort_order>110</sort_order>
78
+ <action>adminhtml/webwinkellog/</action>
79
+ </webwinkelkeur_log>
80
+ </children>
81
+ </webwinkelkeur>
82
+ </children>
83
+ </admin>
84
+ </resources>
85
+ </acl>
86
+ </config>
app/code/local/Magmodules/Webwinkelkeur/etc/config.xml ADDED
@@ -0,0 +1,229 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ <?php
4
+ /**
5
+ * Magmodules.eu - 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_Webwinkelkeur
19
+ * @author Magmodules <info@magmodules.eu)
20
+ * @copyright Copyright (c) 2014 (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
+ <modules>
26
+ <Magmodules_Webwinkelkeur>
27
+ <version>0.9.0</version>
28
+ </Magmodules_Webwinkelkeur>
29
+ </modules>
30
+ <global>
31
+ <models>
32
+ <webwinkelkeur>
33
+ <class>Magmodules_Webwinkelkeur_Model</class>
34
+ <resourceModel>webwinkelkeur_mysql4</resourceModel>
35
+ </webwinkelkeur>
36
+ <webwinkelkeur_mysql4>
37
+ <class>Magmodules_Webwinkelkeur_Model_Mysql4</class>
38
+ <entities>
39
+ <reviews>
40
+ <table>webwinkelkeur_reviews</table>
41
+ </reviews>
42
+ <stats>
43
+ <table>webwinkelkeur_stats</table>
44
+ </stats>
45
+ <log>
46
+ <table>webwinkelkeur_log</table>
47
+ </log>
48
+ </entities>
49
+ </webwinkelkeur_mysql4>
50
+ </models>
51
+ <resources>
52
+ <webwinkelkeur_setup>
53
+ <setup>
54
+ <module>Magmodules_Webwinkelkeur</module>
55
+ </setup>
56
+ <connection>
57
+ <use>core_setup</use>
58
+ </connection>
59
+ </webwinkelkeur_setup>
60
+ <webwinkelkeur_write>
61
+ <connection>
62
+ <use>core_write</use>
63
+ </connection>
64
+ </webwinkelkeur_write>
65
+ <webwinkelkeur_read>
66
+ <connection>
67
+ <use>core_read</use>
68
+ </connection>
69
+ </webwinkelkeur_read>
70
+ </resources>
71
+ <helpers>
72
+ <webwinkelkeur>
73
+ <class>Magmodules_Webwinkelkeur_Helper</class>
74
+ </webwinkelkeur>
75
+ </helpers>
76
+ <blocks>
77
+ <webwinkelkeur>
78
+ <class>Magmodules_Webwinkelkeur_Block</class>
79
+ </webwinkelkeur>
80
+ </blocks>
81
+ <events>
82
+ <sales_order_shipment_save_after>
83
+ <observers>
84
+ <connector>
85
+ <type>singleton</type>
86
+ <class>webwinkelkeur/observer</class>
87
+ <method>processInvitationcallAfterShipment</method>
88
+ </connector>
89
+ </observers>
90
+ </sales_order_shipment_save_after>
91
+ <sales_order_save_commit_after>
92
+ <observers>
93
+ <connector>
94
+ <type>singleton</type>
95
+ <class>webwinkelkeur/observer</class>
96
+ <method>processInvitationcall</method>
97
+ </connector>
98
+ </observers>
99
+ </sales_order_save_commit_after>
100
+ </events>
101
+ </global>
102
+ <frontend>
103
+ <routers>
104
+ <webwinkelkeur>
105
+ <use>standard</use>
106
+ <args>
107
+ <module>Magmodules_Webwinkelkeur</module>
108
+ <frontName>webwinkelkeur</frontName>
109
+ </args>
110
+ </webwinkelkeur>
111
+ </routers>
112
+ <layout>
113
+ <updates>
114
+ <webwinkelkeur>
115
+ <file>magmodules_webwinkelkeur.xml</file>
116
+ </webwinkelkeur>
117
+ </updates>
118
+ </layout>
119
+ <translate>
120
+ <modules>
121
+ <magmodules_webwinkelkeur>
122
+ <files>
123
+ <default>Magmodules_Webwinkelkeur.csv</default>
124
+ </files>
125
+ </magmodules_webwinkelkeur>
126
+ </modules>
127
+ </translate>
128
+ </frontend>
129
+ <adminhtml>
130
+ <layout>
131
+ <updates>
132
+ <magmodules_webwinkelkeur>
133
+ <file>magmodules_webwinkelkeur.xml</file>
134
+ </magmodules_webwinkelkeur>
135
+ </updates>
136
+ </layout>
137
+ <translate>
138
+ <modules>
139
+ <magmodules_webwinkelkeur>
140
+ <files>
141
+ <default>Magmodules_Webwinkelkeur.csv</default>
142
+ </files>
143
+ </magmodules_webwinkelkeur>
144
+ </modules>
145
+ </translate>
146
+ </adminhtml>
147
+ <admin>
148
+ <routers>
149
+ <adminhtml>
150
+ <args>
151
+ <modules>
152
+ <magmodules_webwinkelkeur after="Mage_Adminhtml">Magmodules_Webwinkelkeur_Adminhtml</magmodules_webwinkelkeur>
153
+ </modules>
154
+ </args>
155
+ </adminhtml>
156
+ </routers>
157
+ </admin>
158
+ <crontab>
159
+ <jobs>
160
+ <magmodules_webwinkelkeur_stats>
161
+ <schedule><config_path>webwinkelkeur/reviews/cron_stats</config_path></schedule>
162
+ <run><model>webwinkelkeur/observer::processStats</model></run>
163
+ </magmodules_webwinkelkeur_stats>
164
+ <magmodules_webwinkelkeur_reviews>
165
+ <schedule><config_path>webwinkelkeur/reviews/cron_reviews</config_path></schedule>
166
+ <run><model>webwinkelkeur/observer::processReviews</model></run>
167
+ </magmodules_webwinkelkeur_reviews>
168
+ <magmodules_webwinkelkeur_reviewhistory>
169
+ <schedule><config_path>webwinkelkeur/reviews/cron_all</config_path></schedule>
170
+ <run><model>webwinkelkeur/observer::processHistory</model></run>
171
+ </magmodules_webwinkelkeur_reviewhistory>
172
+ <magmodules_webwinkelkeur_cleanlog>
173
+ <schedule><cron_expr>0 02 * * *</cron_expr></schedule>
174
+ <run><model>webwinkelkeur/observer::cleanLog</model></run>
175
+ </magmodules_webwinkelkeur_cleanlog>
176
+ </jobs>
177
+ </crontab>
178
+ <default>
179
+ <webwinkelkeur>
180
+ <general>
181
+ <enabled>0</enabled>
182
+ </general>
183
+ <reviews>
184
+ <cron>0</cron>
185
+ <cron_stats>*/15 * * * *</cron_stats>
186
+ <cron_reviews>0 */2 * * *</cron_reviews>
187
+ <cron_all>0 02 0 * *</cron_all>
188
+ </reviews>
189
+ <sidebar>
190
+ <left>0</left>
191
+ <left_qty>3</left_qty>
192
+ <left_lenght>150</left_lenght>
193
+ <left_link>external</left_link>
194
+ <right>0</right>
195
+ <right_qty>3</right_qty>
196
+ <right_lenght>150</right_lenght>
197
+ <right_link>external</right_link>
198
+ </sidebar>
199
+ <snippets>
200
+ <sidebar>1</sidebar>
201
+ </snippets>
202
+ <overview>
203
+ <enabled>1</enabled>
204
+ <enable_paging>1</enable_paging>
205
+ <paging_settings>10,20,30</paging_settings>
206
+ <meta_title>WebwinkelKeur Reviews</meta_title>
207
+ <meta_description>WebwinkelKeur Reviews overview page</meta_description>
208
+ <meta_keywords>reviews, webwinkelkeur</meta_keywords>
209
+ </overview>
210
+ <invitation>
211
+ <enabled>0</enabled>
212
+ <status>complete</status>
213
+ <delay>5</delay>
214
+ <backlog>20</backlog>
215
+ </invitation>
216
+ <frontend>
217
+ <enabled>0</enabled>
218
+ <tooltip>0</tooltip>
219
+ <sidebar_position>left</sidebar_position>
220
+ <sidebar_height>120</sidebar_height>
221
+ </frontend>
222
+ <log>
223
+ <enabled>1</enabled>
224
+ <clean>1</clean>
225
+ <clean_days>14</clean_days>
226
+ </log>
227
+ </webwinkelkeur>
228
+ </default>
229
+ </config>
app/code/local/Magmodules/Webwinkelkeur/etc/system.xml ADDED
@@ -0,0 +1,582 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Webwinkelkeur
19
+ * @author Magmodules <info@magmodules.eu)
20
+ * @copyright Copyright (c) 2014 (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
+ <tabs>
26
+ <magmodules translate="label" module="webwinkelkeur">
27
+ <label>Magmodules</label>
28
+ <sort_order>200</sort_order>
29
+ </magmodules>
30
+ </tabs>
31
+ <sections>
32
+ <webwinkelkeur translate="label" module="webwinkelkeur">
33
+ <label>WebwinkelKeur</label>
34
+ <tab>magmodules</tab>
35
+ <frontend_type>text</frontend_type>
36
+ <sort_order>40</sort_order>
37
+ <show_in_default>1</show_in_default>
38
+ <show_in_website>1</show_in_website>
39
+ <show_in_store>1</show_in_store>
40
+ <groups>
41
+ <info>
42
+ <frontend_model>webwinkelkeur/adminhtml_widget_info_info</frontend_model>
43
+ <sort_order>1</sort_order>
44
+ <show_in_default>1</show_in_default>
45
+ <show_in_website>1</show_in_website>
46
+ <show_in_store>1</show_in_store>
47
+ </info>
48
+ <general translate="label" module="webwinkelkeur">
49
+ <label>General Configuration</label>
50
+ <frontend_type>text</frontend_type>
51
+ <sort_order>2</sort_order>
52
+ <show_in_default>1</show_in_default>
53
+ <show_in_website>1</show_in_website>
54
+ <show_in_store>1</show_in_store>
55
+ <expanded>1</expanded>
56
+ <comment><![CDATA[You can find the necessary information in your WebwinkelKeur dashboard bottom of the page -Place WebwinkelKeur mark- <br/> As addition next to the activation of this extension we also recommend you to place the appropriate WebwinkelKeur logo and banner.<br/><br/>]]></comment>
57
+ <fields>
58
+ <enabled translate="label">
59
+ <label>Enabled</label>
60
+ <frontend_type>select</frontend_type>
61
+ <source_model>adminhtml/system_config_source_yesno</source_model>
62
+ <sort_order>1</sort_order>
63
+ <show_in_default>1</show_in_default>
64
+ <show_in_website>1</show_in_website>
65
+ <show_in_store>1</show_in_store>
66
+ <comment>
67
+ <![CDATA[
68
+ <script>
69
+ Event.observe(window, 'load', function() {
70
+ if ($('webwinkelkeur_reviews_lastrun')) {
71
+ $('webwinkelkeur_reviews_lastrun').style.backgroundColor='#f0f0f0';
72
+ $('webwinkelkeur_reviews_lastrun').disable();
73
+ }
74
+ if ($('webwinkelkeur_general_url')) {
75
+ $('webwinkelkeur_general_url').style.backgroundColor='#f0f0f0';
76
+ $('webwinkelkeur_general_url').disable();
77
+ }
78
+ });
79
+ </script>
80
+ ]]>
81
+ </comment>
82
+ </enabled>
83
+ <heading_api translate="label">
84
+ <label>API CREDENTIALS</label>
85
+ <frontend_model>webwinkelkeur/adminhtml_widget_form_heading</frontend_model>
86
+ <sort_order>2</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
+ </heading_api>
91
+ <api_id translate="label">
92
+ <label>Webshop ID</label>
93
+ <frontend_type>text</frontend_type>
94
+ <sort_order>3</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 WebwinkelKeur account</tooltip>
99
+ </api_id>
100
+ <api_key translate="label">
101
+ <label>API Key</label>
102
+ <frontend_type>text</frontend_type>
103
+ <sort_order>4</sort_order>
104
+ <show_in_default>1</show_in_default>
105
+ <show_in_website>0</show_in_website>
106
+ <show_in_store>1</show_in_store>
107
+ <tooltip>You can find this information in your WebwinkelKeur account</tooltip>
108
+ </api_key>
109
+ <url translate="label">
110
+ <label>URL</label>
111
+ <frontend_type>text</frontend_type>
112
+ <sort_order>100</sort_order>
113
+ <show_in_default>1</show_in_default>
114
+ <show_in_website>0</show_in_website>
115
+ <show_in_store>1</show_in_store>
116
+ </url>
117
+ </fields>
118
+ </general>
119
+ <reviews translate="label" module="webwinkelkeur">
120
+ <label>WebwinkelKeur Import Reviews</label>
121
+ <frontend_type>text</frontend_type>
122
+ <sort_order>3</sort_order>
123
+ <show_in_default>1</show_in_default>
124
+ <show_in_website>1</show_in_website>
125
+ <show_in_store>1</show_in_store>
126
+ <expanded>1</expanded>
127
+ <comment><![CDATA[To display the latest reviews in your store, you must import the reviews. <br/> This can be done automatically or manually.<br/><br/>]]></comment>
128
+ <fields>
129
+ <cron translate="label">
130
+ <label>Import Automatically</label>
131
+ <frontend_type>select</frontend_type>
132
+ <source_model>adminhtml/system_config_source_yesno</source_model>
133
+ <sort_order>1</sort_order>
134
+ <show_in_default>1</show_in_default>
135
+ <show_in_website>1</show_in_website>
136
+ <show_in_store>1</show_in_store>
137
+ <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>
138
+ </cron>
139
+ <cron_stats translate="label">
140
+ <label>Update Summary</label>
141
+ <frontend_type>select</frontend_type>
142
+ <source_model>webwinkelkeur/system_config_source_cronfrequency</source_model>
143
+ <sort_order>2</sort_order>
144
+ <show_in_default>1</show_in_default>
145
+ <show_in_website>1</show_in_website>
146
+ <show_in_store>1</show_in_store>
147
+ <depends><cron>1</cron></depends>
148
+ <tooltip>Select the schedule for automatic updating</tooltip>
149
+ </cron_stats>
150
+ <cron_reviews translate="label">
151
+ <label>Update Reviews</label>
152
+ <frontend_type>select</frontend_type>
153
+ <source_model>webwinkelkeur/system_config_source_cronfrequency</source_model>
154
+ <sort_order>3</sort_order>
155
+ <show_in_default>1</show_in_default>
156
+ <show_in_website>1</show_in_website>
157
+ <show_in_store>1</show_in_store>
158
+ <depends><cron>1</cron></depends>
159
+ <tooltip>Select the schedule for automatic updating</tooltip>
160
+ </cron_reviews>
161
+ <cron_all translate="label">
162
+ <label>Update Review History</label>
163
+ <frontend_type>select</frontend_type>
164
+ <source_model>webwinkelkeur/system_config_source_cronfrequency</source_model>
165
+ <sort_order>4</sort_order>
166
+ <show_in_default>1</show_in_default>
167
+ <show_in_website>1</show_in_website>
168
+ <show_in_store>1</show_in_store>
169
+ <depends><cron>1</cron></depends>
170
+ <tooltip>Select the schedule for automatic updating</tooltip>
171
+ </cron_all>
172
+ <lastrun translate="label">
173
+ <label>Last Update</label>
174
+ <frontend_type>text</frontend_type>
175
+ <sort_order>100</sort_order>
176
+ <show_in_default>1</show_in_default>
177
+ <show_in_website>1</show_in_website>
178
+ <show_in_store>1</show_in_store>
179
+ </lastrun>
180
+ <process translate="label">
181
+ <label>Process Manually</label>
182
+ <frontend_type>button</frontend_type>
183
+ <frontend_model>webwinkelkeur/adminhtml_widget_buttons_process</frontend_model>
184
+ <sort_order>101</sort_order>
185
+ <show_in_default>1</show_in_default>
186
+ <show_in_website>1</show_in_website>
187
+ <show_in_store>1</show_in_store>
188
+ </process>
189
+ </fields>
190
+ </reviews>
191
+ <sidebar translate="label">
192
+ <label>Latest Reviews Visibility</label>
193
+ <frontend_type>text</frontend_type>
194
+ <sort_order>4</sort_order>
195
+ <show_in_default>1</show_in_default>
196
+ <show_in_website>1</show_in_website>
197
+ <show_in_store>1</show_in_store>
198
+ <expanded>1</expanded>
199
+ <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>
200
+ <fields>
201
+ <left_heading translate="label">
202
+ <label>Left Sidebar</label>
203
+ <frontend_model>webwinkelkeur/adminhtml_widget_form_heading</frontend_model>
204
+ <sort_order>50</sort_order>
205
+ <show_in_default>1</show_in_default>
206
+ <show_in_website>1</show_in_website>
207
+ <show_in_store>1</show_in_store>
208
+ </left_heading>
209
+ <left translate="label">
210
+ <label>Enabled</label>
211
+ <frontend_type>select</frontend_type>
212
+ <source_model>adminhtml/system_config_source_yesno</source_model>
213
+ <sort_order>51</sort_order>
214
+ <show_in_default>1</show_in_default>
215
+ <show_in_website>1</show_in_website>
216
+ <show_in_store>1</show_in_store>
217
+ </left>
218
+ <left_qty translate="label">
219
+ <label>Number of Reviews</label>
220
+ <validate>validate-number</validate>
221
+ <frontend_type>text</frontend_type>
222
+ <sort_order>53</sort_order>
223
+ <show_in_default>1</show_in_default>
224
+ <show_in_website>1</show_in_website>
225
+ <show_in_store>1</show_in_store>
226
+ <depends><left>1</left></depends>
227
+ </left_qty>
228
+ <left_lenght translate="label">
229
+ <label>Character length of Reviews</label>
230
+ <validate>validate-number</validate>
231
+ <frontend_type>text</frontend_type>
232
+ <sort_order>54</sort_order>
233
+ <show_in_default>1</show_in_default>
234
+ <show_in_website>1</show_in_website>
235
+ <show_in_store>1</show_in_store>
236
+ <depends><left>1</left></depends>
237
+ </left_lenght>
238
+ <left_link translate="label">
239
+ <label>Link to</label>
240
+ <frontend_type>select</frontend_type>
241
+ <source_model>webwinkelkeur/system_config_source_sidebarlink</source_model>
242
+ <sort_order>55</sort_order>
243
+ <show_in_default>1</show_in_default>
244
+ <show_in_website>1</show_in_website>
245
+ <show_in_store>1</show_in_store>
246
+ <depends><left>1</left></depends>
247
+ </left_link>
248
+ <left_snippets translate="label">
249
+ <label>Add Rich Snippets</label>
250
+ <frontend_type>select</frontend_type>
251
+ <source_model>adminhtml/system_config_source_yesno</source_model>
252
+ <sort_order>56</sort_order>
253
+ <show_in_default>1</show_in_default>
254
+ <show_in_website>1</show_in_website>
255
+ <show_in_store>1</show_in_store>
256
+ <depends><left>1</left></depends>
257
+ <comment>You can only activate the Rich Snippets when this block is shown on your Homepage only</comment>
258
+ </left_snippets>
259
+ <right_heading translate="label">
260
+ <label>Right Sidebar</label>
261
+ <frontend_model>webwinkelkeur/adminhtml_widget_form_heading</frontend_model>
262
+ <sort_order>60</sort_order>
263
+ <show_in_default>1</show_in_default>
264
+ <show_in_website>1</show_in_website>
265
+ <show_in_store>1</show_in_store>
266
+ </right_heading>
267
+ <right translate="label">
268
+ <label>Enabled</label>
269
+ <frontend_type>select</frontend_type>
270
+ <source_model>adminhtml/system_config_source_yesno</source_model>
271
+ <sort_order>61</sort_order>
272
+ <show_in_default>1</show_in_default>
273
+ <show_in_website>1</show_in_website>
274
+ <show_in_store>1</show_in_store>
275
+ </right>
276
+ <right_qty translate="label">
277
+ <label>Number of Reviews</label>
278
+ <validate>validate-number</validate>
279
+ <frontend_type>text</frontend_type>
280
+ <sort_order>63</sort_order>
281
+ <show_in_default>1</show_in_default>
282
+ <show_in_website>1</show_in_website>
283
+ <show_in_store>1</show_in_store>
284
+ <depends><right>1</right></depends>
285
+ </right_qty>
286
+ <right_lenght translate="label">
287
+ <label>Character length of Reviews</label>
288
+ <validate>validate-number</validate>
289
+ <frontend_type>text</frontend_type>
290
+ <sort_order>64</sort_order>
291
+ <show_in_default>1</show_in_default>
292
+ <show_in_website>1</show_in_website>
293
+ <show_in_store>1</show_in_store>
294
+ <depends><right>1</right></depends>
295
+ </right_lenght>
296
+ <right_link translate="label">
297
+ <label>Link to</label>
298
+ <frontend_type>select</frontend_type>
299
+ <source_model>webwinkelkeur/system_config_source_sidebarlink</source_model>
300
+ <sort_order>65</sort_order>
301
+ <show_in_default>1</show_in_default>
302
+ <show_in_website>1</show_in_website>
303
+ <show_in_store>1</show_in_store>
304
+ <depends><right>1</right></depends>
305
+ </right_link>
306
+ <right_snippets translate="label">
307
+ <label>Add to Sidebar Homepage</label>
308
+ <frontend_type>select</frontend_type>
309
+ <source_model>adminhtml/system_config_source_yesno</source_model>
310
+ <sort_order>66</sort_order>
311
+ <show_in_default>1</show_in_default>
312
+ <show_in_website>1</show_in_website>
313
+ <show_in_store>1</show_in_store>
314
+ <depends><right>1</right></depends>
315
+ <comment>You can only activate the Rich Snippets when this block is shown on your Homepage only</comment>
316
+ </right_snippets>
317
+ </fields>
318
+ </sidebar>
319
+ <overview translate="label">
320
+ <label>WebwinkelKeur Overview Page</label>
321
+ <frontend_type>text</frontend_type>
322
+ <sort_order>6</sort_order>
323
+ <show_in_default>1</show_in_default>
324
+ <show_in_website>1</show_in_website>
325
+ <show_in_store>1</show_in_store>
326
+ <expanded>1</expanded>
327
+ <comment><![CDATA[We can import your customer reviews and display them in your store as new content. <br/><br/> Link: http://www.mywebshop.com/<strong>webwinkelkeur</strong><br/><br/>]]></comment>
328
+ <fields>
329
+ <enabled translate="label">
330
+ <label>Enabled</label>
331
+ <frontend_type>select</frontend_type>
332
+ <source_model>adminhtml/system_config_source_yesno</source_model>
333
+ <sort_order>1</sort_order>
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
+ </enabled>
338
+ <enable_paging>
339
+ <label>Pagination</label>
340
+ <frontend_type>select</frontend_type>
341
+ <source_model>adminhtml/system_config_source_enabledisable</source_model>
342
+ <sort_order>2</sort_order>
343
+ <show_in_default>1</show_in_default>
344
+ <show_in_website>1</show_in_website>
345
+ <show_in_store>1</show_in_store>
346
+ <comment>Pagination is the process of dividing (content) into discrete pages</comment>
347
+ </enable_paging>
348
+ <paging_settings>
349
+ <label>Reviews per page</label>
350
+ <frontend_type>text</frontend_type>
351
+ <sort_order>3</sort_order>
352
+ <show_in_default>1</show_in_default>
353
+ <show_in_website>1</show_in_website>
354
+ <show_in_store>1</show_in_store>
355
+ <tooltip>Comma Separated, as: 10,20,30</tooltip>
356
+ <depends><enable_paging>1</enable_paging></depends>
357
+ </paging_settings>
358
+ <!--<add_toplink translate="label">
359
+ <label>Add a link to toplink</label>
360
+ <frontend_type>select</frontend_type>
361
+ <source_model>adminhtml/system_config_source_enabledisable</source_model>
362
+ <sort_order>4</sort_order>
363
+ <show_in_default>1</show_in_default>
364
+ <show_in_website>1</show_in_website>
365
+ <show_in_store>1</show_in_store>
366
+ </add_toplink>-->
367
+ <heading_meta translate="label">
368
+ <label>Meta Data</label>
369
+ <frontend_model>webwinkelkeur/adminhtml_widget_form_heading</frontend_model>
370
+ <sort_order>10</sort_order>
371
+ <show_in_default>1</show_in_default>
372
+ <show_in_website>1</show_in_website>
373
+ <show_in_store>1</show_in_store>
374
+ </heading_meta>
375
+ <meta_title translate="lable">
376
+ <label>Meta Title</label>
377
+ <frontend_type>text</frontend_type>
378
+ <sort_order>11</sort_order>
379
+ <show_in_default>1</show_in_default>
380
+ <show_in_website>1</show_in_website>
381
+ <show_in_store>1</show_in_store>
382
+ <depends><enabled>1</enabled></depends>
383
+ </meta_title>
384
+ <meta_description translate="lable">
385
+ <label>Meta Description</label>
386
+ <frontend_type>textarea</frontend_type>
387
+ <sort_order>12</sort_order>
388
+ <show_in_default>1</show_in_default>
389
+ <show_in_website>1</show_in_website>
390
+ <show_in_store>1</show_in_store>
391
+ <depends><enabled>1</enabled></depends>
392
+ </meta_description>
393
+ <meta_keywords translate="label">
394
+ <label>Meta Keywords</label>
395
+ <frontend_type>textarea</frontend_type>
396
+ <sort_order>13</sort_order>
397
+ <show_in_default>1</show_in_default>
398
+ <show_in_website>1</show_in_website>
399
+ <show_in_store>1</show_in_store>
400
+ <depends><enabled>1</enabled></depends>
401
+ </meta_keywords>
402
+ </fields>
403
+ </overview>
404
+ <invitation translate="label">
405
+ <label>Invitation to write the customer experience</label>
406
+ <frontend_type>text</frontend_type>
407
+ <sort_order>7</sort_order>
408
+ <show_in_default>1</show_in_default>
409
+ <show_in_website>1</show_in_website>
410
+ <show_in_store>1</show_in_store>
411
+ <expanded>1</expanded>
412
+ <comment><![CDATA[WebwinkelKeur can invite your customers to write customer reviews. This feature is only available to PLUS members. <br><a href="https://www.WebwinkelKeur.nl/webwinkel/mogelijkheden/plus/">https://www.WebwinkelKeur.nl/webwinkel/mogelijkheden/plus/</a> <br/><br/>]]></comment>
413
+ <fields>
414
+ <enabled translate="label">
415
+ <label>Activate</label>
416
+ <frontend_type>select</frontend_type>
417
+ <source_model>adminhtml/system_config_source_yesno</source_model>
418
+ <sort_order>1</sort_order>
419
+ <show_in_default>1</show_in_default>
420
+ <show_in_website>1</show_in_website>
421
+ <show_in_store>1</show_in_store>
422
+ <comment>Send invitation?</comment>
423
+ <tooltip>Send customers automatically receive an invitation to share a customer experience. This feature is only available for WebwinkelKeur PLUS members.</tooltip>
424
+ </enabled>
425
+ <status>
426
+ <label>Order is Completed with status</label>
427
+ <frontend_type>select</frontend_type>
428
+ <source_model>webwinkelkeur/system_config_source_orderstatus</source_model>
429
+ <sort_order>2</sort_order>
430
+ <show_in_default>1</show_in_default>
431
+ <show_in_website>1</show_in_website>
432
+ <show_in_store>1</show_in_store>
433
+ <can_be_empty>1</can_be_empty>
434
+ <comment>Invitation e-mail is sent after such status is achieved</comment>
435
+ <tooltip>Specify at which status you want to send the invitation. Default is Completed</tooltip>
436
+ <depends><enabled>1</enabled></depends>
437
+ </status>
438
+ <delay translate="label">
439
+ <label>Delay</label>
440
+ <frontend_type>text</frontend_type>
441
+ <sort_order>3</sort_order>
442
+ <show_in_default>1</show_in_default>
443
+ <show_in_website>1</show_in_website>
444
+ <show_in_store>1</show_in_store>
445
+ <comment>Send the invitation x days after the order is completed</comment>
446
+ <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>
447
+ <depends><enabled>1</enabled></depends>
448
+ </delay>
449
+ <backlog translate="label">
450
+ <label>Maximum Delay</label>
451
+ <frontend_type>text</frontend_type>
452
+ <sort_order>4</sort_order>
453
+ <show_in_default>1</show_in_default>
454
+ <show_in_website>1</show_in_website>
455
+ <show_in_store>1</show_in_store>
456
+ <comment>Change only if necessary</comment>
457
+ <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 Webwinkelkeur.nl.</tooltip>
458
+ <depends><enabled>1</enabled></depends>
459
+ </backlog>
460
+ </fields>
461
+ </invitation>
462
+ <frontend translate="label">
463
+ <label>WebwinkelKeur Javascript Sidebar</label>
464
+ <frontend_type>text</frontend_type>
465
+ <sort_order>8</sort_order>
466
+ <show_in_default>1</show_in_default>
467
+ <show_in_website>1</show_in_website>
468
+ <show_in_store>1</show_in_store>
469
+ <expanded>1</expanded>
470
+ <comment><![CDATA[The WebwinkelKeur javascript integration ensures that your WebwinkelKeur to load page on your own web store. <br/> Now customers don't have to leave your store anymore to read the reviews. <br/> This effectively increases your conversion!<br><br>]]></comment>
471
+ <fields>
472
+ <enabled translate="label">
473
+ <label>Javascript Integration</label>
474
+ <frontend_type>select</frontend_type>
475
+ <source_model>adminhtml/system_config_source_yesno</source_model>
476
+ <sort_order>1</sort_order>
477
+ <show_in_default>1</show_in_default>
478
+ <show_in_website>1</show_in_website>
479
+ <show_in_store>1</show_in_store>
480
+ <comment>Insert the interactive WebwinkelKeur Sidebar</comment>
481
+ <tooltip>Showing the sidebar ensures a higher confidence. Visitors can read the reviews without leaving the store.</tooltip>
482
+ </enabled>
483
+ <sidebar translate="label">
484
+ <label>Show Sidebar</label>
485
+ <frontend_type>select</frontend_type>
486
+ <source_model>adminhtml/system_config_source_yesno</source_model>
487
+ <sort_order>2</sort_order>
488
+ <show_in_default>1</show_in_default>
489
+ <show_in_website>1</show_in_website>
490
+ <show_in_store>1</show_in_store>
491
+ <comment>Insert the interactive WebwinkelKeur Sidebar</comment>
492
+ <tooltip>Showing the sidebar ensures a higher confidence. Visitors also do not have to leave to check the reviews which increases your conversion.</tooltip>
493
+ </sidebar>
494
+ <tooltip translate="label">
495
+ <label>Tooltip</label>
496
+ <frontend_type>select</frontend_type>
497
+ <source_model>adminhtml/system_config_source_yesno</source_model>
498
+ <sort_order>3</sort_order>
499
+ <show_in_default>1</show_in_default>
500
+ <show_in_website>1</show_in_website>
501
+ <show_in_store>1</show_in_store>
502
+ <comment>Whether to display the mouseover tooltip</comment>
503
+ <depends><enabled>1</enabled></depends>
504
+ </tooltip>
505
+ <sidebar_position translate="label">
506
+ <label>Sidebar Position</label>
507
+ <frontend_type>select</frontend_type>
508
+ <source_model>webwinkelkeur/system_config_source_position</source_model>
509
+ <sort_order>4</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
+ <comment>The position of the sidebar</comment>
514
+ <depends><enabled>1</enabled></depends>
515
+ </sidebar_position>
516
+ <sidebar_height translate="label">
517
+ <label>Place of the sidebar</label>
518
+ <frontend_type>text</frontend_type>
519
+ <sort_order>5</sort_order>
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
+ <comment>Placement from top screen</comment>
524
+ <depends><enabled>1</enabled></depends>
525
+ </sidebar_height>
526
+ </fields>
527
+ </frontend>
528
+ <log translate="label">
529
+ <label>WebwinkelKeur Log Settings</label>
530
+ <frontend_type>text</frontend_type>
531
+ <sort_order>9</sort_order>
532
+ <show_in_default>1</show_in_default>
533
+ <show_in_website>0</show_in_website>
534
+ <show_in_store>0</show_in_store>
535
+ <expanded>1</expanded>
536
+ <comment><![CDATA[Logs can be activated in order to detect errors.<br/> This feature is particularly for developers.<br/><br/>]]></comment>
537
+ <fields>
538
+ <enabled translate="label">
539
+ <label>Enable Log Function</label>
540
+ <frontend_type>select</frontend_type>
541
+ <source_model>adminhtml/system_config_source_yesno</source_model>
542
+ <sort_order>1</sort_order>
543
+ <show_in_default>1</show_in_default>
544
+ <show_in_website>0</show_in_website>
545
+ <show_in_store>0</show_in_store>
546
+ </enabled>
547
+ <clean translate="label">
548
+ <label>Auto Cleaning</label>
549
+ <frontend_type>select</frontend_type>
550
+ <source_model>adminhtml/system_config_source_yesno</source_model>
551
+ <sort_order>2</sort_order>
552
+ <show_in_default>1</show_in_default>
553
+ <show_in_website>0</show_in_website>
554
+ <show_in_store>0</show_in_store>
555
+ <depends><enabled>1</enabled></depends>
556
+ </clean>
557
+ <clean_days translate="label">
558
+ <label>Clean After Days</label>
559
+ <validate>validate-number</validate>
560
+ <frontend_type>text</frontend_type>
561
+ <sort_order>3</sort_order>
562
+ <show_in_default>1</show_in_default>
563
+ <show_in_website>0</show_in_website>
564
+ <show_in_store>0</show_in_store>
565
+ <depends><enabled>1</enabled></depends>
566
+ </clean_days>
567
+ </fields>
568
+ </log>
569
+ <snippets translate="label">
570
+ <label>WebwinkelKeur Rich Snippets</label>
571
+ <frontend_type>text</frontend_type>
572
+ <sort_order>10</sort_order>
573
+ <show_in_default>1</show_in_default>
574
+ <show_in_website>1</show_in_website>
575
+ <show_in_store>1</show_in_store>
576
+ <expanded>1</expanded>
577
+ <comment><![CDATA[Rich Snippets is a schema.org markup that makes it possible to give richer and more specific information. <br/> The Rich Snippets will show your store rating in the google search engine results. <br/><br/>Use: {{block type="webwinkelkeur/snippets" name="webwinkelsnippets"}} to call the block on the homepage.<br/><br/>]]></comment>
578
+ </snippets>
579
+ </groups>
580
+ </webwinkelkeur>
581
+ </sections>
582
+ </config>
app/code/local/Magmodules/Webwinkelkeur/sql/webwinkelkeur_setup/mysql4-install-0.9.0.php ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Webwinkelkeur
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
+ $installer = $this;
23
+ $installer->startSetup();
24
+ $installer->run("
25
+ DROP TABLE IF EXISTS {$this->getTable('webwinkelkeur_reviews')};
26
+ CREATE TABLE IF NOT EXISTS {$this->getTable('webwinkelkeur_reviews')} (
27
+ `review_id` int(10) NOT NULL AUTO_INCREMENT,
28
+ `shop_id` int(5) NOT NULL,
29
+ `company` varchar(255) DEFAULT NULL,
30
+ `hash` varchar(255) NOT NULL,
31
+ `name` text NOT NULL,
32
+ `experience` text NOT NULL,
33
+ `date` date NOT NULL,
34
+ `rating` tinyint(1) DEFAULT NULL,
35
+ `delivery_time` tinyint(1) DEFAULT NULL,
36
+ `userfriendlyness` tinyint(1) DEFAULT NULL,
37
+ `price_quality` tinyint(1) DEFAULT NULL,
38
+ `aftersales` tinyint(1) DEFAULT NULL,
39
+ `sidebar` tinyint(1) NOT NULL DEFAULT '1',
40
+ `status` tinyint(5) NOT NULL DEFAULT '1',
41
+ PRIMARY KEY (`review_id`)
42
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
43
+
44
+ DROP TABLE IF EXISTS {$this->getTable('webwinkelkeur_log')};
45
+ CREATE TABLE IF NOT EXISTS {$this->getTable('webwinkelkeur_log')} (
46
+ `id` int(10) NOT NULL AUTO_INCREMENT,
47
+ `type` varchar(255) NOT NULL,
48
+ `shop_id` varchar(255) NOT NULL,
49
+ `company` varchar(255) DEFAULT NULL,
50
+ `review_update` int(5) DEFAULT '0',
51
+ `review_new` int(5) DEFAULT '0',
52
+ `response` text,
53
+ `order_id` int(10) DEFAULT NULL,
54
+ `cron` varchar(255) DEFAULT NULL,
55
+ `date` datetime NOT NULL,
56
+ `time` varchar(255) NOT NULL,
57
+ `api_url` text,
58
+ PRIMARY KEY (`id`)
59
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
60
+
61
+ DROP TABLE IF EXISTS {$this->getTable('webwinkelkeur_stats')};
62
+ CREATE TABLE IF NOT EXISTS {$this->getTable('webwinkelkeur_stats')} (
63
+ `id` int(5) NOT NULL AUTO_INCREMENT,
64
+ `company` varchar(255) DEFAULT NULL,
65
+ `shop_id` int(5) NOT NULL,
66
+ `average` smallint(6) DEFAULT '0',
67
+ `average_stars` smallint(6) DEFAULT '0',
68
+ `votes` int(5) DEFAULT '0',
69
+ `percentage_positive` smallint(6) DEFAULT '0',
70
+ `number_positive` int(5) DEFAULT '0',
71
+ `percentage_neutral` smallint(6) DEFAULT '0',
72
+ `number_neutral` int(5) DEFAULT '0',
73
+ `percentage_negative` smallint(6) DEFAULT '0',
74
+ `number_negative` int(5) DEFAULT '0',
75
+ PRIMARY KEY (`id`)
76
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
77
+ ");
78
+ $installer->endSetup();
app/design/adminhtml/default/default/layout/magmodules_webwinkelkeur.xml ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <adminhtml_webwinkelreviews_index>
4
+ <reference name="head">
5
+ <action method="addCss"><name>magmodules/webwinkelkeur/grid.css</name></action>
6
+ </reference>
7
+ <reference name="content">
8
+ <block type="webwinkelkeur/adminhtml_webwinkelreviews" name="webwinkelkeur" />
9
+ </reference>
10
+ </adminhtml_webwinkelreviews_index>
11
+ <adminhtml_webwinkellog_index>
12
+ <reference name="content">
13
+ <block type="webwinkelkeur/adminhtml_webwinkellog" name="webwinkellog" />
14
+ </reference>
15
+ </adminhtml_webwinkellog_index>
16
+ </layout>
app/design/frontend/base/default/layout/magmodules_webwinkelkeur.xml ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <default>
4
+ <reference name="head">
5
+ <action method="addCss"><stylesheet>magmodules/webwinkelkeur/sidebar.css</stylesheet></action>
6
+ </reference>
7
+ <reference name="left">
8
+ <block type="webwinkelkeur/sidebar" name="left.webwinkelkeur" template="magmodules/webwinkelkeur/sidebar/left.phtml" />
9
+ </reference>
10
+ <reference name="right">
11
+ <block type="webwinkelkeur/sidebar" name="right.webwinkelkeur" template="magmodules/webwinkelkeur/sidebar/right.phtml" />
12
+ </reference>
13
+ <reference name="before_body_end">
14
+ <block type="core/template" name="webwinkelkeur_js_sidebar" as="webwinkelkeur_js_sidebar" template="magmodules/webwinkelkeur/sidebar/js-sidebar.phtml" />
15
+ </reference>
16
+ </default>
17
+ <webwinkelkeur_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/webwinkelkeur/style.css</stylesheet> </action>
23
+ </reference>
24
+ <reference name="content">
25
+ <block type="webwinkelkeur/reviews" name="webwinkelkeur.index" template="magmodules/webwinkelkeur/index.phtml" />
26
+ </reference>
27
+ <reference name="left">
28
+ <remove name="left.webwinkelkeur" />
29
+ </reference>
30
+ <reference name="right">
31
+ <remove name="right.webwinkelkeur" />
32
+ </reference>
33
+ </webwinkelkeur_index_index>
34
+ <cms_index_index>
35
+ <reference name="head">
36
+ <action method="addCss"><stylesheet>magmodules/webwinkelkeur/richsnippters.css</stylesheet></action>
37
+ </reference>
38
+ </cms_index_index>
39
+ </layout>
app/design/frontend/base/default/template/magmodules/webwinkelkeur/index.phtml ADDED
@@ -0,0 +1,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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:
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_Webwinkelkeur
18
+ * @author Magmodules <info@magmodules.eu)
19
+ * @copyright Copyright (c) 2014 (http://www.magmodules.eu)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ */
22
+ ?>
23
+ <?php
24
+ // Load Reviews & Stats
25
+ $reviews = $this->getReviews();
26
+ $stats = $this->getStats();
27
+ ?>
28
+ <div class="webwinkelkeur">
29
+
30
+ <div class="page-title">
31
+ <h1><?php echo $this->__('WebwinkelKeur'); ?></h1>
32
+ <?php if(Mage::getStoreConfig('webwinkelkeur/general/url')): ?>
33
+ <?php if(Mage::getStoreConfig('webwinkelkeur/frontend/enabled')): ?>
34
+ <button class="button webwinkelkeurAddReview">
35
+ <span>
36
+ <span>
37
+ <?php echo $this->__('Write review');?>
38
+ </span>
39
+ </span>
40
+ </button>
41
+ <?php else: ?>
42
+ <button class="button" onclick="setLocation('<?php echo Mage::getStoreConfig('webwinkelkeur/general/url'); ?>')">
43
+ <span>
44
+ <span>
45
+ <?php echo $this->__('Write review');?>
46
+ </span>
47
+ </span>
48
+ </button>
49
+ <?php endif; ?>
50
+ <?php endif; ?>
51
+ </div>
52
+
53
+ <?php if($reviews->getSize()): ?>
54
+ <div class="content-webwinkelkeur">
55
+ <div class="about-webwinkelkeur">
56
+ Stichting WebwinkelKeur is een non-profit organisatie welke een keurmerk combineert met klantbeoordelingen. Als lid van Stichting WebwinkelKeur hebben we dan ook een juridische toets doorstaan. Tevens kunt u onafhankelijk verzamelde klantbeoordelingen bij hen plaatsen en lezen. Stichting WebwinkelKeur zorgt hierbij voor betrouwbare en echte klantbeoordelingen die niet door de webwinkel te beïnvloeden zijn. Bent u toch niet tevreden? Dan kunt u uw geschil melden bij WebwinkelKeur en proberen ze u te helpen. U kunt dan ook veilig bij ons winkelen. Lees meer over Stichting WebwinkelKeur op: <a href="https://www.webwinkelkeur.nl/consument/" target="_blank">https://www.webwinkelkeur.nl/consument/</a>.
57
+ <br/>
58
+ <br/>
59
+ <strong><?php echo $this->__('Link');?>:</strong> <a href="<?php echo Mage::getStoreConfig('webwinkelkeur/general/url'); ?>" target="_blank"><?php echo Mage::getStoreConfig('webwinkelkeur/general/url'); ?></a>
60
+ </div>
61
+ <div class="stats-webwinkelkeur">
62
+ <div class="ratingblock-webwinkelkeur" style="background-color: #e0eacf; color: #7dab00;">
63
+ <span>+</span><br/>
64
+ <?php echo $stats->getPercentagePositive(); ?>%
65
+ </div>
66
+ <div class="ratingblock-webwinkelkeur" style="background-color: #f3ecdb; color: #ef941f;">
67
+ <span>+/-</span><br/>
68
+ <?php echo $stats->getPercentageNeutral(); ?>%
69
+ </div>
70
+ <div class="ratingblock-webwinkelkeur" style="background-color: #f8d7d7; color: #d31b1b;">
71
+ <span>-</span><br/>
72
+ <?php echo $stats->getPercentageNegative(); ?>%
73
+ </div>
74
+ </div>
75
+ </div>
76
+
77
+ <?php $i=0; foreach($reviews as $review): ?>
78
+ <div class="review-list">
79
+ <div class="review-header">
80
+ <h3><?php echo $review->getName(); ?> - <?php echo Mage::helper('core')->formatDate($review->getDate(), 'long', false); ?></h3>
81
+ <?php if($review->getRating()): ?>
82
+ <ul class="overall">
83
+ <li>
84
+ <span class="rating-empty"><span class="rating-star-<?php echo $review->getRating();?>"></span></span>
85
+ </li>
86
+ </ul>
87
+ <?php endif; ?>
88
+ </div>
89
+ <ul class="experience">
90
+ <li>
91
+ <p>
92
+ <?php if($review->getExperience()): ?>
93
+ <?php echo nl2br($review->getExperience()); ?>
94
+ <?php else: ?>
95
+ &nbsp;
96
+ <?php endif; ?>
97
+ </p>
98
+ </li>
99
+ </ul>
100
+ <ul class="summary-index">
101
+ <?php if($review->getDeliveryTime()): ?>
102
+ <li>
103
+ <span class="rating-name"><?php echo $this->__('Delivery Time');?></span>
104
+ <span class="rating-empty"><span class="rating-greystar-<?php echo $review->getDeliveryTime();?>"></span></span>
105
+ </li>
106
+ <?php endif; ?>
107
+ <?php if($review->getUserfriendlyness()): ?>
108
+ <li>
109
+ <span class="rating-name"><?php echo $this->__('Userfriendlyness');?></span>
110
+ <span class="rating-empty"><span class="rating-greystar-<?php echo $review->getUserfriendlyness();?>"></span></span>
111
+ </li>
112
+ <?php endif; ?>
113
+ <?php if($review->getPriceQuality()): ?>
114
+ <li>
115
+ <span class="rating-name"><?php echo $this->__('Price / Quality');?></span>
116
+ <span class="rating-empty"><span class="rating-greystar-<?php echo $review->getPriceQuality();?>"></span></span>
117
+ </li>
118
+ <?php endif; ?>
119
+ <?php if($review->getAftersales()): ?>
120
+ <li>
121
+ <span class="rating-name"><?php echo $this->__('Aftersales');?></span>
122
+ <span class="rating-empty"><span class="rating-greystar-<?php echo $review->getAftersales();?>"></span></span>
123
+ </li>
124
+ <?php endif; ?>
125
+ </ul>
126
+ </div>
127
+ <?php $i++; endforeach;?>
128
+ <?php echo $this->getPagerHtml(); ?>
129
+ <?php else: ?>
130
+ <p class="note-msg"><?php echo $this->__('No reviews found...'); ?></p>
131
+ <?php endif ?>
132
+ </div>
app/design/frontend/base/default/template/magmodules/webwinkelkeur/sidebar/js-sidebar.phtml ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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:
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_Webwinkelkeur
18
+ * @author Magmodules <info@magmodules.eu)
19
+ * @copyright Copyright (c) 2014 (http://www.magmodules.eu)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ */
22
+
23
+ $webwinkelkeur_id = (int)Mage::getStoreConfig('webwinkelkeur/general/api_id');
24
+ $enabled = Mage::getStoreConfig('webwinkelkeur/general/enabled');
25
+ $js_enabled =Mage::getStoreConfig('webwinkelkeur/frontend/enabled');
26
+ $sidebar = (Mage::getStoreConfig('webwinkelkeur/frontend/sidebar') ? 'true' : 'false');
27
+ $tooltip = (Mage::getStoreConfig('webwinkelkeur/frontend/tooltip') ? 'true' : 'false');
28
+ $sidebar_position = Mage::getStoreConfig('webwinkelkeur/frontend/sidebar_position');
29
+ $sidebar_top = Mage::getStoreConfig('webwinkelkeur/frontend/sidebar_height');
30
+ ?>
31
+ <?php if($webwinkelkeur_id && $js_enabled): ?>
32
+ <script type="text/javascript">
33
+ (function() {
34
+ _webwinkelkeur_id = <?php echo $webwinkelkeur_id; ?>;
35
+ _webwinkelkeur_sidebar = <?php echo $sidebar; ?>;
36
+ _webwinkelkeur_tooltip = <?php echo $tooltip; ?>;
37
+ _webwinkelkeur_sidebar_position = '<?php echo $sidebar_position; ?>';
38
+ _webwinkelkeur_sidebar_top = '<?php echo $sidebar_top; ?>';
39
+ var js = document.createElement("script");
40
+ js.type = "text/javascript";
41
+ js.async = true;
42
+ js.src = "//www.webwinkelkeur.nl/js/sidebar.js";
43
+ var s = document.getElementsByTagName("script")[0];
44
+ s.parentNode.insertBefore(js, s);
45
+ })();
46
+ </script>
47
+ <?php endif; ?>
app/design/frontend/base/default/template/magmodules/webwinkelkeur/sidebar/left.phtml ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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:
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_Webwinkelkeur
18
+ * @author Magmodules <info@magmodules.eu)
19
+ * @copyright Copyright (c) 2014 (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 webwinkelkeur-sidebar">
27
+ <div class="block-title">
28
+ <strong><span><?php echo $this->__('WebwinkelKeur') ?></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/LocalBusiness">
33
+ <p itemprop="name" class="company-name"><?php echo $total->getCompany(); ?></p>
34
+ <div class="total-block-stars"><span style="width: <?php echo $total->getPercentage(); ?>%"></span></div>
35
+ <div class="total-block-text" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
36
+ <p><strong><span itemprop="ratingValue"><?php echo $total->getStarsQty(); ?></span> / <span itemprop="bestRating">5.00</span></strong></p>
37
+ <p class="based-on"><?php echo $this->__('Based on %s reviews', '<span itemprop="ratingCount">' . $total->getVotes() . '</span>'); ?></p>
38
+ </div>
39
+ </div>
40
+ <?php else: ?>
41
+ <div class="block-content">
42
+ <div class="total-block-stars"><span style="width: <?php echo $total->getPercentage(); ?>%"></span></div>
43
+ <div class="total-block-text">
44
+ <p><strong><?php echo $total->getStarsQty(); ?> / 5.00</strong></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="shopreview-sidebar-block">
53
+ <p><?php echo $content; ?></p>
54
+ <span class="rating-name"><?php echo $sidebarreview->getName(); ?></span>
55
+ <?php if($sidebarreview->getRating()): ?>
56
+ <span class="rating-empty"><span class="rating-star-<?php echo $sidebarreview->getRating();?>"></span></span>
57
+ <?php endif; ?>
58
+ </div>
59
+ </div>
60
+ <?php endforeach; ?>
61
+ <?php if($reviewurl = $this->getReviewsUrl()): ?>
62
+ <div class="block-content">
63
+ <div class="actions">
64
+ <?php echo $reviewurl; ?>
65
+ </div>
66
+ </div>
67
+ <?php endif; ?>
68
+ </div>
69
+ <?php endif; ?>
70
+
app/design/frontend/base/default/template/magmodules/webwinkelkeur/sidebar/right.phtml ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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:
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_Webwinkelkeur
18
+ * @author Magmodules <info@magmodules.eu)
19
+ * @copyright Copyright (c) 2014 (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->helper('webwinkelkeur')->getTotalScore();
24
+ ?>
25
+
26
+ <?php if($sidebarreviews): ?>
27
+ <div class="block webwinkelkeur-sidebar">
28
+ <div class="block-title">
29
+ <strong><span><?php echo $this->__('WebwinkelKeur') ?></span></strong>
30
+ </div>
31
+ <?php if($total->getPercentage() > 0): ?>
32
+ <?php if($this->getSnippetsEnabled('right')): ?>
33
+ <div class="block-content" itemscope itemtype="http://schema.org/LocalBusiness">
34
+ <p itemprop="name" class="company-name"><?php echo $total->getCompany(); ?></p>
35
+ <div class="total-block-stars"><span style="width: <?php echo $total->getPercentage(); ?>%"></span></div>
36
+ <div class="total-block-text" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
37
+ <p><strong><span itemprop="ratingValue"><?php echo $total->getStarsQty(); ?></span> / <span itemprop="bestRating">5.00</span></strong></p>
38
+ <p class="based-on"><?php echo $this->__('Based on %s reviews', '<span itemprop="ratingCount">' . $total->getVotes() . '</span>'); ?></p>
39
+ </div>
40
+ </div>
41
+ <?php else: ?>
42
+ <div class="block-content">
43
+ <div class="total-block-stars"><span style="width: <?php echo $total->getPercentage(); ?>%"></span></div>
44
+ <div class="total-block-text">
45
+ <p><strong><?php echo $total->getStarsQty(); ?> / 5.00</strong></p>
46
+ </div>
47
+ </div>
48
+ <?php endif; ?>
49
+ <?php endif; ?>
50
+ <?php $i=0; foreach($sidebarreviews as $sidebarreview): ?>
51
+ <?php $content = $this->formatContent($sidebarreview, 'right'); ?>
52
+ <div class="block-content">
53
+ <div class="shopreview-sidebar-block">
54
+ <p><?php echo $content; ?></p>
55
+ <span class="rating-name"><?php echo $sidebarreview->getName(); ?></span>
56
+ <?php if($sidebarreview->getRating()): ?>
57
+ <span class="rating-empty"><span class="rating-star-<?php echo $sidebarreview->getRating();?>"></span></span>
58
+ <?php endif; ?>
59
+ </div>
60
+ </div>
61
+ <?php endforeach; ?>
62
+ <?php if($reviewurl = $this->getReviewsUrl()): ?>
63
+ <div class="block-content">
64
+ <div class="actions">
65
+ <?php echo $reviewurl; ?>
66
+ </div>
67
+ </div>
68
+ <?php endif; ?>
69
+ </div>
70
+ <?php endif; ?>
71
+
app/design/frontend/base/default/template/magmodules/webwinkelkeur/widget/richsnippets.phtml ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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:
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_Webwinkelkeur
18
+ * @author Magmodules <info@magmodules.eu)
19
+ * @copyright Copyright (c) 2014 (http://www.magmodules.eu)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ */
22
+ ?>
23
+ <?php if(($this->getSnippetsEnabled()) && ($snippets = $this->getSnippets())) { ?>
24
+ <div class="webwinkelkeur-snippets">
25
+ <?php echo $this->getHtmlStars($snippets->getPercentage()); ?>
26
+ <div itemscope="itemscope" itemtype="http://schema.org/Product">
27
+ <meta itemprop="name" content="<?php echo $snippets->getCompany(); ?>">
28
+ <div itemprop="aggregateRating" itemscope="itemscope" itemtype="http://schema.org/AggregateRating">
29
+ <meta itemprop="bestRating" content="100">
30
+ <p><?php echo Mage::helper('kiyohsnippets')->__('Rating %s based on %s customer reviews', '<span itemprop="ratingValue">' . $snippets->getPercentage() . '</span>%', '<span itemprop="reviewCount">' . $snippets->getVotes() . '</span>') ?> <?php echo $this->getExternalLink(); ?> </p>
31
+ </div>
32
+ </div>
33
+ </div>
34
+ <?php } ?>
app/etc/modules/Magmodules_Webwinkelkeur.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Magmodules_Webwinkelkeur>
5
+ <active>true</active>
6
+ <codePool>local</codePool>
7
+ </Magmodules_Webwinkelkeur>
8
+ </modules>
9
+ </config>
app/locale/en_US/Magmodules_Webwinkelkeur.csv ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "General Configuration","General Configuration"
2
+ "You can find the necessary information in your WebwinkelKeur dashboard bottom of the page -Place WebwinkelKeur mark- <br/> As addition next to the activation of this extension we also recommend you to place the appropriate WebwinkelKeur logo and banner.<br/><br/>","You can find the necessary information in your WebwinkelKeur dashboard bottom of the page -Place WebwinkelKeur mark- <br/> As addition next to the activation of this extension we also recommend you to place the appropriate WebwinkelKeur logo and banner.<br/><br/>"
3
+ "Enabled","Enabled"
4
+ "API CREDENTIALS","API CREDENTIALS"
5
+ "Webshop ID","Webshop ID"
6
+ "API Key","API Key"
7
+ "URL","URL"
8
+ "You can find this information in your WebwinkelKeur account","You can find this information in your WebwinkelKeur account"
9
+ "WebwinkelKeur Import Reviews","WebwinkelKeur Import Reviews"
10
+ "To display the latest reviews in your store, you must import the reviews. This can be done automatically or manually.","To display the latest reviews in your store, you must import the reviews. This can be done automatically or manually."
11
+ "Import Automatically","Import Automatically"
12
+ "Last Update","Last Update"
13
+ "Update Summary","Update Summary"
14
+ "Update Reviews","Update Reviews"
15
+ "Process Manually","Process Manually"
16
+ "Update Review History","Update Review History"
17
+ "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).","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)."
18
+ "Select the schedule for automatic updating","Select the schedule for automatic updating"
19
+ "Latest Reviews Visibility","Latest Reviews Visibility"
20
+ "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/>","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/>"
21
+ "Left Sidebar","Left Sidebar"
22
+ "Number of Reviews","Number of Reviews"
23
+ "Character length of Reviews","Character length of Reviews"
24
+ "Link to","Link to"
25
+ "Add Rich Snippets","Add Rich Snippets"
26
+ "You can only activate the Rich Snippets when this block is shown on your Homepage only","You can only activate the Rich Snippets when this block is shown on your Homepage only"
27
+ "Right Sidebar","Right Sidebar"
28
+ "WebwinkelKeur Overview Page","WebwinkelKeur Overview Page"
29
+ "We can import your customer reviews and display them in your store as new content. <br/><br/> Link: http://www.mywebshop.com/<strong>WebwinkelKeur</strong><br/><br/>","We can import your customer reviews and display them in your store as new content. <br/><br/> Link: http://www.mywebshop.com/<strong>WebwinkelKeur</strong><br/><br/>"
30
+ "Pagination","Pagination"
31
+ "Pagination is the process of dividing (content) into discrete pages","Pagination is the process of dividing (content) into discrete pages"
32
+ "Reviews per page","Reviews per page"
33
+ "Meta Data","Meta Data"
34
+ "Meta Title","Meta Title"
35
+ "Meta Description","Meta Description"
36
+ "Meta Keywords","Meta Keywords"
37
+ "Invitation to write the customer experience","Invitation to write the customer experience"
38
+ "WebwinkelKeur can invite your customers to write customer reviews. This feature is only available to PLUS members. <br><a href="#">https://www.WebwinkelKeur.nl/webwinkel/mogelijkheden/plus/</a> <br/><br/>","WebwinkelKeur can invite your customers to write customer reviews. This feature is only available to PLUS members. <br><a href="#">https://www.WebwinkelKeur.nl/webwinkel/mogelijkheden/plus/</a> <br/><br/>"
39
+ "Activate","Activate"
40
+ "Send invitation?","Send invitation?"
41
+ "Order is Completed with status","Order is Completed with status"
42
+ "Invitation e-mail is sent after such status is achieved","Invitation e-mail is sent after such status is achieved"
43
+ "Delay","Delay"
44
+ "Send the invitation x days after the order is completed","Send the invitation x days after the order is completed"
45
+ "Maximum Delay","Maximum Delay"
46
+ "Change only if necessary","Change only if necessary"
47
+ "Send customers automatically receive an invitation to share a customer experience. This feature is only available for WebwinkelKeur PLUS members.","Send customers automatically receive an invitation to share a customer experience. This feature is only available for WebwinkelKeur PLUS members."
48
+ "Specify at which status you want to send the invitation. Default is Completed","Specify at which status you want to send the invitation. Default is Completed"
49
+ "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.","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."
50
+ "Number of days to complete order may last, if it takes longer then no invitation will be sent. Read more about this feature on WebwinkelKeur.nl.","Number of days to complete order may last, if it takes longer then no invitation will be sent. Read more about this feature on WebwinkelKeur.nl."
51
+ "WebwinkelKeur Javascript Sidebar","WebwinkelKeur Javascript Sidebar"
52
+ "The WebwinkelKeur javascript integration ensures that your WebwinkelKeur to load page on your own web store. <br/> Now customers don't have to leave your store anymore to read the reviews. <br/> This effectively increases your conversion!<br><br>","The WebwinkelKeur javascript integration ensures that your WebwinkelKeur to load page on your own web store. <br/> Now customers don't have to leave your store anymore to read the reviews. <br/> This effectively increases your conversion!<br><br>"
53
+ "Javascript Integration","Javascript Integration"
54
+ "Show Sidebar","Show Sidebar"
55
+ "Tooltip","Tooltip"
56
+ "Sidebar Position","Sidebar Position"
57
+ "Place of the sidebar","Place of the sidebar"
58
+ "Insert the interactive WebwinkelKeur Sidebar","Insert the interactive WebwinkelKeur Sidebar"
59
+ "Whether to display the mouseover tooltip","Whether to display the mouseover tooltip"
60
+ "The position of the sidebar","The position of the sidebar"
61
+ "Placement from top screen","Placement from top screen"
62
+ "Showing the sidebar ensures a higher confidence. Visitors can read the reviews without leaving the store.","Showing the sidebar ensures a higher confidence. Visitors can read the reviews without leaving the store."
63
+ "Showing the sidebar ensures a higher confidence. Visitors also do not have to leave to check the reviews which increases your conversion.","Showing the sidebar ensures a higher confidence. Visitors also do not have to leave to check the reviews which increases your conversion."
64
+ "WebwinkelKeur Log Settings","WebwinkelKeur Log Settings"
65
+ "Logs can be activated in order to detect errors.<br/> This feature is particularly for developers.<br/><br/>","Logs can be activated in order to detect errors.<br/> This feature is particularly for developers.<br/><br/>"
66
+ "Enable Log Function","Enable Log Function"
67
+ "Auto Cleaning","Auto Cleaning"
68
+ "Clean After Days","Clean After Days"
69
+ "WebwinkelKeur Rich Snippets","WebwinkelKeur Rich Snippets"
70
+ "Rich Snippets is a schema.org markup that makes it possible to give richer and more specific information. <br/> The Rich Snippets will show your store rating in the google search engine results. <br/><br/>Use: {{block type="WebwinkelKeur/snippets" name="webwinkelsnippets"}} to call the block on the homepage.<br/><br/>","Rich Snippets is a schema.org markup that makes it possible to give richer and more specific information. <br/> The Rich Snippets will show your store rating in the google search engine results. <br/><br/>Use: {{block type="WebwinkelKeur/snippets" name="webwinkelsnippets"}} to call the block on the homepage.<br/><br/>"
71
+ "WebwinkelKeur Reviews","WebwinkelKeur Reviews"
72
+ "WebwinkelKeur Log","WebwinkelKeur Log"
73
+ "WebwinkelKeur Config,"WebwinkelKeur Config"
74
+ "Shop","Winkel"
75
+ "Experience","Experience"
76
+ "Delivery","Delivery"
77
+ "Friendlyness","Friendlyness"
78
+ "Price Quality","Price Quality"
79
+ "Sidebar","Sidebar"
80
+ "Delete all reviews","Delete all reviews"
81
+ "Set to invisible","Set to invisible"
82
+ "Set to visible","Set to visible"
83
+ "Add to Sidebar","Add to Sidebar"
84
+ "Remove from Sidebar","Remove from Sidebar"
85
+ "Are you sure you want to delete all reviews?","Are you sure you want to delete all reviews?"
86
+ "Are you sure you want to cleanup logfiles?","Are you sure you want to cleanup logfiles?"
87
+ "Please select item(s)","Please select item(s)"
88
+ "Webwinkel ID %s: no updates found, feed is empty or not foud!","Webwinkel ID %s: no updates found, feed is empty or not foud!"
89
+ "Total of %d review(s) were disabled.","Total of %d review(s) were disabled."
90
+ "Total of %d review(s) were enabled.","Total of %d review(s) were enabled."
91
+ "Total of %d review(s) were added to the sidebar.","Total of %d review(s) were added to the sidebar."
92
+ "Total of %d review(s) were removed from the sidebar.","Total of %d review(s) were removed from the sidebar."
93
+ "Succefully deleted all %s saved review(s).","'Succefully deleted all %s saved review(s)."
94
+ "%s new review(s)","%s new review(s)"
95
+ "%s review(s) updated","%s review(s) updated"
96
+ "total score updated.","and total score updated."
97
+ "(more)","(more)"
98
+ "%s - Repsonse: %s","'%s - Repsonse: %s"
99
+ "Invitation Call","Invitation Call"
100
+ "Cleanup Log","Cleanup Log"
101
+ "Write review","Write review"
102
+ "Link","Link"
103
+ "Delivery Time","Delivery Time"
104
+ "Userfriendlyness","Userfriendlyness"
105
+ "Price / Quality,"Price / Quality"
106
+ "Aftersales","Aftersales"
107
+ "Rating %s based on %s customer reviews,"Rating %s based on %s customer reviews"
108
+ "Based on %s reviews","Based on %s reviews"
app/locale/nl_NL/Magmodules_Webwinkelkeur.csv ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "General Configuration","Algemene Configuratie"
2
+ "You can find the necessary information in your WebwinkelKeur dashboard bottom of the page -Place WebwinkelKeur mark- <br/> As addition next to the activation of this extension we also recommend you to place the appropriate WebwinkelKeur logo and banner.<br/><br/>","U vindt de nodige gegevens in uw WebwinkelKeur dashboard onderaan de pagina onder <strong>Keurmerk plaatsen.</strong> <br/>Naast het activeren van deze module raden wij u ook aan om handmatig nog het nodige logo en bannermateriaal te plaatsen voor een goede conversie. <br/><br/>"
3
+ "Enabled","Enabled"
4
+ "API CREDENTIALS","API Gegevens"
5
+ "Webshop ID","Webshop ID"
6
+ "API Key","API Sleutel"
7
+ "URL","URL"
8
+ "You can find this information in your WebwinkelKeur account","Deze informatie is terug te vinden in uw WebwinkelKeur account."
9
+ "WebwinkelKeur Import Reviews","WebwinkelKeur Import Reviews"
10
+ "To display the latest reviews in your store, you must import the reviews. <br/> This can be done automatically or manually.<br/><br/>","Om de laatste beoordelingen weer te geven moeten deze geïmporteerd worden. <br/>Dit kan automatisch of handmatig.<br/><br/>"
11
+ "Import Automatically","Importeer automatisch"
12
+ "Last Update","Laatste update"
13
+ "Update Summary","Update samenvatting"
14
+ "Update Reviews","Update beoordelingen"
15
+ "Update Review History","Update historische beoordelingen"
16
+ "Process Manually","Handmatig inladen"
17
+ "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 automatisch beoordelingen in te laden. Zorg ervoor dat de Magento Cronjob werkt, is dit niet het geval? Neem dan contact op met je hosting-partij"
18
+ "Select the schedule for automatic updating","Selecteer de tijdsperiode waarin de beoordelingen moeten worden geüpdate"
19
+ "Latest Reviews Visibility","Laatste Beoordelingen zichtbaarheid"
20
+ "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/>","Toon de laatste beoordelingen direct aan de rechter of linkerkant van de pagina om vertrouwen en op te bouwen.<br/><br/>"
21
+ "Left Sidebar","Linker Sidebar"
22
+ "Number of Reviews","Aantal beoordelingen"
23
+ "Character length of Reviews","Lengte van een beoordelingen"
24
+ "Link to","Link naar"
25
+ "Add Rich Snippets","Voeg Rich Snippets toe"
26
+ "You can only activate the Rich Snippets when this block is shown on your Homepage only","De Rich Snippets kunnen alleen worden geactiveerd wanneer dit blok op de homepage wordt vertoond."
27
+ "Right Sidebar","Rechter Sidebar"
28
+ "WebwinkelKeur Overview Page","WebwinkelKeur overzichtpagina"
29
+ "We can import your customer reviews and display them in your store as new content. <br/><br/> Link: http://www.mywebshop.com/<strong>WebwinkelKeur</strong><br/><br/>","We kunnen uw klantbeoordelingen importeren en weergeven op een eigen pagina binnen uw webwinkel.<br> Hiermee worden de beoordelingen naast bij WebwinkelKeur ook op uw eigen website weergegeven.<br/><br/> Link: http://www.naamwebwinkel.nl/<strong>WebwinkelKeur</strong><br/><br/>"
30
+ "Pagination","Pagina's opdelen"
31
+ "Pagination is the process of dividing (content) into discrete pages","Pagina's opdelen kan handig zijn wanneer er teveel beoordelingen zijn voor 1 pagina"
32
+ "Reviews per page","Aantal beoordelingen per pagina"
33
+ "Meta Data","Meta data"
34
+ "Meta Title","Meta titel"
35
+ "Meta Description","Meta omschrijving"
36
+ "Meta Keywords","Meta zoekwoorden"
37
+ "Invitation to write the customer experience","Uitnodiging om een review e-mail te schrijven"
38
+ "WebwinkelKeur can invite your customers to write customer reviews. This feature is only available to PLUS members. <br><a href=""https://www.WebwinkelKeur.nl/webwinkel/mogelijkheden/plus/"">https://www.WebwinkelKeur.nl/webwinkel/mogelijkheden/plus/</a> <br/><br/>","WebwinkelKeur kan uw klanten uitnodigen tot het delen van een klantbeoordeling. Deze functie is enkel beschikbaar voor PLUS leden. <br><a href=""https://www.WebwinkelKeur.nl/webwinkel/mogelijkheden/plus/"">https://www.WebwinkelKeur.nl/webwinkel/mogelijkheden/plus/</a> <br/><br/>"
39
+ "Activate","Activeren"
40
+ "Send invitation?","Uitnodiging versturen"
41
+ "Order is Completed with status","Verzend bij status"
42
+ "Invitation e-mail is sent after such status is achieved","Uitnodiging e-mail wordt verstuurd vanaf het moment dat deze order-status is bereikt"
43
+ "Delay","Vertraging"
44
+ "Send the invitation x days after the order is completed","Stuur de uitnodiging X dagen nadat de bovengenoemde status is bereikt"
45
+ "Maximum Delay","Maximale vertraging"
46
+ "Change only if necessary","Alleen veranderen wanneer aangegeven"
47
+ "Send customers automatically receive an invitation to share a customer experience. This feature is only available for WebwinkelKeur PLUS members.","Stuur klanten volledig automatisch een uitnodiging om hun klant ervaring te delen. Deze functie is alleen beschikbaar voor WebwinkelKeur PLUS leden"
48
+ "Specify at which status you want to send the invitation. Default is Completed","Geef aan bij welke status de uitnodiging verzonden moet worden. Standaard is dit <strong>Complete</strong>"
49
+ "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.","Dit zal ervoor zorgen dat de klant pas na het ontvangst van het product de uitnodiging ontvangt. Dit verhoogt de kans dat de klant zijn ervaring zal delen."
50
+ "Number of days to complete order may last, if it takes longer then no invitation will be sent. Read more about this feature on WebwinkelKeur.nl.","Aantal dagen dat een sessie kan duren, als het langer duurt zal er geen uitnodiging zal worden verstuurd. Lees meer over deze functie op WebwinkelKeur.nl."
51
+ "WebwinkelKeur Javascript Sidebar","WebwinkelKeur Javascript Sidebar"
52
+ "The WebwinkelKeur javascript integration ensures that your WebwinkelKeur to load page on your own web store. <br/> Now customers don't have to leave your store anymore to read the reviews. <br/> This effectively increases your conversion!<br><br>","De WebwinkelKeur javascript integratie zorgt ervoor dat uw WebwinkelKeur pagina binnen uw eigen webwinkel te laden is. <br>Zo hoeven klanten uw webwinkel niet te verlaten om uw gegevens te bekijken, beoordelingen te lezen of te plaatsen. <br>Dit verhoogt daarmee uw conversie.<br><br>"
53
+ "Javascript Integration","Javascript Integratie"
54
+ "Show Sidebar","Sidebar tonen"
55
+ "Tooltip","Tooltip"
56
+ "Sidebar Position","Sidebar positie"
57
+ "Place of the sidebar","Plek van de sidebar"
58
+ "Insert the interactive WebwinkelKeur Sidebar","Activeer de interactieve WebwinkelKeur Sidebar"
59
+ "Whether to display the mouseover tooltip","Maak wel of geen gebruik van de tooltip"
60
+ "The position of the sidebar","De positie van de sidebar"
61
+ "Placement from top screen","Afstand vanaf boven"
62
+ "Showing the sidebar ensures a higher confidence. Visitors can read the reviews without leaving the store.","Het tonen van de beoordelingen zorgt voor een hoger vertrouwen. Bezoekers kunnen de beoordelingen lezen zonder de winkel te verlaten."
63
+ "Showing the sidebar ensures a higher confidence. Visitors also do not have to leave to check the reviews which increases your conversion.","Het tonen van de beoordelingen zorgt voor een hoger vertrouwen. Bezoekers kunnen de beoordelingen lezen zonder de winkel te verlaten."
64
+ "WebwinkelKeur Log Settings","WebwinkelKeur log instellingen"
65
+ "Logs can be activated in order to detect errors.<br/> This feature is particularly for developers.<br/><br/>","De logfile kan worden geactiveerd om eventuele foutmeldingen op te slaan.<br/>Deze functie is hoofdzakelijk bestemd voor ontwikkelaars.<br/><br/>"
66
+ "Enable Log Function","Activeer log functionaliteit"
67
+ "Auto Cleaning","Automatisch opschonen "
68
+ "Clean After Days","Opschonen na aantal dagen"
69
+ "WebwinkelKeur Rich Snippets","WebwinkelKeur Rich Snippets"
70
+ "Rich Snippets is a schema.org markup that makes it possible to give richer and more specific information. <br/> The Rich Snippets will show your store rating in the google search engine results. <br/><br/>Use: {{block type=""webwinkelkeur/snippets"" name=""webwinkelsnippets""}} to call the block on the homepage.<br/><br/>","Rich snippets maken het mogelijk om bepaalde informatie aan Google door te geven.<br> Met deze Rich snippets kunt u uw gemiddelde beoordeling doorgeven aan Google waardoor er sterren kunnen verschijnen in de zoekresultaten. <br/><br/>Plaats: {{block type=""webwinkelkeur/snippets"" name=""webwinkelsnippets""}} in de CMS Homepage om het blok in te schakelen.<br/><br/>"
71
+ "WebwinkelKeur Reviews","Beoordelingen"
72
+ "WebwinkelKeur Log","WebwinkelKeur Log"
73
+ "WebwinkelKeur Config,"WebwinkelKeur Instellingen"
74
+ "Shop","Winkel"
75
+ "Experience","Recensie"
76
+ "Delivery","Verzending"
77
+ "Friendlyness","Vriendelijkheid"
78
+ "Price Quality","Prijs/kwaliteit"
79
+ "Sidebar","Sidebar"
80
+ "Delete all reviews","Verwijder alle recensies"
81
+ "Set to invisible","Deactiveer"
82
+ "Set to visible","Activeer"
83
+ "Add to Sidebar","Plaats in Sidebar"
84
+ "Remove from Sidebar","Verwijder uit Sidebar"
85
+ "Are you sure you want to delete all reviews?","Weet je zeker dat je alle beoordelingen wilt verwijderen?"
86
+ "Are you sure you want to cleanup logfiles?","Weet je zeker dat je alle logfiles wilt verwijderen?"
87
+ "Please select item(s)","Selecteer hier item(s)"
88
+ "Webwinkel ID %s: no updates found, feed is empty or not foud!","Webwinkel ID %s: geen updates gevonden, feed is leeg of niet gevonden"
89
+ "Total of %d review(s) were disabled.","Een totaal van %d beoordeling(en) zijn uitgeschakeld."
90
+ "Total of %d review(s) were enabled.","Een totaal van %d beoordeling(en) zijn ingeschakeld"
91
+ "Total of %d review(s) were added to the sidebar.","Een totaal van %d beoordelingen zijn toegevoegd aan de sidebar."
92
+ "Total of %d review(s) were removed from the sidebar.","Een totaal van %d beoordelingen zijn verwijdert uit de sidebar"
93
+ "Succefully deleted all %s saved review(s).","'Succesvol verwijdert van %s beoordeling(en)."
94
+ "%s new review(s)","%s nieuwe beoordeling(en)"
95
+ "%s review(s) updated","%s beoordeling(en) geüpdatet"
96
+ "total score updated.","totaal score geüpdatet."
97
+ "(more)","(meer)"
98
+ "%s - Repsonse: %s","'%s - Feedback: %s"
99
+ "Invitation Call","Uitnodiging"
100
+ "Cleanup Log","Log opschonen"
101
+ "Write review","Schrijf beoordeling"
102
+ "Link","Link"
103
+ "Delivery Time","Verzending"
104
+ "Userfriendlyness","Vriendelijkheid"
105
+ "Price / Quality,"Prijs / Kwaliteit"
106
+ "Aftersales","Service"
107
+ "Rating %s based on %s customer reviews,"Beoordeling %s is op basis van %s klant beoordelingen"
108
+ "Based on %s reviews","Gebaseerd op %s beoordelingen"
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Magmodules_Webwinkelconnect</name>
4
+ <version>1.0.0</version>
5
+ <stability>stable</stability>
6
+ <license>OSL 3.0</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Connect your Magento shop to Webwinkelkeur</summary>
10
+ <description>Connect your Magento shop to Webwinkelkeur</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>2014-09-24</date>
14
+ <time>12:37:40</time>
15
+ <contents><target name="magelocal"><dir name="Magmodules"><dir name="Webwinkelkeur"><dir name="Block"><dir name="Adminhtml"><dir name="Webwinkellog"><file name="Grid.php" hash="f5738c5e7d84396a97116c54b5e90635"/></dir><file name="Webwinkellog.php" hash="53ebdf2dcc3d2e0e373ed8f33a763798"/><dir name="Webwinkelreviews"><file name="Grid.php" hash="542d749676338cbdeeb55586eabb48df"/><dir name="Renderer"><file name="Experience.php" hash="04493b27adccfe58f613d39185ebec70"/></dir></dir><file name="Webwinkelreviews.php" hash="23377e91761eebcb2fa4e9f7c1befecf"/><dir name="Widget"><dir name="Buttons"><file name="Process.php" hash="8f5599dd7725fba491ce8afaf72f0160"/><file name="Test.php" hash="1dd71bf556bae3171c3c1db258c734b5"/></dir><dir name="Form"><file name="Heading.php" hash="6897e45779bd46255d2ee113042cfbbf"/></dir><dir name="Grid"><file name="Log.php" hash="cf34c55039524c01ca23d596b8085d14"/><file name="Seconds.php" hash="35f336b20dacd8ad0d627fc6862839b7"/><file name="Stars.php" hash="52b90cc4d42929e2965d4a5c363f4604"/></dir><dir name="Info"><file name="Info.php" hash="fcaed39e1708bde99d763b5740932902"/></dir></dir></dir><file name="Reviews.php" hash="d5dc70a77762b413c3ce06b85c0d6ca5"/><file name="Sidebar.php" hash="97d059b69004c60d2d65357c64cc4c51"/><file name="Snippets.php" hash="67f905f13cdc55931ca3e4caf54e1343"/></dir><dir name="Helper"><file name="Data.php" hash="5deb3af53f223ef9fdce1348e5f42a24"/></dir><dir name="Model"><file name="Api.php" hash="8186f2a90a93d96a8e65d1e9c635bae7"/><file name="Log.php" hash="6ecc320dbbc10ee5cda27fc614786729"/><dir name="Mysql4"><dir name="Log"><file name="Collection.php" hash="f5ad486ea11b11dab6118280d3ce3596"/></dir><file name="Log.php" hash="2c535e4fd418adb6f8f7682c0a90b71e"/><dir name="Reviews"><file name="Collection.php" hash="3f72be910bc874ee44c4825a20f9aae3"/></dir><file name="Reviews.php" hash="e597067ec10ba2843cdf287d10140984"/><dir name="Stats"><file name="Collection.php" hash="bcc52097471b436df3ef3df49dd2b514"/></dir><file name="Stats.php" hash="4b381f3c31545c19b719a6a0ddf9bc8d"/></dir><file name="Observer.php" hash="86db0b870bee6f3d05278a8aca012739"/><file name="Reviews.php" hash="bea3a66816d6793347efefd4eb04ee27"/><file name="Stats.php" hash="4fdb3aac9ea4d298bbd04abbd29f71cb"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Cronfrequency.php" hash="01ec2ce47c238ea6f263a5eb1514a5fd"/><file name="Orderstatus.php" hash="8b2814feba4e8bb57f2de692b15dc070"/><file name="Position.php" hash="ab6369e72fcad5188e350506b8990840"/><file name="Sidebarlink.php" hash="92d0e24d897084f52ee0b45264085587"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="WebwinkellogController.php" hash="1c8d05b64f23905d68dc2a53cee7d2b3"/><file name="WebwinkelreviewsController.php" hash="1260d46daa28adeb3a87088f2ddaac4d"/></dir><file name="IndexController.php" hash="313e1f531f6b0926534ce8022fe961e8"/></dir><dir name="etc"><file name="adminhtml.xml" hash="1fc7ef0cb89910109c035dd3767d2b7b"/><file name="config.xml" hash="4b6369739d01dc732cf8ccdf444c1f46"/><file name="system.xml" hash="268dee05e38966d0bf09f71b531cbe92"/></dir><dir name="sql"><dir name="webwinkelkeur_setup"><file name="mysql4-install-0.9.0.php" hash="f19886e85f29783c592f5b430ba13544"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="magmodules_webwinkelkeur.xml" hash="e0caa7dac40707357dafb7243798957b"/></dir><dir name="template"><dir name="magmodules"><dir name="webwinkelkeur"><file name="index.phtml" hash="f68b855bfcf9f9d4c32bde5c918521b3"/><dir name="sidebar"><file name="js-sidebar.phtml" hash="3e39e24c9a9f79702332b3540d79d3fc"/><file name="left.phtml" hash="e38672314585e35f7143167b806dfe3e"/><file name="right.phtml" hash="f587d93bfb564976d025d3d47cf17c71"/></dir><dir name="widget"><file name="richsnippets.phtml" hash="960fea08718e18e7d237405665a16bac"/></dir></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="magmodules_webwinkelkeur.xml" hash="414872a7f3a9734977c88c8b35ae0357"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Magmodules_Webwinkelkeur.xml" hash="c152bb3d3595e648fe4858b028754343"/></dir></target><target name="magelocale"><dir><dir name="en_US"><file name="Magmodules_Webwinkelkeur.csv" hash="5ef900722ad9a3d120b38198e2918aad"/></dir><dir name="nl_NL"><file name="Magmodules_Webwinkelkeur.csv" hash="a74791935787c54dc6137d3b3ec1a385"/></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="magmodules"><dir name="webwinkelkeur"><dir name="images"><file name="5-stars-empty.png" hash="799c499ca785331e7e69d892df52dd48"/><file name="5-stars-full.png" hash="1d06151a2c4da6bb71381538c8a903a5"/><file name="greystar.png" hash="ab99888c7a8f47826ad7a83bcabf9130"/><file name="star.png" hash="647c77f0ef881fb2a90a4f53f70d75fa"/></dir><file name="richsnippets.css" hash="46ff2f06f7d0d6f14c21fb56f97a27b3"/><file name="sidebar.css" hash="b5d05636b22b399434108176ea637b74"/><file name="style.css" hash="76b25d4ab96e964dfff8374f97da0078"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="magmodules"><dir name="webwinkelkeur"><file name="grid.css" hash="90a8ac7d668d2ea9a7dc84632e639847"/><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>6.0.0</max></php></required></dependencies>
18
+ </package>
skin/adminhtml/default/default/magmodules/webwinkelkeur/grid.css ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
3
+ * =============================================================
4
+ * NOTICE OF LICENSE [Single domain license]
5
+ * This source file is subject to the EULA that is
6
+ * available through the world-wide-web at:
7
+ * http://www.magmodules.eu/license-agreement/
8
+ * =============================================================
9
+ * @category Magmodules
10
+ * @package Magmodules_Shopreview
11
+ * @author Magmodules <info@magmodules.eu>
12
+ * @copyright Copyright (c) 2013 (http://www.magmodules.eu)
13
+ * @license http://www.magmodules.eu/license-agreement/
14
+ * =============================================================
15
+ */
16
+
17
+ /** RATINGS ORDER GRID **/
18
+ .rating-empty, .rating-star-1, .rating-star-2, .rating-star-3, .rating-star-4, .rating-star-5 {
19
+ background: url('star.png') 0 0;
20
+ margin-right: 5px;
21
+ height: 16px;
22
+ float: left;
23
+ width: 80px;
24
+ }
25
+
26
+ .rating-star-1 {
27
+ width: 16px;
28
+ }
29
+
30
+ .rating-star-2 {
31
+ width: 32px;
32
+ }
33
+
34
+ .rating-star-3 {
35
+ width: 48px;
36
+ }
37
+
38
+ .rating-star-4 {
39
+ width: 64px;
40
+ }
41
+
42
+ .rating-star-5 {
43
+ width: 80px;
44
+ }
45
+
46
+ .rating-empty {
47
+ float: left;
48
+ width: 80px;
49
+ background: url('star.png') 0 -16px;
50
+ }
51
+
52
+ a.magtooltip span {
53
+ display:none;
54
+ padding:2px 3px;
55
+ margin-left:8px;
56
+ width:550px;
57
+ }
58
+
59
+ a.magtooltip:hover span {
60
+ display:inline;
61
+ position:absolute;
62
+ background:#ffffff;
63
+ border:1px solid #cccccc;
64
+ color:#000;
65
+ padding: 10px;
66
+ }
67
+
68
+ .magtooltip hr {
69
+ height:1px;
70
+ border: 1px dotted #606;
71
+ }
skin/adminhtml/default/default/magmodules/webwinkelkeur/star.png ADDED
Binary file
skin/frontend/base/default/magmodules/webwinkelkeur/images/5-stars-empty.png ADDED
Binary file
skin/frontend/base/default/magmodules/webwinkelkeur/images/5-stars-full.png ADDED
Binary file
skin/frontend/base/default/magmodules/webwinkelkeur/images/greystar.png ADDED
Binary file
skin/frontend/base/default/magmodules/webwinkelkeur/images/star.png ADDED
Binary file
skin/frontend/base/default/magmodules/webwinkelkeur/richsnippets.css ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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:
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_Webwinkelkeur
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
+ .webwinkelkeur-snippets .rating-box {
23
+ float: left;
24
+ margin-right: 4px;
25
+ margin-top: 0px;
26
+ width:69px;
27
+ height:13px;
28
+ font-size:0;
29
+ line-height:0;
30
+ background:url('images/bkg_rating.gif') 0 0 repeat-x;
31
+ text-indent:-999em;
32
+ overflow:hidden;
33
+ }
34
+
35
+ .webwinkelkeur-snippets-snippets .rating {
36
+ float:left;
37
+ height:13px;
38
+ background:url('images/bkg_rating.gif') 0 100% repeat-x;
39
+ }
40
+
41
+ /** FOR DEFAULT USE OF RATING STARTS, REMOVE BOTH CLASSES FROM CSS **/
skin/frontend/base/default/magmodules/webwinkelkeur/sidebar.css ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
3
+ * =============================================================
4
+ * NOTICE OF LICENSE [Single domain license]
5
+ * This source file is subject to the EULA that is
6
+ * available through the world-wide-web at:
7
+ * http://www.magmodules.eu/license-agreement/
8
+ * =============================================================
9
+ * @category Magmodules
10
+ * @package Magmodules_Webwinkelkeur
11
+ * @author Magmodules <info@magmodules.eu>
12
+ * @copyright Copyright (c) 2013 (http://www.magmodules.eu)
13
+ * @license http://www.magmodules.eu/license-agreement/
14
+ * =============================================================
15
+ */
16
+
17
+ .webwinkelkeur-sidebar-block {
18
+ padding: 10px;
19
+ }
20
+
21
+ .webwinkelkeur-sidebar-block .rating-name {
22
+ font-style: italic;
23
+ }
24
+
25
+ .webwinkelkeur-sidebar-block .rating-empty { float: right; display: block; width: 80px; height: 16px; background: url('./images/star.png') 0 -16px; margin-right: 5px; }
26
+ .webwinkelkeur-sidebar-block .rating-star-1 { float: left; display: block; width: 16px; height: 16px; background: url('./images/star.png') 0 0; margin-right: 5px; }
27
+ .webwinkelkeur-sidebar-block .rating-star-2 { float: left; display: block; width: 32px; height: 16px; background: url('./images/star.png') 0 0; margin-right: 5px; }
28
+ .webwinkelkeur-sidebar-block .rating-star-3 { float: left; display: block; width: 48px; height: 16px; background: url('./images/star.png') 0 0; margin-right: 5px; }
29
+ .webwinkelkeur-sidebar-block .rating-star-4 { float: left; display: block; width: 64px; height: 16px; background: url('./images/star.png') 0 0; margin-right: 5px; }
30
+ .webwinkelkeur-sidebar-block .rating-star-5 { float: left; display: block; width: 80px; height: 16px; background: url('./images/star.png') 0 0; margin-right: 5px; }
31
+
32
+ /** big review stars **/
33
+ .block-content p.company-name { text-align: center; margin: 5px auto; font-size: 12px; }
34
+ .total-block-text { border-bottom: 1px solid #ccc; padding-bottom: 5px; }
35
+ .total-block-text p { text-align: center; padding-top: 5px; margin-bottom: 2px; font-size: 18px; }
36
+ .total-block-text p.based-on { text-align: center; padding-top: 0px; font-size: 11px; font-style: italic; }
37
+ .total-block-stars { height: 35px; width: 188px; background: url('./images/5-stars-empty.png') no-repeat; margin: 5px auto; }
38
+ .total-block-stars span{ display: block; height: 50px; background: url('./images/5-stars-full.png') no-repeat; }
skin/frontend/base/default/magmodules/webwinkelkeur/style.css ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
3
+ * =============================================================
4
+ * NOTICE OF LICENSE [Single domain license]
5
+ * This source file is subject to the EULA that is
6
+ * available through the world-wide-web at:
7
+ * http://www.magmodules.eu/license-agreement/
8
+ * =============================================================
9
+ * @category Magmodules
10
+ * @package Magmodules_Shopreview
11
+ * @author Magmodules <info@magmodules.eu>
12
+ * @copyright Copyright (c) 2013 (http://www.magmodules.eu)
13
+ * @license http://www.magmodules.eu/license-agreement/
14
+ * =============================================================
15
+ */
16
+
17
+ .webwinkelkeur {
18
+ }
19
+
20
+ .webwinkelkeur h1 {
21
+ float: left;
22
+ width: 50%;
23
+ }
24
+
25
+ .webwinkelkeur .button {
26
+ float: right;
27
+ }
28
+
29
+ .webwinkelkeur .about-webwinkelkeur {
30
+ float: left;
31
+ width: 70%;
32
+ }
33
+
34
+ .webwinkelkeur .stats-webwinkelkeur {
35
+ float: right;
36
+ width: 30%;
37
+ text-align: center;
38
+ }
39
+
40
+ .webwinkelkeur .ratingblock-webwinkelkeur {
41
+ width: 60px;
42
+ height: 60px;
43
+ padding: 4px 0px 0px 3px;
44
+ font-weight: bold;
45
+ font-size: 13px;
46
+ margin: 6px auto;
47
+ border-radius: 70px;
48
+ border: 4px solid white;
49
+ box-shadow: 1px 1px 3px #CCCCCC;
50
+ }
51
+
52
+ .webwinkelkeur .content-webwinkelkeur {
53
+ overflow: auto;
54
+ width: 100%;
55
+ margin-bottom: 5px;
56
+ }
57
+
58
+ .webwinkelkeur .review-list {
59
+ margin-bottom: 25px;
60
+ margin-top: 10px;
61
+ }
62
+
63
+ .webwinkelkeur .review-list h3 {
64
+ width: 80%;
65
+ float: left;
66
+ }
67
+
68
+ .webwinkelkeur .review-header {
69
+ clear: both;
70
+ border-bottom: 1px solid #e0e0e0;
71
+ width: 100%;
72
+ height: 25px;
73
+ }
74
+
75
+ .webwinkelkeur ul.overall li {
76
+ float: right;
77
+ }
78
+
79
+ .webwinkelkeur ul.summary-index {
80
+ display: table;
81
+ list-style-type: none;
82
+ }
83
+
84
+ .webwinkelkeur ul.summary-index li {
85
+ display: table-cell;
86
+ padding: 5px 5px 5px 10px;
87
+ }
88
+
89
+ .webwinkelkeur ul.summary-index li.head {
90
+ padding: 10px 5px 5px 5px;
91
+ border-bottom:1px dotted #e0e0e0;
92
+ }
93
+
94
+ .webwinkelkeur ul.experience li {
95
+ width: 100%;
96
+ padding: 10px;
97
+ }
98
+
99
+ .webwinkelkeur .rating-name {
100
+ font-weight: bold;
101
+ display: block;
102
+ margin-bottom: 2px;
103
+ }
104
+
105
+ /* INDEX REVIEW LIST */
106
+ .review-list .rating-empty { float: left; display: block; width: 80px; height: 16px; background: url('./images/star.png') 0 -16px; margin-right: 5px; }
107
+
108
+ .review-list .rating-star-1 { float: left; display: block; width: 16px; height: 16px; background: url('./images/star.png') 0 0; margin-right: 5px; }
109
+ .review-list .rating-star-2 { float: left; display: block; width: 32px; height: 16px; background: url('./images/star.png') 0 0; margin-right: 5px; }
110
+ .review-list .rating-star-3 { float: left; display: block; width: 48px; height: 16px; background: url('./images/star.png') 0 0; margin-right: 5px; }
111
+ .review-list .rating-star-4 { float: left; display: block; width: 64px; height: 16px; background: url('./images/star.png') 0 0; margin-right: 5px; }
112
+ .review-list .rating-star-5 { float: left; display: block; width: 80px; height: 16px; background: url('./images/star.png') 0 0; margin-right: 5px; }
113
+
114
+ .review-list .rating-greystar-1 { float: left; display: block; width: 16px; height: 16px; background: url('./images/greystar.png') 0 0; margin-right: 5px; }
115
+ .review-list .rating-greystar-2 { float: left; display: block; width: 32px; height: 16px; background: url('./images/greystar.png') 0 0; margin-right: 5px; }
116
+ .review-list .rating-greystar-3 { float: left; display: block; width: 48px; height: 16px; background: url('./images/greystar.png') 0 0; margin-right: 5px; }
117
+ .review-list .rating-greystar-4 { float: left; display: block; width: 64px; height: 16px; background: url('./images/greystar.png') 0 0; margin-right: 5px; }
118
+ .review-list .rating-greystar-5 { float: left; display: block; width: 80px; height: 16px; background: url('./images/greystar.png') 0 0; margin-right: 5px; }