Briel_ReviewPlus - Version 1.0.0

Version Notes

Stable version, fully functional on our website.

Download this release

Release Info

Developer Velica Onel
Extension Briel_ReviewPlus
Version 1.0.0
Comparing to
See all releases


Code changes from version 0.9.1 to 1.0.0

Files changed (31) hide show
  1. app/code/community/Briel/ReviewPlus/Block/Adminhtml/Clientlog/Grid.php +58 -27
  2. app/code/community/Briel/ReviewPlus/Block/Adminhtml/Clientlog/Renderer/DueDate.php +10 -0
  3. app/code/community/Briel/ReviewPlus/Block/Adminhtml/Clientlog/Renderer/Orderid.php +2 -3
  4. app/code/community/Briel/ReviewPlus/Block/Adminhtml/Clientlog/Renderer/TimeSent.php +14 -0
  5. app/code/community/Briel/ReviewPlus/Block/Adminhtml/Reviews/Grid.php +66 -24
  6. app/code/community/Briel/ReviewPlus/Block/Adminhtml/Reviews/Renderer/EditAction.php +16 -0
  7. app/code/community/Briel/ReviewPlus/Block/Adminhtml/Reviews/Renderer/PostedTime.php +14 -0
  8. app/code/community/Briel/ReviewPlus/Model/Observer.php +28 -4
  9. app/code/community/Briel/ReviewPlus/controllers/Adminhtml/ClientlogController.php +5 -3
  10. app/code/community/Briel/ReviewPlus/controllers/Adminhtml/OrdertabController.php +2 -1
  11. app/code/community/Briel/ReviewPlus/controllers/Adminhtml/ReviewsController.php +37 -4
  12. app/code/community/Briel/ReviewPlus/controllers/IndexController.php +13 -46
  13. app/code/community/Briel/ReviewPlus/etc/config.xml +7 -11
  14. app/code/community/Briel/ReviewPlus/sql/briel_reviewplus_setup/mysql4-install-0.9.2.php +81 -0
  15. app/code/community/Briel/ReviewPlus/sql/briel_reviewplus_setup/mysql4-install-1.0.0.php +81 -0
  16. app/code/community/Briel/ReviewPlus/sql/briel_reviewplus_setup/mysql4-upgrade-0.9.1-1.0.0.php +81 -0
  17. app/design/adminhtml/default/default/layout/briel_reviewplus.xml +18 -0
  18. app/design/adminhtml/default/default/template/briel_reviewplus/edit.phtml +100 -0
  19. app/design/adminhtml/default/default/template/briel_reviewplus/help.phtml +86 -0
  20. app/design/adminhtml/default/default/template/briel_reviewplus/ordertab.phtml +22 -4
  21. app/design/frontend/base/default/layout/briel_reviewplus.xml +1 -0
  22. app/design/frontend/base/default/template/briel_reviewplus/review.phtml +74 -19
  23. app/locale/en_US/template/email/reviewplus_email.html +0 -35
  24. package.xml +12 -5
  25. skin/frontend/base/default/css/briel_reviewplus.css +36 -0
  26. skin/frontend/base/default/images/reviewplus_email_template/1-star.jpg +0 -0
  27. skin/frontend/base/default/images/reviewplus_email_template/2-stars.jpg +0 -0
  28. skin/frontend/base/default/images/reviewplus_email_template/3-stars.jpg +0 -0
  29. skin/frontend/base/default/images/reviewplus_email_template/4-stars.jpg +0 -0
  30. skin/frontend/base/default/images/reviewplus_email_template/5-stars.jpg +0 -0
  31. skin/frontend/base/default/images/reviewplus_email_template/star.gif +0 -0
app/code/community/Briel/ReviewPlus/Block/Adminhtml/Clientlog/Grid.php CHANGED
@@ -5,68 +5,62 @@ class Briel_ReviewPlus_Block_Adminhtml_Clientlog_Grid extends Mage_Adminhtml_Blo
5
  public function __construct() {
6
  parent::__construct();
7
  $this->setId('clientlog');
8
- $this->setDefaultSort('id');
9
  $this->setDefaultDir('desc');
10
  $this->setSaveParametersInSession(true);
11
  }
12
-
13
  public function getRowUrl($row) {
14
  // return $this->getUrl('reviewplus/edit/index', array('id' => $row->getId()));
15
  }
16
-
17
  protected function _prepareCollection() {
18
  $collection = Mage::getModel('reviewplus/clientlog')->getCollection();
19
  $this->setCollection($collection);
20
  return parent::_prepareCollection();
21
  }
22
-
23
  protected function _prepareColumns() {
24
-
25
  $this->addColumn('id', array(
26
  'header' => Mage::helper('reviewplus')->__('ID'),
27
  'align' =>'right',
28
  'width' =>'50px',
29
  'index' =>'id',
 
30
  ));
31
-
32
  $this->addColumn('order_id', array(
33
- 'header' => Mage::helper('reviewplus')->__('Order Increment ID'),
34
- 'align' =>'right',
35
- 'width' =>'100px',
36
  'index' =>'order_id',
37
  'renderer' =>'Briel_ReviewPlus_Block_Adminhtml_Clientlog_Renderer_Orderid',
38
  ));
39
-
40
- $this->addColumn('customer_name', array(
41
  'header' => Mage::helper('reviewplus')->__('Customer Name'),
42
  'align' =>'left',
43
  'index' =>'customer_name',
44
  'width' =>'250px',
45
  ));
46
-
47
  $this->addColumn('customer_email', array(
48
  'header' => Mage::helper('reviewplus')->__('Customer Email'),
49
  'align' =>'left',
50
  'index' =>'customer_email',
51
  'width' =>'250px',
52
  ));
53
-
54
  $this->addColumn('ordered_products', array(
55
  'header' => Mage::helper('reviewplus')->__('Ordered Product(s)'),
56
  'align' =>'left',
57
  'index' =>'ordered_products',
58
  ));
59
-
60
- $this->addColumn('send_time', array(
61
- 'header' => Mage::helper('reviewplus')->__('Send Time'),
62
  'align' =>'left',
63
- 'index' =>'send_time',
64
  'type' =>'datetime',
65
- 'width' =>'150px',
66
- 'renderer' =>'Briel_ReviewPlus_Block_Adminhtml_Clientlog_Renderer_Sendtime',
67
- 'filter_condition_callback' => array($this, '_datetimeFilter'),
68
  ));
69
-
70
  $this->addColumn('status', array(
71
  'header' => Mage::helper('reviewplus')->__('Status'),
72
  'align' =>'left',
@@ -76,7 +70,15 @@ class Briel_ReviewPlus_Block_Adminhtml_Clientlog_Grid extends Mage_Adminhtml_Blo
76
  'type' =>'options',
77
  'options' => array('0' => 'Not sent', '1' => 'Sent'),
78
  ));
79
-
 
 
 
 
 
 
 
 
80
  return parent::_prepareColumns();
81
  }
82
 
@@ -95,24 +97,53 @@ class Briel_ReviewPlus_Block_Adminhtml_Clientlog_Grid extends Mage_Adminhtml_Blo
95
  ));
96
  return $this;
97
  }
98
-
99
- protected function _datetimeFilter($collection, $column) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
100
  if (!$value = $column->getFilter()->getValue()) {
101
  return $this;
102
  }
103
  if (empty($value['from']) && isset($value['to'])) {
104
  $to = $value['to']->getTimestamp();
105
  $from = mktime(0, 0, 0);
106
- $this->getCollection()->addFieldToFilter('send_time', array('lteq' => $to));
107
  return $this;
108
  } else if (empty($value['to']) && isset($value['from'])) {
109
  $from = $value['from']->getTimestamp();
110
- $this->getCollection()->addFieldToFilter('send_time', array('gteq' => $from));
111
  return $this;
112
  } else {
113
  $from = $value['from']->getTimestamp();
114
  $to = $value['to']->getTimestamp();
115
- $this->getCollection()->addFieldToFilter('send_time', array('from' => $from, 'to' => $to));
116
  return $this;
117
  }
118
  }
5
  public function __construct() {
6
  parent::__construct();
7
  $this->setId('clientlog');
8
+ $this->setDefaultSort('due_date');
9
  $this->setDefaultDir('desc');
10
  $this->setSaveParametersInSession(true);
11
  }
12
+
13
  public function getRowUrl($row) {
14
  // return $this->getUrl('reviewplus/edit/index', array('id' => $row->getId()));
15
  }
16
+
17
  protected function _prepareCollection() {
18
  $collection = Mage::getModel('reviewplus/clientlog')->getCollection();
19
  $this->setCollection($collection);
20
  return parent::_prepareCollection();
21
  }
22
+
23
  protected function _prepareColumns() {
 
24
  $this->addColumn('id', array(
25
  'header' => Mage::helper('reviewplus')->__('ID'),
26
  'align' =>'right',
27
  'width' =>'50px',
28
  'index' =>'id',
29
+ 'filter_condition_callback' => array($this, '_filterId'),
30
  ));
 
31
  $this->addColumn('order_id', array(
32
+ 'header' => Mage::helper('reviewplus')->__('Order #'),
33
+ 'align' =>'left',
34
+ 'width' =>'90px',
35
  'index' =>'order_id',
36
  'renderer' =>'Briel_ReviewPlus_Block_Adminhtml_Clientlog_Renderer_Orderid',
37
  ));
38
+ $this->addColumn('customer_name', array(
 
39
  'header' => Mage::helper('reviewplus')->__('Customer Name'),
40
  'align' =>'left',
41
  'index' =>'customer_name',
42
  'width' =>'250px',
43
  ));
 
44
  $this->addColumn('customer_email', array(
45
  'header' => Mage::helper('reviewplus')->__('Customer Email'),
46
  'align' =>'left',
47
  'index' =>'customer_email',
48
  'width' =>'250px',
49
  ));
 
50
  $this->addColumn('ordered_products', array(
51
  'header' => Mage::helper('reviewplus')->__('Ordered Product(s)'),
52
  'align' =>'left',
53
  'index' =>'ordered_products',
54
  ));
55
+ $this->addColumn('due_date', array(
56
+ 'header' => Mage::helper('reviewplus')->__('Due Date'),
 
57
  'align' =>'left',
58
+ 'index' =>'due_date',
59
  'type' =>'datetime',
60
+ 'width' =>'130px',
61
+ 'renderer' =>'Briel_ReviewPlus_Block_Adminhtml_Clientlog_Renderer_DueDate',
62
+ 'filter_condition_callback' => array($this, '_datetimeFilterDueDate'),
63
  ));
 
64
  $this->addColumn('status', array(
65
  'header' => Mage::helper('reviewplus')->__('Status'),
66
  'align' =>'left',
70
  'type' =>'options',
71
  'options' => array('0' => 'Not sent', '1' => 'Sent'),
72
  ));
73
+ $this->addColumn('time_sent', array(
74
+ 'header' => Mage::helper('reviewplus')->__('Sent On'),
75
+ 'align' =>'left',
76
+ 'index' =>'time_sent',
77
+ 'type' =>'datetime',
78
+ 'width' =>'150px',
79
+ 'renderer' =>'Briel_ReviewPlus_Block_Adminhtml_Clientlog_Renderer_TimeSent',
80
+ 'filter_condition_callback' => array($this, '_datetimeFilterTimeSent'),
81
+ ));
82
  return parent::_prepareColumns();
83
  }
84
 
97
  ));
98
  return $this;
99
  }
100
+
101
+ protected function _filterId($collection, $column) {
102
+ if (!$value = $column->getFilter()->getValue()) {
103
+ return $this;
104
+ }
105
+ $this->getCollection()->addFieldToFilter('id', array('eq' => $value));
106
+ return $this;
107
+ }
108
+
109
+ protected function _datetimeFilterDueDate($collection, $column) {
110
+ if (!$value = $column->getFilter()->getValue()) {
111
+ return $this;
112
+ }
113
+ if (empty($value['from']) && isset($value['to'])) {
114
+ $to = $value['to']->getTimestamp();
115
+ $from = mktime(0, 0, 0);
116
+ $this->getCollection()->addFieldToFilter('due_date', array('lteq' => $to));
117
+ return $this;
118
+ } else if (empty($value['to']) && isset($value['from'])) {
119
+ $from = $value['from']->getTimestamp();
120
+ $this->getCollection()->addFieldToFilter('due_date', array('gteq' => $from));
121
+ return $this;
122
+ } else {
123
+ $from = $value['from']->getTimestamp();
124
+ $to = $value['to']->getTimestamp();
125
+ $this->getCollection()->addFieldToFilter('due_date', array('from' => $from, 'to' => $to));
126
+ return $this;
127
+ }
128
+ }
129
+
130
+ protected function _datetimeFilterTimeSent($collection, $column) {
131
  if (!$value = $column->getFilter()->getValue()) {
132
  return $this;
133
  }
134
  if (empty($value['from']) && isset($value['to'])) {
135
  $to = $value['to']->getTimestamp();
136
  $from = mktime(0, 0, 0);
137
+ $this->getCollection()->addFieldToFilter('time_sent', array('lteq' => $to));
138
  return $this;
139
  } else if (empty($value['to']) && isset($value['from'])) {
140
  $from = $value['from']->getTimestamp();
141
+ $this->getCollection()->addFieldToFilter('time_sent', array('gteq' => $from));
142
  return $this;
143
  } else {
144
  $from = $value['from']->getTimestamp();
145
  $to = $value['to']->getTimestamp();
146
+ $this->getCollection()->addFieldToFilter('time_sent', array('from' => $from, 'to' => $to));
147
  return $this;
148
  }
149
  }
app/code/community/Briel/ReviewPlus/Block/Adminhtml/Clientlog/Renderer/DueDate.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Briel_ReviewPlus_Block_Adminhtml_Clientlog_Renderer_DueDate extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract {
4
+
5
+ public function render(Varien_Object $row) {
6
+ $value = $row->getData($this->getColumn()->getIndex());
7
+ return date('F j, Y', $value);
8
+ }
9
+ }
10
+ ?>
app/code/community/Briel/ReviewPlus/Block/Adminhtml/Clientlog/Renderer/Orderid.php CHANGED
@@ -1,12 +1,11 @@
1
  <?php
2
 
3
  class Briel_ReviewPlus_Block_Adminhtml_Clientlog_Renderer_Orderid extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract {
4
-
5
  public function render(Varien_Object $row) {
6
  $value = $row->getData($this->getColumn()->getIndex());
7
  $order_db = Mage::getModel('sales/order')->load($value);
8
- $increment_id = $order_db->getIncrementId();
9
- return $increment_id;
10
  }
11
  }
12
  ?>
1
  <?php
2
 
3
  class Briel_ReviewPlus_Block_Adminhtml_Clientlog_Renderer_Orderid extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract {
4
+
5
  public function render(Varien_Object $row) {
6
  $value = $row->getData($this->getColumn()->getIndex());
7
  $order_db = Mage::getModel('sales/order')->load($value);
8
+ return '<a style="color: ##ea7601;" href="' . $this->getUrl('adminhtml/sales_order/view', array('order_id' => $value)) . '"><strong>' . $order_db->getIncrementId() . '</strong></a>';
 
9
  }
10
  }
11
  ?>
app/code/community/Briel/ReviewPlus/Block/Adminhtml/Clientlog/Renderer/TimeSent.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Briel_ReviewPlus_Block_Adminhtml_Clientlog_Renderer_TimeSent extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract {
4
+
5
+ public function render(Varien_Object $row) {
6
+ $value = $row->getData($this->getColumn()->getIndex());
7
+ if ($value == 0) {
8
+ return '<strong>-</strong>';
9
+ } else {
10
+ return date('F j, Y - H:i', $value);
11
+ }
12
+ }
13
+ }
14
+ ?>
app/code/community/Briel/ReviewPlus/Block/Adminhtml/Reviews/Grid.php CHANGED
@@ -1,19 +1,19 @@
1
  <?php
2
 
3
  class Briel_ReviewPlus_Block_Adminhtml_Reviews_Grid extends Mage_Adminhtml_Block_Widget_Grid {
4
-
5
  public function __construct() {
6
  parent::__construct();
7
  $this->setId('product_reviews');
8
- $this->setDefaultSort('id');
9
  $this->setDefaultDir('desc');
10
  $this->setSaveParametersInSession(true);
11
  }
12
-
13
  public function getRowUrl($row) {
14
- // return $this->getUrl('reviewplus/edit/index', array('id' => $row->getId()));
15
  }
16
-
17
  protected function _prepareCollection() {
18
  $collection = Mage::getModel('reviewplus/reviews')->getCollection();
19
  $this->setCollection($collection);
@@ -26,34 +26,28 @@ class Briel_ReviewPlus_Block_Adminhtml_Reviews_Grid extends Mage_Adminhtml_Block
26
  'align' =>'right',
27
  'width' =>'50px',
28
  'index' =>'id',
 
29
  ));
30
-
31
- $this->addColumn('customer_name', array(
32
- 'header' => Mage::helper('reviewplus')->__('Customer Name'),
33
  'align' =>'left',
34
- 'index' =>'customer_name',
35
- 'width' =>'200px',
36
- ));
37
-
38
- $this->addColumn('customer_email', array(
39
- 'header' => Mage::helper('reviewplus')->__('Customer Email'),
40
- 'align' =>'left',
41
- 'index' =>'customer_email',
42
- 'width' =>'200px',
43
  ));
44
-
45
  $this->addColumn('product_sku', array(
46
  'header' => Mage::helper('reviewplus')->__('Ordered Product(s)'),
47
  'align' =>'left',
48
  'index' =>'product_sku',
49
  ));
50
-
51
  $this->addColumn('product_review', array(
52
  'header' => Mage::helper('reviewplus')->__('Review'),
53
  'align' =>'left',
54
  'index' =>'product_review',
 
55
  ));
56
-
57
  $this->addColumn('product_rating', array(
58
  'header' => Mage::helper('reviewplus')->__('Rating'),
59
  'align' =>'left',
@@ -63,7 +57,18 @@ class Briel_ReviewPlus_Block_Adminhtml_Reviews_Grid extends Mage_Adminhtml_Block
63
  'type' =>'options',
64
  'options' => array('1' => '1 Star', '2' => '2 Stars', '3' => '3 Stars', '4' => '4 Stars', '5' => '5 Stars'),
65
  ));
66
-
 
 
 
 
 
 
 
 
 
 
 
67
  $this->addColumn('review_status', array(
68
  'header' => Mage::helper('reviewplus')->__('Review status'),
69
  'align' =>'left',
@@ -72,7 +77,15 @@ class Briel_ReviewPlus_Block_Adminhtml_Reviews_Grid extends Mage_Adminhtml_Block
72
  'type' =>'options',
73
  'options' => array('approved' => 'Approved', 'pending' => 'Pending'),
74
  ));
75
-
 
 
 
 
 
 
 
 
76
  return parent::_prepareColumns();
77
  }
78
 
@@ -80,16 +93,45 @@ class Briel_ReviewPlus_Block_Adminhtml_Reviews_Grid extends Mage_Adminhtml_Block
80
  $this->setMassactionIdField('id');
81
  $this->getMassactionBlock()->setFormFieldName('review_id');
82
  $this->getMassactionBlock()->addItem('delete', array(
83
- 'label' => Mage::helper('reviewplus')->__('Delete'),
84
  'url' => $this->getUrl('*/*/massdelete', array('' => '')),
85
  'confirm' => Mage::helper('reviewplus')->__('Are you sure?')
86
  ));
87
  $this->getMassActionBlock()->addItem('approve', array(
88
- 'label' => Mage::helper('reviewplus')->__('Approve'),
89
  'url' => $this->getUrl('*/*/massapprove', array('' => '')),
90
  'confirm' => Mage::helper('reviewplus')->__('Approve ratings?')
91
  ));
92
  return $this;
93
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  }
95
  ?>
1
  <?php
2
 
3
  class Briel_ReviewPlus_Block_Adminhtml_Reviews_Grid extends Mage_Adminhtml_Block_Widget_Grid {
4
+
5
  public function __construct() {
6
  parent::__construct();
7
  $this->setId('product_reviews');
8
+ $this->setDefaultSort('posted_time');
9
  $this->setDefaultDir('desc');
10
  $this->setSaveParametersInSession(true);
11
  }
12
+
13
  public function getRowUrl($row) {
14
+ // return $this->getUrl('adminhtml/reviews/edit', array('id' => $row->getId()));
15
  }
16
+
17
  protected function _prepareCollection() {
18
  $collection = Mage::getModel('reviewplus/reviews')->getCollection();
19
  $this->setCollection($collection);
26
  'align' =>'right',
27
  'width' =>'50px',
28
  'index' =>'id',
29
+ 'filter_condition_callback' => array($this, '_filterId'),
30
  ));
31
+ $this->addColumn('posted_time', array(
32
+ 'header' => Mage::helper('reviewplus')->__('Posted On'),
 
33
  'align' =>'left',
34
+ 'index' =>'posted_time',
35
+ 'type' =>'datetime',
36
+ 'width' =>'150px',
37
+ 'renderer' =>'Briel_ReviewPlus_Block_Adminhtml_Reviews_Renderer_PostedTime',
38
+ 'filter_condition_callback' => array($this, '_datetimeFilterPostedOn'),
 
 
 
 
39
  ));
 
40
  $this->addColumn('product_sku', array(
41
  'header' => Mage::helper('reviewplus')->__('Ordered Product(s)'),
42
  'align' =>'left',
43
  'index' =>'product_sku',
44
  ));
 
45
  $this->addColumn('product_review', array(
46
  'header' => Mage::helper('reviewplus')->__('Review'),
47
  'align' =>'left',
48
  'index' =>'product_review',
49
+ 'filter' => false,
50
  ));
 
51
  $this->addColumn('product_rating', array(
52
  'header' => Mage::helper('reviewplus')->__('Rating'),
53
  'align' =>'left',
57
  'type' =>'options',
58
  'options' => array('1' => '1 Star', '2' => '2 Stars', '3' => '3 Stars', '4' => '4 Stars', '5' => '5 Stars'),
59
  ));
60
+ $this->addColumn('customer_name', array(
61
+ 'header' => Mage::helper('reviewplus')->__('Customer Name'),
62
+ 'align' =>'left',
63
+ 'index' =>'customer_name',
64
+ 'width' =>'200px',
65
+ ));
66
+ /*$this->addColumn('customer_email', array(
67
+ 'header' => Mage::helper('reviewplus')->__('Customer Email'),
68
+ 'align' =>'left',
69
+ 'index' =>'customer_email',
70
+ 'width' =>'200px',
71
+ ));*/
72
  $this->addColumn('review_status', array(
73
  'header' => Mage::helper('reviewplus')->__('Review status'),
74
  'align' =>'left',
77
  'type' =>'options',
78
  'options' => array('approved' => 'Approved', 'pending' => 'Pending'),
79
  ));
80
+ $this->addColumn('edit_action', array(
81
+ 'header' =>Mage::helper('reviewplus')->__('Action'),
82
+ 'index' =>'id',
83
+ 'width' =>'50px',
84
+ 'align' =>'center',
85
+ 'filter' => false,
86
+ 'sortable' => false,
87
+ 'renderer' =>'Briel_ReviewPlus_Block_Adminhtml_Reviews_Renderer_EditAction',
88
+ ));
89
  return parent::_prepareColumns();
90
  }
91
 
93
  $this->setMassactionIdField('id');
94
  $this->getMassactionBlock()->setFormFieldName('review_id');
95
  $this->getMassactionBlock()->addItem('delete', array(
96
+ 'label' => Mage::helper('reviewplus')->__('Delete Review'),
97
  'url' => $this->getUrl('*/*/massdelete', array('' => '')),
98
  'confirm' => Mage::helper('reviewplus')->__('Are you sure?')
99
  ));
100
  $this->getMassActionBlock()->addItem('approve', array(
101
+ 'label' => Mage::helper('reviewplus')->__('Approve Review'),
102
  'url' => $this->getUrl('*/*/massapprove', array('' => '')),
103
  'confirm' => Mage::helper('reviewplus')->__('Approve ratings?')
104
  ));
105
  return $this;
106
  }
107
+
108
+ protected function _filterId($collection, $column) {
109
+ if (!$value = $column->getFilter()->getValue()) {
110
+ return $this;
111
+ }
112
+ $this->getCollection()->addFieldToFilter('id', array('eq' => $value));
113
+ return $this;
114
+ }
115
+
116
+ protected function _datetimeFilterPostedOn($collection, $column) {
117
+ if (!$value = $column->getFilter()->getValue()) {
118
+ return $this;
119
+ }
120
+ if (empty($value['from']) && isset($value['to'])) {
121
+ $to = $value['to']->getTimestamp();
122
+ $from = mktime(0, 0, 0);
123
+ $this->getCollection()->addFieldToFilter('posted_time', array('lteq' => $to));
124
+ return $this;
125
+ } else if (empty($value['to']) && isset($value['from'])) {
126
+ $from = $value['from']->getTimestamp();
127
+ $this->getCollection()->addFieldToFilter('posted_time', array('gteq' => $from));
128
+ return $this;
129
+ } else {
130
+ $from = $value['from']->getTimestamp();
131
+ $to = $value['to']->getTimestamp();
132
+ $this->getCollection()->addFieldToFilter('posted_time', array('from' => $from, 'to' => $to));
133
+ return $this;
134
+ }
135
+ }
136
  }
137
  ?>
app/code/community/Briel/ReviewPlus/Block/Adminhtml/Reviews/Renderer/EditAction.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Briel_ReviewPlus_Block_Adminhtml_Reviews_Renderer_EditAction extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract {
4
+
5
+ public function render(Varien_Object $row) {
6
+ $value = (int)$row->getData($this->getColumn()->getIndex());
7
+ $reviewplus_db = Mage::getModel('reviewplus/reviews')->load($value);
8
+ $status = $reviewplus_db->getData('review_status');
9
+ if ($status == 'pending') {
10
+ return '<a href="' . $this->getUrl('adminhtml/reviews/edit', array('id' => $value)) . '">' . '<strong>Edit</strong>' . '</a>';
11
+ } else {
12
+ return "-";
13
+ }
14
+ }
15
+ }
16
+ ?>
app/code/community/Briel/ReviewPlus/Block/Adminhtml/Reviews/Renderer/PostedTime.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Briel_ReviewPlus_Block_Adminhtml_Reviews_Renderer_PostedTime extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract {
4
+
5
+ public function render(Varien_Object $row) {
6
+ $value = $row->getData($this->getColumn()->getIndex());
7
+ if ($value == 0) {
8
+ return '<strong>-</strong>';
9
+ } else {
10
+ return date('F j, Y - H:i', $value);
11
+ }
12
+ }
13
+ }
14
+ ?>
app/code/community/Briel/ReviewPlus/Model/Observer.php CHANGED
@@ -2,8 +2,7 @@
2
 
3
  class Briel_ReviewPlus_Model_Observer {
4
 
5
- // Observer model class version 0.9.1
6
-
7
  public function logClients($observer) {
8
  // set timezone
9
  date_default_timezone_set(Mage::getStoreConfig('general/locale/timezone', Mage::app()->getStore()));
@@ -21,11 +20,34 @@ class Briel_ReviewPlus_Model_Observer {
21
  $order = Mage::getModel('sales/order')->load($order_id);
22
  $increment_id = $order->getIncrementId();
23
  $customer_name = $order->getCustomerName();
 
 
 
 
 
24
  $customer_email = $order->getCustomerEmail();
25
  $ordered_products_collection = $order->getAllItems();
26
  $ordered_products = array();
27
  foreach($ordered_products_collection as $ordered_prod) {
28
- $ordered_products[] = $ordered_prod->getSku();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  }
30
  $ordered_products = implode(", ", $ordered_products);
31
  // if collection is empty LOG new data
@@ -40,11 +62,12 @@ class Briel_ReviewPlus_Model_Observer {
40
  $clientlog_db->setData('customer_email', $customer_email)->save();
41
  $clientlog_db->setData('ordered_products', $ordered_products)->save();
42
  $clientlog_db->setData('status', 0)->save();
 
43
  // calculate send time and save timestamp
44
  $days_delay_config = Mage::getStoreConfig('reviewplus_options/reviewplus_config/days_delay', Mage::app()->getStore());
45
  $days_delay = (24 * 60 * 60) * (int)$days_delay_config;
46
  $timestamp = time() + $days_delay;
47
- $clientlog_db->setData('send_time', $timestamp)->save();
48
  } // end collection count IF
49
  } // end of STATUS IF
50
  } // end of IF ENABLED
@@ -107,6 +130,7 @@ class Briel_ReviewPlus_Model_Observer {
107
  $store_id = Mage::app()->getStore()->getId();
108
  // set status as SENT on followup entry
109
  $clientlog_db->setData('status', 1)->save();
 
110
  // send transactional, will not send if template has no subject
111
  $mail = Mage::getModel('core/email_template');
112
  // send Bcc if config is set
2
 
3
  class Briel_ReviewPlus_Model_Observer {
4
 
5
+ // Observer model class version 1.0.0
 
6
  public function logClients($observer) {
7
  // set timezone
8
  date_default_timezone_set(Mage::getStoreConfig('general/locale/timezone', Mage::app()->getStore()));
20
  $order = Mage::getModel('sales/order')->load($order_id);
21
  $increment_id = $order->getIncrementId();
22
  $customer_name = $order->getCustomerName();
23
+ if ($customer_name == 'Guest') {
24
+ $billing_address_id = $order->getBillingAddressId();
25
+ $order_address = Mage::getModel('sales/order_address')->load($billing_address_id);
26
+ $customer_name = $order_address->getName();
27
+ }
28
  $customer_email = $order->getCustomerEmail();
29
  $ordered_products_collection = $order->getAllItems();
30
  $ordered_products = array();
31
  foreach($ordered_products_collection as $ordered_prod) {
32
+ $tmp_sku = $ordered_prod->getSku();
33
+ $_prod = Mage::getModel('catalog/product')->loadByAttribute('sku', array('eq' => $sku));
34
+ if ($_prod->getTypeId() == "simple") {
35
+ $parentIds = Mage::getModel('catalog/product_type_grouped')->getParentIdsByChild($_prod->getId());
36
+ if (!$parentIds) {
37
+ $parentIds = Mage::getModel('catalog/product_type_configurable')->getParentIdsByChild($_prod->getId());
38
+ }
39
+ if (isset($parentIds[0])) {
40
+ $parent = Mage::getModel('catalog/product')->load($parentIds[0]);
41
+ $parent_sku = $parent->getSku();
42
+ if (!in_array($parent_sku, $ordered_products)) {
43
+ $ordered_products[] = $parent_sku;
44
+ }
45
+ } else {
46
+ if (!in_array($sku, $ordered_products)) {
47
+ $ordered_products[] = $sku;
48
+ }
49
+ }
50
+ } // end of product TYPE IF
51
  }
52
  $ordered_products = implode(", ", $ordered_products);
53
  // if collection is empty LOG new data
62
  $clientlog_db->setData('customer_email', $customer_email)->save();
63
  $clientlog_db->setData('ordered_products', $ordered_products)->save();
64
  $clientlog_db->setData('status', 0)->save();
65
+ $clientlog_db->setData('time_sent', 0)->save();
66
  // calculate send time and save timestamp
67
  $days_delay_config = Mage::getStoreConfig('reviewplus_options/reviewplus_config/days_delay', Mage::app()->getStore());
68
  $days_delay = (24 * 60 * 60) * (int)$days_delay_config;
69
  $timestamp = time() + $days_delay;
70
+ $clientlog_db->setData('due_date', $timestamp)->save();
71
  } // end collection count IF
72
  } // end of STATUS IF
73
  } // end of IF ENABLED
130
  $store_id = Mage::app()->getStore()->getId();
131
  // set status as SENT on followup entry
132
  $clientlog_db->setData('status', 1)->save();
133
+ $clientlog_db->setData('time_sent', time())->save();
134
  // send transactional, will not send if template has no subject
135
  $mail = Mage::getModel('core/email_template');
136
  // send Bcc if config is set
app/code/community/Briel/ReviewPlus/controllers/Adminhtml/ClientlogController.php CHANGED
@@ -1,12 +1,13 @@
1
  <?php
2
 
3
  class Briel_ReviewPlus_Adminhtml_ClientlogController extends Mage_Adminhtml_Controller_Action {
4
-
5
  public function indexAction() {
6
  $this->loadLayout();
 
7
  $this->renderLayout();
8
  }
9
-
10
  public function massdeleteAction() {
11
  $post = $this->getRequest()->getPost();
12
  $clientlog_ids = $post['clientlog_id'];
@@ -25,7 +26,7 @@ class Briel_ReviewPlus_Adminhtml_ClientlogController extends Mage_Adminhtml_Cont
25
  }
26
  $this->_redirect('*/*/index');
27
  }
28
-
29
  public function masssendAction() {
30
  $post = $this->getRequest()->getPost();
31
  $clientlog_ids = $post['clientlog_id'];
@@ -68,6 +69,7 @@ class Briel_ReviewPlus_Adminhtml_ClientlogController extends Mage_Adminhtml_Cont
68
  $store_id = Mage::app()->getStore()->getId();
69
  // set status as SENT on followup entry
70
  $clientlog_db->setData('status', 1)->save();
 
71
  // send transactional, will not send if template has no subject
72
  $mail = Mage::getModel('core/email_template');
73
  $config_bcc = Mage::getStoreConfig('reviewplus_options/reviewplus_config/bcc_email', Mage::app()->getStore()->getId());
1
  <?php
2
 
3
  class Briel_ReviewPlus_Adminhtml_ClientlogController extends Mage_Adminhtml_Controller_Action {
4
+
5
  public function indexAction() {
6
  $this->loadLayout();
7
+ $this->_setActiveMenu('reviewplus_menu');
8
  $this->renderLayout();
9
  }
10
+
11
  public function massdeleteAction() {
12
  $post = $this->getRequest()->getPost();
13
  $clientlog_ids = $post['clientlog_id'];
26
  }
27
  $this->_redirect('*/*/index');
28
  }
29
+
30
  public function masssendAction() {
31
  $post = $this->getRequest()->getPost();
32
  $clientlog_ids = $post['clientlog_id'];
69
  $store_id = Mage::app()->getStore()->getId();
70
  // set status as SENT on followup entry
71
  $clientlog_db->setData('status', 1)->save();
72
+ $clientlog_db->setData('time_sent', time())->save();
73
  // send transactional, will not send if template has no subject
74
  $mail = Mage::getModel('core/email_template');
75
  $config_bcc = Mage::getStoreConfig('reviewplus_options/reviewplus_config/bcc_email', Mage::app()->getStore()->getId());
app/code/community/Briel/ReviewPlus/controllers/Adminhtml/OrdertabController.php CHANGED
@@ -11,8 +11,9 @@ class Briel_ReviewPlus_Adminhtml_OrdertabController extends Mage_Adminhtml_Contr
11
  $clientlog_db->setData('customer_name', $post['reviewplus-lognow']['customer_name'])->save();
12
  $clientlog_db->setData('customer_email', $post['reviewplus-lognow']['customer_email'])->save();
13
  $clientlog_db->setData('ordered_products', $post['reviewplus-lognow']['ordered_products'])->save();
14
- $clientlog_db->setData('send_time', time())->save();
15
  $clientlog_db->setData('status', 0)->save();
 
16
  // success message
17
  $success_msg = $this->__('Order successfully logged. The client will receive a product review followup email as per extension settings.');
18
  Mage::getSingleton('adminhtml/session')->addSuccess($success_msg);
11
  $clientlog_db->setData('customer_name', $post['reviewplus-lognow']['customer_name'])->save();
12
  $clientlog_db->setData('customer_email', $post['reviewplus-lognow']['customer_email'])->save();
13
  $clientlog_db->setData('ordered_products', $post['reviewplus-lognow']['ordered_products'])->save();
14
+ $clientlog_db->setData('due_date', time())->save();
15
  $clientlog_db->setData('status', 0)->save();
16
+ $clientlog_db->setData('time_sent', 0)->save();
17
  // success message
18
  $success_msg = $this->__('Order successfully logged. The client will receive a product review followup email as per extension settings.');
19
  Mage::getSingleton('adminhtml/session')->addSuccess($success_msg);
app/code/community/Briel/ReviewPlus/controllers/Adminhtml/ReviewsController.php CHANGED
@@ -4,6 +4,19 @@ class Briel_ReviewPlus_Adminhtml_ReviewsController extends Mage_Adminhtml_Contro
4
 
5
  public function indexAction() {
6
  $this->loadLayout();
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  $this->renderLayout();
8
  }
9
 
@@ -25,6 +38,25 @@ class Briel_ReviewPlus_Adminhtml_ReviewsController extends Mage_Adminhtml_Contro
25
  }
26
  $this->_redirect('*/*/index');
27
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
 
29
  public function massapproveAction() {
30
  $post = $this->getRequest()->getPost();
@@ -37,6 +69,7 @@ class Briel_ReviewPlus_Adminhtml_ReviewsController extends Mage_Adminhtml_Contro
37
  // compile review data array
38
  $reviewplus_reviews_db = Mage::getModel('reviewplus/reviews')->load($id);
39
  $nickname = $reviewplus_reviews_db->getData('customer_name');
 
40
  $detail = $reviewplus_reviews_db->getData('product_review');
41
  $rtng = $reviewplus_reviews_db->getData('product_rating');
42
  $sku = $reviewplus_reviews_db->getData('product_sku');
@@ -62,10 +95,10 @@ class Briel_ReviewPlus_Adminhtml_ReviewsController extends Mage_Adminhtml_Contro
62
  $rating[$rating_option->getId()] = $rtng;
63
  }
64
  $review_data = array(
65
- 'ratings' => $rating,
66
- 'validate_rating' => '',
67
- 'nickname' => $nickname,
68
- 'title' => '',
69
  'detail' => $detail
70
  );
71
  $review_db = Mage::getModel('review/review')->setData($review_data);
4
 
5
  public function indexAction() {
6
  $this->loadLayout();
7
+ $this->_setActiveMenu('reviewplus_menu');
8
+ $this->renderLayout();
9
+ }
10
+
11
+ public function helpAction() {
12
+ $this->loadLayout();
13
+ $this->_setActiveMenu('reviewplus_menu');
14
+ $this->renderLayout();
15
+ }
16
+
17
+ public function editAction() {
18
+ $this->loadLayout();
19
+ $this->_setActiveMenu('reviewplus_menu');
20
  $this->renderLayout();
21
  }
22
 
38
  }
39
  $this->_redirect('*/*/index');
40
  }
41
+
42
+ public function saveAction() {
43
+ $post = $this->getRequest()->getPost();
44
+ $id = $post['reviewplus_id'];
45
+ $session = Mage::getSingleton('adminhtml/session');
46
+ try {
47
+ $reviews_db = Mage::getModel('reviewplus/reviews')->load($id);
48
+ $reviews_db->setData('product_rating', $post['edit']['rating'])->save();
49
+ $reviews_db->setData('customer_name', $post['edit']['name'])->save();
50
+ $reviews_db->setData('customer_email', $post['edit']['email'])->save();
51
+ $reviews_db->setData('product_review_title', $post['edit']['title'])->save();
52
+ $reviews_db->setData('product_review', $post['edit']['detail'])->save();
53
+ // success message
54
+ $session->addSuccess($this->__('Review edited successfully'));
55
+ } catch(Exception $ex) {
56
+ $session->addError($ex->getMessage());
57
+ }
58
+ $this->_redirect('*/*/index');
59
+ }
60
 
61
  public function massapproveAction() {
62
  $post = $this->getRequest()->getPost();
69
  // compile review data array
70
  $reviewplus_reviews_db = Mage::getModel('reviewplus/reviews')->load($id);
71
  $nickname = $reviewplus_reviews_db->getData('customer_name');
72
+ $title = $reviewplus_reviews_db->getData('product_review_title');
73
  $detail = $reviewplus_reviews_db->getData('product_review');
74
  $rtng = $reviewplus_reviews_db->getData('product_rating');
75
  $sku = $reviewplus_reviews_db->getData('product_sku');
95
  $rating[$rating_option->getId()] = $rtng;
96
  }
97
  $review_data = array(
98
+ 'ratings' => $rating ,
99
+ 'validate_rating' => '' ,
100
+ 'nickname' => $nickname ,
101
+ 'title' => $title ,
102
  'detail' => $detail
103
  );
104
  $review_db = Mage::getModel('review/review')->setData($review_data);
app/code/community/Briel/ReviewPlus/controllers/IndexController.php CHANGED
@@ -10,53 +10,20 @@ class Briel_ReviewPlus_IndexController extends Mage_Core_Controller_Front_Action
10
  public function rateAction() {
11
  $post = $this->getRequest()->getPost();
12
  $skus = $post['sku'];
13
- foreach($skus as $sku) {
14
- // write details to REVIEWPLUS_REVIEWS table
15
- $reviews_db = Mage::getModel('reviewplus/reviews')->load($post['rating-id'][$sku]);
16
- $reviews_db->setData('product_review', $post['detail'][$sku])->save();
17
- } // end sku FOREACH
18
- $this->_redirect('/');
19
- } // end of method
20
-
21
-
22
- /*public function oldrateAction() {
23
- $post = $this->getRequest()->getPost();
24
- $skus = $post['sku'];
25
- foreach($skus as $sku) {
26
- // write data to REVIEWPLUS_REVIEWS table
27
- $reviews_db = Mage::getModel('reviewplus/reviews')->load($post['rating-id'][$sku]);
28
- $reviews_db->setData('product_review', $post['detail'][$sku])->save();
29
- // shape $rating into acceptable form
30
- $rating = array("1" => $post['rating'][$sku], "2" => $post['rating'][$sku], "3" => $post['rating'][$sku]);
31
- // write data to MAGENTO REVIEWS table; will appear on product reviews grid for approval
32
- $review_data = array('ratings' => array("1" => $post['rating'][$sku], "2" => $post['rating'][$sku], "3" => $post['rating'][$sku]), 'validate_rating' => '', 'nickname' => $post['nickname'][$sku], 'title' => $post['title'][$sku], 'detail' => $post['detail'][$sku]);
33
- if (!empty($review_data)) {
34
- $review_db = Mage::getModel('review/review')->setData($review_data);
35
- $validate = $review_db->validate();
36
- if ($validate === true) {
37
- try {
38
- $review_db->setEntityId($review_db->getEntityIdByCode(Mage_Review_Model_Review::ENTITY_PRODUCT_CODE))
39
- ->setEntityPkValue($post['product-id'][$sku])
40
- ->setStatusId(Mage_Review_Model_Review::STATUS_PENDING)
41
- ->setCustomerId(Mage::getSingleton('customer/session')->getCustomerId())
42
- ->setStoreId(Mage::app()->getStore()->getId())
43
- ->setStores(array(Mage::app()->getStore()->getId()))
44
- ->save();
45
- foreach ($rating as $rating_id => $option_id) {
46
- Mage::getModel('rating/rating')->setRatingId($rating_id)
47
- ->setReviewId($review_db->getId())
48
- ->setCustomerId(Mage::getSingleton('customer/session')->getCustomerId())
49
- ->addOptionVote($option_id, $post['product-id'][$sku]);
50
- }
51
- $review_db->aggregate();
52
- } catch (Exception $e) {
53
- $session = Mage::getSingleton('core/session');
54
- $session->addError($this->__('Unable to post the review.'));
55
- }
56
- }
57
  }
 
 
 
58
  }
59
- $this->_redirect('');
60
- }*/
61
  }
62
  ?>
10
  public function rateAction() {
11
  $post = $this->getRequest()->getPost();
12
  $skus = $post['sku'];
13
+ try {
14
+ // write details to REVIEWPLUS_REVIEWS table, create entry for each SKU
15
+ foreach($skus as $sku) {
16
+ $reviews_db = Mage::getModel('reviewplus/reviews')->load($post['rating-id'][$sku]);
17
+ $reviews_db->setData('product_review_title', $post['title'][$sku])->save();
18
+ $reviews_db->setData('product_review', $post['detail'][$sku])->save();
19
+ $reviews_db->setData('product_rating', $post['rating'][$sku])->save();
20
+ $reviews_db->setData('posted_time', time())->save();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  }
22
+ // $session->addSuccess($this->__('Evaluarea dumneavoastra a fost inregistrata. Va multumim pentru timpul acordat!'));
23
+ } catch(Exception $e) {
24
+ // $session->addError($e->getMessage());
25
  }
26
+ $this->_redirect('/');
27
+ } // end of method
28
  }
29
  ?>
app/code/community/Briel/ReviewPlus/etc/config.xml CHANGED
@@ -3,7 +3,7 @@
3
  <config>
4
  <modules>
5
  <Briel_ReviewPlus>
6
- <version>0.9.1</version>
7
  </Briel_ReviewPlus>
8
  </modules>
9
  <admin>
@@ -33,9 +33,14 @@
33
  <sort_order>20</sort_order>
34
  <action>adminhtml/reviews/index</action>
35
  </reviewplus_submenu2>
 
 
 
 
 
36
  <reviewplus_options translate="title" module="reviewplus">
37
  <title>Settings</title>
38
- <sort_order>30</sort_order>
39
  <action>adminhtml/system_config/edit/section/reviewplus_options</action>
40
  </reviewplus_options>
41
  </children>
@@ -164,15 +169,6 @@
164
  </observers>
165
  </sales_order_save_after>
166
  </events>
167
- <template> <!--EMAIL-TEMPLATE-->
168
- <email>
169
- <reviewplus_options_reviewplus_config_email_template>
170
- <label>ReviewPlus Email Template</label>
171
- <file>reviewplus_email.html</file>
172
- <type>html</type>
173
- </reviewplus_options_reviewplus_config_email_template>
174
- </email>
175
- </template>
176
  </global>
177
  <crontab> <!--EMAIL-CRONJOB-->
178
  <jobs>
3
  <config>
4
  <modules>
5
  <Briel_ReviewPlus>
6
+ <version>1.0.0</version>
7
  </Briel_ReviewPlus>
8
  </modules>
9
  <admin>
33
  <sort_order>20</sort_order>
34
  <action>adminhtml/reviews/index</action>
35
  </reviewplus_submenu2>
36
+ <reviewplus_help translate="title" module="reviewplus">
37
+ <title>Help</title>
38
+ <sort_order>30</sort_order>
39
+ <action>adminhtml/reviews/help</action>
40
+ </reviewplus_help>
41
  <reviewplus_options translate="title" module="reviewplus">
42
  <title>Settings</title>
43
+ <sort_order>40</sort_order>
44
  <action>adminhtml/system_config/edit/section/reviewplus_options</action>
45
  </reviewplus_options>
46
  </children>
169
  </observers>
170
  </sales_order_save_after>
171
  </events>
 
 
 
 
 
 
 
 
 
172
  </global>
173
  <crontab> <!--EMAIL-CRONJOB-->
174
  <jobs>
app/code/community/Briel/ReviewPlus/sql/briel_reviewplus_setup/mysql4-install-0.9.2.php ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $installer = $this;
3
+ $installer->startSetup();
4
+
5
+ $installer->run("
6
+ DROP TABLE IF EXISTS {$this->getTable('reviewplus_clientlog')};
7
+ CREATE TABLE IF NOT EXISTS {$this->getTable('reviewplus_clientlog')} (
8
+ `id` int(12) unsigned NOT NULL auto_increment,
9
+ `enable` tinyint(1) NOT NULL ,
10
+ `order_id` int(12) NOT NULL ,
11
+ `customer_name` varchar(255) NOT NULL ,
12
+ `customer_email` varchar(255) NOT NULL ,
13
+ `ordered_products` varchar(255) NOT NULL ,
14
+ `due_date` int(16) NOT NULL ,
15
+ `status` tinyint(1) NOT NULL ,
16
+ `time_sent` int(16) NOT NULL ,
17
+ PRIMARY KEY(`id`)
18
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
19
+
20
+ DROP TABLE IF EXISTS {$this->getTable('reviewplus_reviews')};
21
+ CREATE TABLE IF NOT EXISTS {$this->getTable('reviewplus_reviews')} (
22
+ `id` int(12) unsigned NOT NULL auto_increment,
23
+ `order_id` int(12) NOT NULL ,
24
+ `product_sku` varchar(255) NOT NULL ,
25
+ `customer_name` varchar(255) NOT NULL ,
26
+ `customer_email` varchar(255) NULL ,
27
+ `product_rating` tinyint(1) NOT NULL ,
28
+ `product_review_title` varchar(255) NOT NULL ,
29
+ `product_review` text NOT NULL ,
30
+ `review_status` varchar(100) NOT NULL ,
31
+ `store_id` int(3) NOT NULL ,
32
+ `posted_time` int(16) NOT NULL ,
33
+ PRIMARY KEY(`id`)
34
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
35
+
36
+ INSERT INTO {$this->getTable('core_email_template')}
37
+ (template_code, template_text, template_type, template_subject)
38
+ values (
39
+ 'ReviewPlus 1.0.0 Transactional',
40
+ '<div style=\"background: #F6F6F6; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; margin: 0; padding: 0;\">
41
+ <table style=\"width: 100%;\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
42
+ <tbody>
43
+ <tr>
44
+ <td style=\"padding: 20px 0 20px 0;\" align=\"center\" valign=\"top\">
45
+ <table style=\"border: 1px solid #e0e0e0; width: 650px;\" border=\"0\" cellspacing=\"0\" cellpadding=\"10\" bgcolor=\"FFFFFF\">
46
+ <tbody>
47
+ <tr>
48
+ <td valign=\"top\"><a style=\"color: #E0E0E0;\" href=\"{{store url=\"\"}}\"><img src=\"{{skin url=\"images/logo_email.gif\" _area=\"frontend\"}}\" alt=\"{{var store_name}}\" border=\"0\" /></a></td>
49
+ </tr>
50
+ <tr>
51
+ <td valign=\"top\">
52
+ <h1 style=\"font-size: 21px; font-weight: normal; line-height: 22px; margin: 0;\">Dear <strong>{{var namevar}}</strong>,</h1>
53
+ <p style=\"border: 1px solid #E0E0E0; font-size: 12px; line-height: 16px; margin-bottom: 10px; padding: 13px 18px; background: #F9F9F9;\">You have recently purchased the following product(s) from our store: <br /><strong>{{var purchased_products}}</strong></p>
54
+ <p style=\"border: 1px solid #E0E0E0; font-size: 12px; line-height: 16px; margin: 0; padding: 13px 18px; background: #F9F9F9;\"><span>Please take a moment to rate the purchased product(s). Your feedback is important to us and helps improve our services and products.</span></p>
55
+ <ul style=\"border: 1px solid #E0E0E0; list-style: none; font-size: 12px; line-height: 16px; margin-top: 0; margin-bottom: 20px; padding-top: 10px; padding-bottom: 20px; background: #F9F9F9;\">
56
+ <li style=\"list-style: none; padding-bottom: 5px; padding-top: 5px; border-bottom: 1px solid #E0E0E0;\"><a href=\"{{var review_page_url}}&amp;rtng=5\"><img style=\"width: 125px; height: 25px; vertical-align: middle;\" src=\"{{config path=\"web/unsecure/base_url\"}}/skin/frontend/base/default/images/reviewplus_email_template/5-stars.jpg\" alt=\"Very satisfied\" />&nbsp;<span>( 5 / 5 )</span></a></li>
57
+ <li style=\"list-style: none; padding-bottom: 5px; padding-top: 5px; border-bottom: 1px solid #E0E0E0;\"><a style=\"margin-top: 10px;\" href=\"{{var review_page_url}}&amp;rtng=4\"><img style=\"width: 125px; height: 25px; vertical-align: middle;\" src=\"{{config path=\"web/unsecure/base_url\"}}/skin/frontend/base/default/images/reviewplus_email_template/4-stars.jpg\" alt=\"Satisfied\" />&nbsp;<span>( 4 / 5 )</span></a></li>
58
+ <li style=\"list-style: none; padding-bottom: 5px; padding-top: 5px; border-bottom: 1px solid #E0E0E0;\"><a href=\"{{var review_page_url}}&amp;rtng=3\"><img style=\"width: 125px; height: 25px; vertical-align: middle;\" src=\"{{config path=\"web/unsecure/base_url\"}}/skin/frontend/base/default/images/reviewplus_email_template/3-stars.jpg\" alt=\"Neutral\" />&nbsp;<span>( 3 / 5 )</span></a></li>
59
+ <li style=\"list-style: none; padding-bottom: 5px; padding-top: 5px; border-bottom: 1px solid #E0E0E0;\"><a href=\"{{var review_page_url}}&amp;rtng=2\"><img style=\"width: 125px; height: 25px; vertical-align: middle;\" src=\"{{config path=\"web/unsecure/base_url\"}}/skin/frontend/base/default/images/reviewplus_email_template/2-stars.jpg\" alt=\"Not satisfied\" />&nbsp;<span>( 2 / 5 )</span></a></li>
60
+ <li style=\"list-style: none; padding-bottom: 5px; padding-top: 5px; border-bottom: 1px solid #E0E0E0;\"><a href=\"{{var review_page_url}}&amp;rtng=1\"><img style=\"width: 125px; height: 25px; vertical-align: middle;\" src=\"{{config path=\"web/unsecure/base_url\"}}/skin/frontend/base/default/images/reviewplus_email_template/1-star.jpg\" alt=\"Very unsatisfied\" />&nbsp;<span>( 1 / 5 )</span></a></li>
61
+ </ul>
62
+ </td>
63
+ </tr>
64
+ <tr>
65
+ <td style=\"background: #EAEAEA; text-align: center;\" align=\"center\" bgcolor=\"#EAEAEA\"><center>
66
+ <p style=\"font-size: 12px; margin: 0;\"><strong>Thank you and have a nice day!</p>
67
+ </center></td>
68
+ </tr>
69
+ </tbody>
70
+ </table>
71
+ </td>
72
+ </tr>
73
+ </tbody>
74
+ </table>
75
+ </div>',
76
+ 2,
77
+ 'Order {{var order_increment_id}}, {{var namevar}}'
78
+ );
79
+ ");
80
+ $installer->endSetup();
81
+ ?>
app/code/community/Briel/ReviewPlus/sql/briel_reviewplus_setup/mysql4-install-1.0.0.php ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $installer = $this;
3
+ $installer->startSetup();
4
+
5
+ $installer->run("
6
+ DROP TABLE IF EXISTS {$this->getTable('reviewplus_clientlog')};
7
+ CREATE TABLE IF NOT EXISTS {$this->getTable('reviewplus_clientlog')} (
8
+ `id` int(12) unsigned NOT NULL auto_increment,
9
+ `enable` tinyint(1) NOT NULL ,
10
+ `order_id` int(12) NOT NULL ,
11
+ `customer_name` varchar(255) NOT NULL ,
12
+ `customer_email` varchar(255) NOT NULL ,
13
+ `ordered_products` varchar(255) NOT NULL ,
14
+ `due_date` int(16) NOT NULL ,
15
+ `status` tinyint(1) NOT NULL ,
16
+ `time_sent` int(16) NOT NULL ,
17
+ PRIMARY KEY(`id`)
18
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
19
+
20
+ DROP TABLE IF EXISTS {$this->getTable('reviewplus_reviews')};
21
+ CREATE TABLE IF NOT EXISTS {$this->getTable('reviewplus_reviews')} (
22
+ `id` int(12) unsigned NOT NULL auto_increment,
23
+ `order_id` int(12) NOT NULL ,
24
+ `product_sku` varchar(255) NOT NULL ,
25
+ `customer_name` varchar(255) NOT NULL ,
26
+ `customer_email` varchar(255) NULL ,
27
+ `product_rating` tinyint(1) NOT NULL ,
28
+ `product_review_title` varchar(255) NOT NULL ,
29
+ `product_review` text NOT NULL ,
30
+ `review_status` varchar(100) NOT NULL ,
31
+ `store_id` int(3) NOT NULL ,
32
+ `posted_time` int(16) NOT NULL ,
33
+ PRIMARY KEY(`id`)
34
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
35
+
36
+ INSERT INTO {$this->getTable('core_email_template')}
37
+ (template_code, template_text, template_type, template_subject)
38
+ values (
39
+ 'ReviewPlus 1.0.0 Transactional',
40
+ '<div style=\"background: #F6F6F6; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; margin: 0; padding: 0;\">
41
+ <table style=\"width: 100%;\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
42
+ <tbody>
43
+ <tr>
44
+ <td style=\"padding: 20px 0 20px 0;\" align=\"center\" valign=\"top\">
45
+ <table style=\"border: 1px solid #e0e0e0; width: 650px;\" border=\"0\" cellspacing=\"0\" cellpadding=\"10\" bgcolor=\"FFFFFF\">
46
+ <tbody>
47
+ <tr>
48
+ <td valign=\"top\"><a style=\"color: #E0E0E0;\" href=\"{{store url=\"\"}}\"><img src=\"{{skin url=\"images/logo_email.gif\" _area=\"frontend\"}}\" alt=\"{{var store_name}}\" border=\"0\" /></a></td>
49
+ </tr>
50
+ <tr>
51
+ <td valign=\"top\">
52
+ <h1 style=\"font-size: 21px; font-weight: normal; line-height: 22px; margin: 0;\">Dear <strong>{{var namevar}}</strong>,</h1>
53
+ <p style=\"border: 1px solid #E0E0E0; font-size: 12px; line-height: 16px; margin-bottom: 10px; padding: 13px 18px; background: #F9F9F9;\">You have recently purchased the following product(s) from our store: <br /><strong>{{var purchased_products}}</strong></p>
54
+ <p style=\"border: 1px solid #E0E0E0; font-size: 12px; line-height: 16px; margin: 0; padding: 13px 18px; background: #F9F9F9;\"><span>Please take a moment to rate the purchased product(s). Your feedback is important to us and helps improve our services and products.</span></p>
55
+ <ul style=\"border: 1px solid #E0E0E0; list-style: none; font-size: 12px; line-height: 16px; margin-top: 0; margin-bottom: 20px; padding-top: 10px; padding-bottom: 20px; background: #F9F9F9;\">
56
+ <li style=\"list-style: none; padding-bottom: 5px; padding-top: 5px; border-bottom: 1px solid #E0E0E0;\"><a href=\"{{var review_page_url}}&amp;rtng=5\"><img style=\"width: 125px; height: 25px; vertical-align: middle;\" src=\"{{config path=\"web/unsecure/base_url\"}}/skin/frontend/base/default/images/reviewplus_email_template/5-stars.jpg\" alt=\"Very satisfied\" />&nbsp;<span>( 5 / 5 )</span></a></li>
57
+ <li style=\"list-style: none; padding-bottom: 5px; padding-top: 5px; border-bottom: 1px solid #E0E0E0;\"><a style=\"margin-top: 10px;\" href=\"{{var review_page_url}}&amp;rtng=4\"><img style=\"width: 125px; height: 25px; vertical-align: middle;\" src=\"{{config path=\"web/unsecure/base_url\"}}/skin/frontend/base/default/images/reviewplus_email_template/4-stars.jpg\" alt=\"Satisfied\" />&nbsp;<span>( 4 / 5 )</span></a></li>
58
+ <li style=\"list-style: none; padding-bottom: 5px; padding-top: 5px; border-bottom: 1px solid #E0E0E0;\"><a href=\"{{var review_page_url}}&amp;rtng=3\"><img style=\"width: 125px; height: 25px; vertical-align: middle;\" src=\"{{config path=\"web/unsecure/base_url\"}}/skin/frontend/base/default/images/reviewplus_email_template/3-stars.jpg\" alt=\"Neutral\" />&nbsp;<span>( 3 / 5 )</span></a></li>
59
+ <li style=\"list-style: none; padding-bottom: 5px; padding-top: 5px; border-bottom: 1px solid #E0E0E0;\"><a href=\"{{var review_page_url}}&amp;rtng=2\"><img style=\"width: 125px; height: 25px; vertical-align: middle;\" src=\"{{config path=\"web/unsecure/base_url\"}}/skin/frontend/base/default/images/reviewplus_email_template/2-stars.jpg\" alt=\"Not satisfied\" />&nbsp;<span>( 2 / 5 )</span></a></li>
60
+ <li style=\"list-style: none; padding-bottom: 5px; padding-top: 5px; border-bottom: 1px solid #E0E0E0;\"><a href=\"{{var review_page_url}}&amp;rtng=1\"><img style=\"width: 125px; height: 25px; vertical-align: middle;\" src=\"{{config path=\"web/unsecure/base_url\"}}/skin/frontend/base/default/images/reviewplus_email_template/1-star.jpg\" alt=\"Very unsatisfied\" />&nbsp;<span>( 1 / 5 )</span></a></li>
61
+ </ul>
62
+ </td>
63
+ </tr>
64
+ <tr>
65
+ <td style=\"background: #EAEAEA; text-align: center;\" align=\"center\" bgcolor=\"#EAEAEA\"><center>
66
+ <p style=\"font-size: 12px; margin: 0;\"><strong>Thank you and have a nice day!</p>
67
+ </center></td>
68
+ </tr>
69
+ </tbody>
70
+ </table>
71
+ </td>
72
+ </tr>
73
+ </tbody>
74
+ </table>
75
+ </div>',
76
+ 2,
77
+ 'Order {{var order_increment_id}}, {{var namevar}}'
78
+ );
79
+ ");
80
+ $installer->endSetup();
81
+ ?>
app/code/community/Briel/ReviewPlus/sql/briel_reviewplus_setup/mysql4-upgrade-0.9.1-1.0.0.php ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $installer = $this;
3
+ $installer->startSetup();
4
+
5
+ $installer->run("
6
+ DROP TABLE IF EXISTS {$this->getTable('reviewplus_clientlog')};
7
+ CREATE TABLE IF NOT EXISTS {$this->getTable('reviewplus_clientlog')} (
8
+ `id` int(12) unsigned NOT NULL auto_increment,
9
+ `enable` tinyint(1) NOT NULL ,
10
+ `order_id` int(12) NOT NULL ,
11
+ `customer_name` varchar(255) NOT NULL ,
12
+ `customer_email` varchar(255) NOT NULL ,
13
+ `ordered_products` varchar(255) NOT NULL ,
14
+ `due_date` int(16) NOT NULL ,
15
+ `status` tinyint(1) NOT NULL ,
16
+ `time_sent` int(16) NOT NULL ,
17
+ PRIMARY KEY(`id`)
18
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
19
+
20
+ DROP TABLE IF EXISTS {$this->getTable('reviewplus_reviews')};
21
+ CREATE TABLE IF NOT EXISTS {$this->getTable('reviewplus_reviews')} (
22
+ `id` int(12) unsigned NOT NULL auto_increment,
23
+ `order_id` int(12) NOT NULL ,
24
+ `product_sku` varchar(255) NOT NULL ,
25
+ `customer_name` varchar(255) NOT NULL ,
26
+ `customer_email` varchar(255) NULL ,
27
+ `product_rating` tinyint(1) NOT NULL ,
28
+ `product_review_title` varchar(255) NOT NULL ,
29
+ `product_review` text NOT NULL ,
30
+ `review_status` varchar(100) NOT NULL ,
31
+ `store_id` int(3) NOT NULL ,
32
+ `posted_time` int(16) NOT NULL ,
33
+ PRIMARY KEY(`id`)
34
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
35
+
36
+ INSERT INTO {$this->getTable('core_email_template')}
37
+ (template_code, template_text, template_type, template_subject)
38
+ values (
39
+ 'ReviewPlus 1.0.0 Transactional',
40
+ '<div style=\"background: #F6F6F6; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; margin: 0; padding: 0;\">
41
+ <table style=\"width: 100%;\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
42
+ <tbody>
43
+ <tr>
44
+ <td style=\"padding: 20px 0 20px 0;\" align=\"center\" valign=\"top\">
45
+ <table style=\"border: 1px solid #e0e0e0; width: 650px;\" border=\"0\" cellspacing=\"0\" cellpadding=\"10\" bgcolor=\"FFFFFF\">
46
+ <tbody>
47
+ <tr>
48
+ <td valign=\"top\"><a style=\"color: #E0E0E0;\" href=\"{{store url=\"\"}}\"><img src=\"{{skin url=\"images/logo_email.gif\" _area=\"frontend\"}}\" alt=\"{{var store_name}}\" border=\"0\" /></a></td>
49
+ </tr>
50
+ <tr>
51
+ <td valign=\"top\">
52
+ <h1 style=\"font-size: 21px; font-weight: normal; line-height: 22px; margin: 0;\">Dear <strong>{{var namevar}}</strong>,</h1>
53
+ <p style=\"border: 1px solid #E0E0E0; font-size: 12px; line-height: 16px; margin-bottom: 10px; padding: 13px 18px; background: #F9F9F9;\">You have recently purchased the following product(s) from our store: <br /><strong>{{var purchased_products}}</strong></p>
54
+ <p style=\"border: 1px solid #E0E0E0; font-size: 12px; line-height: 16px; margin: 0; padding: 13px 18px; background: #F9F9F9;\"><span>Please take a moment to rate the purchased product(s). Your feedback is important to us and helps improve our services and products.</span></p>
55
+ <ul style=\"border: 1px solid #E0E0E0; list-style: none; font-size: 12px; line-height: 16px; margin-top: 0; margin-bottom: 20px; padding-top: 10px; padding-bottom: 20px; background: #F9F9F9;\">
56
+ <li style=\"list-style: none; padding-bottom: 5px; padding-top: 5px; border-bottom: 1px solid #E0E0E0;\"><a href=\"{{var review_page_url}}&amp;rtng=5\"><img style=\"width: 125px; height: 25px; vertical-align: middle;\" src=\"{{config path=\"web/unsecure/base_url\"}}/skin/frontend/base/default/images/reviewplus_email_template/5-stars.jpg\" alt=\"Very satisfied\" />&nbsp;<span>( 5 / 5 )</span></a></li>
57
+ <li style=\"list-style: none; padding-bottom: 5px; padding-top: 5px; border-bottom: 1px solid #E0E0E0;\"><a style=\"margin-top: 10px;\" href=\"{{var review_page_url}}&amp;rtng=4\"><img style=\"width: 125px; height: 25px; vertical-align: middle;\" src=\"{{config path=\"web/unsecure/base_url\"}}/skin/frontend/base/default/images/reviewplus_email_template/4-stars.jpg\" alt=\"Satisfied\" />&nbsp;<span>( 4 / 5 )</span></a></li>
58
+ <li style=\"list-style: none; padding-bottom: 5px; padding-top: 5px; border-bottom: 1px solid #E0E0E0;\"><a href=\"{{var review_page_url}}&amp;rtng=3\"><img style=\"width: 125px; height: 25px; vertical-align: middle;\" src=\"{{config path=\"web/unsecure/base_url\"}}/skin/frontend/base/default/images/reviewplus_email_template/3-stars.jpg\" alt=\"Neutral\" />&nbsp;<span>( 3 / 5 )</span></a></li>
59
+ <li style=\"list-style: none; padding-bottom: 5px; padding-top: 5px; border-bottom: 1px solid #E0E0E0;\"><a href=\"{{var review_page_url}}&amp;rtng=2\"><img style=\"width: 125px; height: 25px; vertical-align: middle;\" src=\"{{config path=\"web/unsecure/base_url\"}}/skin/frontend/base/default/images/reviewplus_email_template/2-stars.jpg\" alt=\"Not satisfied\" />&nbsp;<span>( 2 / 5 )</span></a></li>
60
+ <li style=\"list-style: none; padding-bottom: 5px; padding-top: 5px; border-bottom: 1px solid #E0E0E0;\"><a href=\"{{var review_page_url}}&amp;rtng=1\"><img style=\"width: 125px; height: 25px; vertical-align: middle;\" src=\"{{config path=\"web/unsecure/base_url\"}}/skin/frontend/base/default/images/reviewplus_email_template/1-star.jpg\" alt=\"Very unsatisfied\" />&nbsp;<span>( 1 / 5 )</span></a></li>
61
+ </ul>
62
+ </td>
63
+ </tr>
64
+ <tr>
65
+ <td style=\"background: #EAEAEA; text-align: center;\" align=\"center\" bgcolor=\"#EAEAEA\"><center>
66
+ <p style=\"font-size: 12px; margin: 0;\"><strong>Thank you and have a nice day!</p>
67
+ </center></td>
68
+ </tr>
69
+ </tbody>
70
+ </table>
71
+ </td>
72
+ </tr>
73
+ </tbody>
74
+ </table>
75
+ </div>',
76
+ 2,
77
+ 'Order {{var order_increment_id}}, {{var namevar}}'
78
+ );
79
+ ");
80
+ $installer->endSetup();
81
+ ?>
app/design/adminhtml/default/default/layout/briel_reviewplus.xml CHANGED
@@ -9,6 +9,24 @@
9
  <action method="setTitle" translate="title"><title>Product Reviews / Briel ReviewPlus</title></action>
10
  </reference>
11
  </adminhtml_reviews_index>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  <adminhtml_clientlog_index>
13
  <reference name="content">
14
  <block type="reviewplus/adminhtml_clientlog" name="clientlog" />
9
  <action method="setTitle" translate="title"><title>Product Reviews / Briel ReviewPlus</title></action>
10
  </reference>
11
  </adminhtml_reviews_index>
12
+
13
+ <adminhtml_reviews_edit>
14
+ <reference name="content">
15
+ <block type="adminhtml/template" name="edit" template="briel_reviewplus/edit.phtml" />
16
+ </reference>
17
+ <reference name="head">
18
+ <action method="setTitle" translate="title"><title>Edit Review / Briel ReviewPlus</title></action>
19
+ </reference>
20
+ </adminhtml_reviews_edit>
21
+
22
+ <adminhtml_reviews_help>
23
+ <reference name="content">
24
+ <block type="adminhtml/template" name="help" template="briel_reviewplus/help.phtml" />
25
+ </reference>
26
+ <reference name="head">
27
+ <action method="setTitle" translate="title"><title>Help / Briel ReviewPlus</title></action>
28
+ </reference>
29
+ </adminhtml_reviews_help>
30
  <adminhtml_clientlog_index>
31
  <reference name="content">
32
  <block type="reviewplus/adminhtml_clientlog" name="clientlog" />
app/design/adminhtml/default/default/template/briel_reviewplus/edit.phtml ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $id = $this->getRequest()->getParam('id');
3
+ // get reviewplus model
4
+ $reviewplus_reviews_db = Mage::getModel('reviewplus/reviews')->load($id);
5
+ $status = $reviewplus_reviews_db->getData('review_status');
6
+ $rating = $reviewplus_reviews_db->getData('product_rating');
7
+ // get order model
8
+ $order_id = $reviewplus_reviews_db->getData('order_id');
9
+ $increment_id = Mage::getModel('sales/order')->load($order_id)->getIncrementId();
10
+ // get product model
11
+ $sku = $reviewplus_reviews_db->getData('product_sku');
12
+ $product = Mage::getModel('catalog/product')->loadByAttribute('sku', $sku);
13
+ // ProductQuestions config data
14
+ $config_email = Mage::getStoreConfig('productquestions_options/productquestions_config/reply_email', Mage::app()->getStore());
15
+ $config_name = Mage::getStoreConfig('productquestions_options/productquestions_config/reply_name', Mage::app()->getStore());
16
+ ?>
17
+ <div class="content-header">
18
+ <h3><?php echo $this->__('Edit and Reply - ReviewPlus'); ?></h3>
19
+ <p class="form-buttons">
20
+ <button type="button" class="button" onclick="edit_form.submit();" title="<?php echo $this->__('Save Changes'); ?>"><span><span><?php echo $this->__('Save Changes'); ?></span></span></button>
21
+ <button type="button" class="scalable back" onclick="javascript:history.back()" title="<?php echo $this->__('Back'); ?>" ><span><span><?php echo $this->__('Back'); ?></span></span></button>
22
+ </p>
23
+ </div>
24
+ <div class="entry-edit" style="margin-bottom:10px;">
25
+ <div class="entry-edit-head">
26
+ <h4><?php echo $this->__('Edit Review'); ?></h4>
27
+ </div>
28
+ <form id="edit-form" name="edit-form" action="<?php echo $this->getUrl('adminhtml/reviews/save') ?>" method="post">
29
+ <input type="hidden" name="form_key" value="<?php echo Mage::getSingleton('core/session')->getFormKey(); ?>" />
30
+ <input type="hidden" id="reviewplus_id" name="reviewplus_id" value="<?php echo $id; ?>" />
31
+ <div class="fieldset fieldset-wide" id="edit_fieldset">
32
+ <div class="hor-scroll">
33
+ <table cellspacing="0" cellpadding="0" class="form-list">
34
+ <tbody>
35
+ <tr>
36
+ <td class="label"><?php echo $this->__('Order #'); ?></td>
37
+ <td class="value">
38
+ <a href="<?php echo $this->getUrl('adminhtml/sales_order/view', array('order_id' => $order_id)); ?>" target="_blank" ><strong><?php echo $increment_id; ?></strong></a>
39
+ </td>
40
+ </tr>
41
+ <tr>
42
+ <td class="label"><?php echo $this->__('Product Name'); ?></td>
43
+ <td class="value">
44
+ <a href="<?php echo Mage::getBaseUrl().$product->getUrlPath(); ?>" target="_blank" ><strong><?php echo $product->getName(); ?></strong></a>
45
+ </td>
46
+ </tr>
47
+ <tr>
48
+ <td class="label"><?php echo $this->__('Rating'); ?><em class="required"> * </em></td>
49
+ <td class="value">
50
+ <select id="edit_rating" name="edit[rating]" class="required-entry select">
51
+ <option value="1" <?php if ($rating == 1) { echo 'selected="selected"'; } ?>><?php echo $this->__('1 star'); ?></option>
52
+ <option value="2" <?php if ($rating == 2) { echo 'selected="selected"'; } ?>><?php echo $this->__('2 stars'); ?></option>
53
+ <option value="3" <?php if ($rating == 3) { echo 'selected="selected"'; } ?>><?php echo $this->__('3 stars'); ?></option>
54
+ <option value="4" <?php if ($rating == 4) { echo 'selected="selected"'; } ?>><?php echo $this->__('4 stars'); ?></option>
55
+ <option value="5" <?php if ($rating == 5) { echo 'selected="selected"'; } ?>><?php echo $this->__('5 stars'); ?></option>
56
+ </select>
57
+ </td>
58
+ </tr>
59
+ <!--tr>
60
+ <td class="label"><?php echo $this->__('Status'); ?></td>
61
+ <td class="value">
62
+ <select id="edit_status" name="edit[status]" class="required-entry select">
63
+ <option value="pending" <?php if ($status == 'pending') { echo 'selected="selected"'; } ?>><?php echo $this->__('Pending'); ?></option>
64
+ <option value="approved"<?php if ($status == 'approved') { echo 'selected="selected"'; } ?>><?php echo $this->__('Approved'); ?></option>
65
+ </select>
66
+ </td>
67
+ </tr-->
68
+ <tr>
69
+ <td class="label"><?php echo $this->__('Customer Name'); ?><em class="required"> * </em></td>
70
+ <td class="value">
71
+ <input type="text" id="edit_name" name="edit[name]" class="required-entry input-text" value="<?php echo $reviewplus_reviews_db->getData('customer_name'); ?>"/>
72
+ </td>
73
+ </tr>
74
+ <tr>
75
+ <td class="label"><?php echo $this->__('Customer Email'); ?><em class="required"> * </em></td>
76
+ <td class="value">
77
+ <input type="text" id="edit_email" name="edit[email]" class="required-entry input-text validate-email" value="<?php echo $reviewplus_reviews_db->getData('customer_email'); ?>"/>
78
+ </td>
79
+ </tr>
80
+ <tr>
81
+ <td class="label"><?php echo $this->__('Review Title'); ?><em class="required"> * </em></td>
82
+ <td class="value">
83
+ <input type="text" id="edit_title" name="edit[title]" class="required-entry input-text" value="<?php echo $reviewplus_reviews_db->getData('product_review_title'); ?>"/>
84
+ </td>
85
+ </tr>
86
+ <tr>
87
+ <td class="label"><?php echo $this->__('Review Detail'); ?><em class="required"> * </em></td>
88
+ <td class="value">
89
+ <textarea id="edit_detail" name="edit[detail]" class="required-entry textarea" style="height:12em;" rows="2" cols="15"><?php echo $reviewplus_reviews_db->getData('product_review'); ?></textarea>
90
+ </td>
91
+ </tr>
92
+ </tbody>
93
+ </table>
94
+ </div>
95
+ </div>
96
+ </form>
97
+ </div>
98
+ <script type="text/javascript">
99
+ var edit_form = new varienForm('edit-form');
100
+ </script>
app/design/adminhtml/default/default/template/briel_reviewplus/help.phtml ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="content-header">
2
+ <h3><?php echo $this->__('Help'); ?></h3>
3
+ <div class="a-right">
4
+ <button type="button" class="scalable back" title="<?php echo $this->__('Back'); ?>" onclick="javascript: history.back();"><span><?php echo $this->__('Back'); ?></span></button>
5
+ </div>
6
+ </div>
7
+ <div class="entry-edit">
8
+ <div class="entry-edit-head">
9
+ <h4>General Overview</h4>
10
+ </div>
11
+ <div class="box">
12
+ <p>ReviewPlus will help boost product reviews by sending a review notification email to customers. Once the recipient opens the email and clicks on the rating he will be redirected to a product review form. </p>
13
+ <ul style="list-style: square; margin-bottom: 10px;">
14
+ <li style="margin-left: 20px;">Once installed and properly configured, the extension will start logging magento orders as per extension settings.</li>
15
+ <li style="margin-left: 20px;">Each day it will automatically compile a list of clients that will receive a product review notification email. This is based on when the order was placed and on extension settings.</li>
16
+ <li style="margin-left: 20px;">You can also send emails manually from Magento admin, through <strong>Briel ReviewPlus > Manage Customer Log</strong>, by using the <strong>Send followup email</strong> massaction on the upper right corner of the grid.</li>
17
+ <li style="margin-left: 20px;">When a client opens and email and clicks on one of the star ratings he/she is redirected to a review form, from where he/she can fill in a review (and change ratings if need be). <br /><span style="color: grey;">NOTE: If the client bought two products, the extension will display two forms, one for each product.</span></li>
18
+ <li style="margin-left: 20px;">All you have to do is go to <strong>Briel ReviewPlus > Product Reviews</strong> and approve the reviews via the <strong>Approve</strong> massaction in the upper right corner of the grid. Now your reviews will appear on your store's product page, just as Magento reviews do.</li>
19
+ </ul>
20
+ <p>That's it. You should see a dramatic increase in product reviews for your store, helping build customer confidence in your products and services.</p>
21
+ <p>Now we will take a step by step look of <strong>how to properly configure the extension</strong>, so that you get the maximum out of it.</p>
22
+ </div>
23
+ <div class="entry-edit-head">
24
+ <h4>Step 1</h4>
25
+ </div>
26
+ <div class="box">
27
+ <p>Go to <strong>System > Transactional Emails</strong>. Select the entry called <strong>ReviewPlus 1.0.0 Transactional</strong>. This is the email that will be sent out to customers. Edit any texts to your needs, just be sure to <strong style="color: #eb5e00;">keep the variables intact</strong>.</p>
28
+ </div>
29
+ <div class="entry-edit-head">
30
+ <h4>Step 2</h4>
31
+ </div>
32
+ <div class="box">
33
+ <p>Once you are done with Step 1, we need to configure the extension to work properly. Go to <strong>Briel ReviewPlus > Settings</strong>.</p>
34
+ </div>
35
+ <div class="entry-edit-head">
36
+ <h4>Step 3</h4>
37
+ </div>
38
+ <div class="box">
39
+ <p>Set the extension to Enabled.</p>
40
+ </div>
41
+ <div class="entry-edit-head">
42
+ <h4>Step 4</h4>
43
+ </div>
44
+ <div class="box">
45
+ <p>The <strong>Followup Email Days Delay</strong> setting sets the number of days after which the client will receive the review notification email.</p>
46
+ </div>
47
+ <div class="entry-edit-head">
48
+ <h4>Step 5</h4>
49
+ </div>
50
+ <div class="box">
51
+ <p><strong>Start Hour</strong> sets the hour of the day when the extension will start sending emails to customers. This field accepts a value between 0 and 23. So if you want emails to start going out at 2:00 PM, just fill in 14.</p>
52
+ </div>
53
+ <div class="entry-edit-head">
54
+ <h4>Step 6</h4>
55
+ </div>
56
+ <div class="box">
57
+ <p>
58
+ Automated email sending works on a CRON job. It is set to run every five minutes, after the Start Hour. <strong>Emails per CRON</strong> controls how many emails it sends on every CRON job. So for example, if set to 3 it will send 3 emails every 5 minutes, amounting to 36 emails per hour.<br />
59
+ <span style="color: gray">NOTE: Make sure CRON is set up on your server and cron.php from Magento root is set to run every five minutes. This file compiles a list of scheduled tasks that Magento needs to run on the next CRON job. You can also set to run every 10 minutes for example, but then the amount of emails sent in an hour will be halved.</span>
60
+ </p>
61
+ </div>
62
+ <div class="entry-edit-head">
63
+ <h4>Step 7</h4>
64
+ </div>
65
+ <div class="box">
66
+ <p>The <strong>Bcc</strong> setting expects and email address (or multiple email addresses, separated by commas). Basically, these addresses will receive a carbon copy of every email sent out by the extension. </p>
67
+ </div>
68
+ <div class="entry-edit-head">
69
+ <h4>Step 8</h4>
70
+ </div>
71
+ <div class="box">
72
+ <p><strong>Email Template</strong> is <strong style="color: #eb5e00;">the most vital setting</strong>. Please select from the dropdown the entry named <strong>ReviewPlus 1.0.0 Transactional</strong>. It's the transactional email we edited on step 1. </p>
73
+ </div>
74
+ <div class="entry-edit-head">
75
+ <h4>Step 9</h4>
76
+ </div>
77
+ <div class="box">
78
+ <p>Equally important is the last setting on the list: <strong>Select Order Status</strong>. Orders are logged by ReviewPlus when they reach the order status selected in this field. You can select multiple statuses by CTRL+Click. </p>
79
+ </div>
80
+ <div class="entry-edit-head">
81
+ <h4>That's it!</h4>
82
+ </div>
83
+ <div class="box">
84
+ <p>Now that everything is configured, all you need to do is sit back and let the extension log orders and send review notification emails. Incoming reviews can be approved or edited from <strong>Briel ReviewPlus > Product Reviews</strong> grid. <span style="color: grey;">Please note that only pending reviews can be edited.</span></p>
85
+ </div>
86
+ </div>
app/design/adminhtml/default/default/template/briel_reviewplus/ordertab.phtml CHANGED
@@ -8,7 +8,25 @@ $customer_email = $order->getCustomerEmail();
8
  $ordered_products_collection = $order->getAllItems();
9
  $ordered_products = array();
10
  foreach($ordered_products_collection as $ordered_prod) {
11
- $ordered_products[] = $ordered_prod->getSku();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  }
13
  $ordered_products = implode(", ", $ordered_products);
14
  // instance clientlog model and load current order
@@ -17,10 +35,10 @@ if (count($clientlog_coll) == 1) {
17
  foreach($clientlog_coll as $entry) {
18
  $clientlog_db = Mage::getModel('reviewplus/clientlog')->load($entry->getId());
19
  $status = $clientlog_db->getData('status');
20
- $send_time = $clientlog_db->getData('send_time');
21
  }
22
  } else {
23
- $send_time = 'undefined';
24
  $status = '';
25
  }
26
  ?>
@@ -38,7 +56,7 @@ if (count($clientlog_coll) == 1) {
38
  </tr>
39
  <tr>
40
  <td class="label"><?php echo $this->__('Send time'); ?></td>
41
- <td class="value"><?php if ($send_time == 'undefined') { echo "<strong>-</strong>"; } else { echo "<strong>".date('d M Y', $send_time)."</strong>"; } ?></td>
42
  </tr>
43
  <?php
44
  // check IF clientlog status is 0 && extensions is enabled && current order status is among allowed list from extension config
8
  $ordered_products_collection = $order->getAllItems();
9
  $ordered_products = array();
10
  foreach($ordered_products_collection as $ordered_prod) {
11
+ $sku = $ordered_prod->getSku();
12
+ $_prod = Mage::getModel('catalog/product')->loadByAttribute('sku', array('eq' => $sku));
13
+ if ($_prod->getTypeId() == "simple") {
14
+ $parentIds = Mage::getModel('catalog/product_type_grouped')->getParentIdsByChild($_prod->getId());
15
+ if (!$parentIds) {
16
+ $parentIds = Mage::getModel('catalog/product_type_configurable')->getParentIdsByChild($_prod->getId());
17
+ }
18
+ if (isset($parentIds[0])) {
19
+ $parent = Mage::getModel('catalog/product')->load($parentIds[0]);
20
+ $parent_sku = $parent->getSku();
21
+ if (!in_array($parent_sku, $ordered_products)) {
22
+ $ordered_products[] = $parent_sku;
23
+ }
24
+ } else {
25
+ if (!in_array($sku, $ordered_products)) {
26
+ $ordered_products[] = $sku;
27
+ }
28
+ }
29
+ } // end of product TYPE IF
30
  }
31
  $ordered_products = implode(", ", $ordered_products);
32
  // instance clientlog model and load current order
35
  foreach($clientlog_coll as $entry) {
36
  $clientlog_db = Mage::getModel('reviewplus/clientlog')->load($entry->getId());
37
  $status = $clientlog_db->getData('status');
38
+ $due_date = $clientlog_db->getData('due_date');
39
  }
40
  } else {
41
+ $due_date = 'undefined';
42
  $status = '';
43
  }
44
  ?>
56
  </tr>
57
  <tr>
58
  <td class="label"><?php echo $this->__('Send time'); ?></td>
59
+ <td class="value"><?php if ($send_time == 'undefined') { echo "<strong>-</strong>"; } else { echo "<strong>".date('d M Y', $due_date)."</strong>"; } ?></td>
60
  </tr>
61
  <?php
62
  // check IF clientlog status is 0 && extensions is enabled && current order status is among allowed list from extension config
app/design/frontend/base/default/layout/briel_reviewplus.xml CHANGED
@@ -12,6 +12,7 @@
12
  </reference>
13
  <reference name="head">
14
  <action method="setTitle" translate="title"><title>Briel ReviewPlus</title></action>
 
15
  </reference>
16
  </reviewplus_index_index>
17
  </layout>
12
  </reference>
13
  <reference name="head">
14
  <action method="setTitle" translate="title"><title>Briel ReviewPlus</title></action>
15
+ <action method="addCss"><stylesheet>css/briel_reviewplus.css</stylesheet></action>
16
  </reference>
17
  </reviewplus_index_index>
18
  </layout>
app/design/frontend/base/default/template/briel_reviewplus/review.phtml CHANGED
@@ -17,9 +17,26 @@ if ($get_hash == $check_hash) {
17
  // assemble an array of skus from order details
18
  $product_skus = array();
19
  foreach ($items as $item_id => $item) {
20
- $sku = $item->getSku();
21
- array_push($product_skus, trim($sku));
22
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  // get collections for IF cases
24
  $reviews_collection = Mage::getModel('reviewplus/reviews')->getCollection()->addFieldToFilter('order_id', $order_id);
25
  foreach ($reviews_collection as $value) {
@@ -28,13 +45,14 @@ if ($get_hash == $check_hash) {
28
  }
29
  $clientlog_collection = Mage::getModel('reviewplus/clientlog')->getCollection()->addFieldToFilter('order_id', $order_id);
30
  ?>
 
31
  <div class="reviewplus-wrapper">
32
  <?php if (count($reviews_collection) == 0) { ?>
33
  <form name="review_form" action="<?php echo $this->getUrl('reviewplus/index/rate') ?>" method="post">
34
  <table class="data-table">
35
- <thead>
36
  <tr>
37
- <th width="35%" style="padding:10px 20px;"><p style="font-size:14px; margin:0; padding:0;"><?php echo $this->__('Product review for order #').$increment_id; ?></p></th>
38
  <th width="65%"></th>
39
  </tr>
40
  </thead>
@@ -53,6 +71,7 @@ if ($get_hash == $check_hash) {
53
  $reviewplus_reviews_db->setData('product_review', '')->save();
54
  $reviewplus_reviews_db->setData('review_status', 'pending')->save();
55
  $reviewplus_reviews_db->setData('store_id', Mage::app()->getStore()->getId())->save();
 
56
  $reviewplus_reviews_id = $reviewplus_reviews_db->getId();
57
  ?>
58
  <tr>
@@ -62,18 +81,30 @@ if ($get_hash == $check_hash) {
62
  </div>
63
  <br />
64
  <div class="product-image">
65
- <img src="<?php echo $product->getSmallImageUrl(); ?>" alt="<?php echo $val; ?>" style="width:100px; height:100px;" />
66
  </div>
67
  </td>
68
  <td style="padding:20px;">
69
  <input type="hidden" name="sku[<?php echo $val; ?>]" value="<?php echo $val; ?>">
70
  <input type="hidden" name="nickname[<?php echo $val; ?>]" value="<?php echo $nickname; ?>">
71
- <input type="hidden" name="rating[<?php echo $val; ?>]" value="<?php echo $rtng; ?>">
72
  <input type="hidden" name="rating-id[<?php echo $val; ?>]" value="<?php echo $reviewplus_reviews_id; ?>">
73
  <div class="form-list">
74
- <label class="required" for=""><em> *</em><?php echo $this->__('Review'); ?></label>
 
 
 
 
 
 
 
 
 
75
  <div class="input-box">
76
- <textarea name="detail[<?php echo $val; ?>]" class="required-entry" style="width:400px; height:120px;"></textarea>
 
 
 
 
77
  </div>
78
  </div>
79
  </td>
@@ -93,9 +124,9 @@ if ($get_hash == $check_hash) {
93
  <?php } else if (count($reviews_collection) == count($product_skus) && strlen($detail_contents) == 0 && $review_status == 'pending') { ?>
94
  <form name="review_form" action="<?php echo $this->getUrl('reviewplus/index/rate') ?>" method="post">
95
  <table class="data-table">
96
- <thead>
97
  <tr>
98
- <th width="35%" style="padding:10px 20px;"><p style="font-size:14px; margin:0; padding:0;"><?php echo $this->__('Product review for order #').$increment_id; ?></p></th>
99
  <th width="65%"></th>
100
  </tr>
101
  </thead>
@@ -107,7 +138,7 @@ if ($get_hash == $check_hash) {
107
  $reviewplus_reviews_coll->addFieldToFilter('order_id', $order_id)->addFieldToFilter('product_sku', $val);
108
  foreach ($reviewplus_reviews_coll as $reviewplus_reviews_entry) {
109
  $reviewplus_reviews_id = $reviewplus_reviews_entry->getId();
110
- }
111
  ?>
112
  <tr>
113
  <td style="padding:20px;">
@@ -116,18 +147,30 @@ if ($get_hash == $check_hash) {
116
  </div>
117
  <br />
118
  <div class="product-image">
119
- <img src="<?php echo $product->getSmallImageUrl(); ?>" alt="<?php echo $val; ?>" style="width:100px; height:100px;" />
120
  </div>
121
  </td>
122
  <td style="padding:20px;">
123
  <input type="hidden" name="sku[<?php echo $val; ?>]" value="<?php echo $val; ?>">
124
  <input type="hidden" name="nickname[<?php echo $val; ?>]" value="<?php echo $nickname; ?>">
125
- <input type="hidden" name="rating[<?php echo $val; ?>]" value="<?php echo $rtng; ?>">
126
  <input type="hidden" name="rating-id[<?php echo $val; ?>]" value="<?php echo $reviewplus_reviews_id; ?>">
127
  <div class="form-list">
128
- <label class="required" for=""><em> *</em><?php echo $this->__('Review'); ?></label>
 
 
 
 
 
 
 
 
 
129
  <div class="input-box">
130
- <textarea name="detail[<?php echo $val; ?>]" class="required-entry" style="width:400px; height:120px;"></textarea>
 
 
 
 
131
  </div>
132
  </div>
133
  </td>
@@ -146,20 +189,32 @@ if ($get_hash == $check_hash) {
146
  </form>
147
  <?php } else if (count($reviews_collection) == count($product_skus) && strlen($detail_contents) == 0 && $review_status == 'approved') { ?>
148
  <ul class="messages">
149
- <li class="success-msg"><ul><li><span><?php echo $this->__('Thank you for reviewing our product(s)!'); ?></span></li></ul></li>
150
  </ul>
151
  <?php } else if (count($reviews_collection) == count($product_skus) && strlen($detail_contents) >= 2) { ?>
152
  <ul class="messages">
153
- <li class="success-msg"><ul><li><span><?php echo $this->__('Thank you for reviewing our product(s)!'); ?></span></li></ul></li>
154
  </ul>
155
  <?php } // end of collection IF ELSE IF ?>
156
  </div>
 
157
  <script type="text/javascript">
158
  review_form = new VarienForm('review_form', false);
 
 
 
 
 
 
 
 
 
 
159
  </script>
160
 
 
161
  <?php } else { ?>
162
  <ul class="messages">
163
- <li class="error-msg"><ul><li><span><?php echo $this->__('You do not have the proper security token to view this page.'); ?></span></li></ul></li>
164
  </ul>
165
  <?php } // end HASH check IF ELSE ?>
17
  // assemble an array of skus from order details
18
  $product_skus = array();
19
  foreach ($items as $item_id => $item) {
20
+ $sku = trim($item->getSku());
21
+ $_prod = Mage::getModel('catalog/product')->loadByAttribute('sku', array('eq' => $sku));
22
+ if ($_prod->getTypeId() == "simple") {
23
+ $parentIds = Mage::getModel('catalog/product_type_grouped')->getParentIdsByChild($_prod->getId());
24
+ if (!$parentIds) {
25
+ $parentIds = Mage::getModel('catalog/product_type_configurable')->getParentIdsByChild($_prod->getId());
26
+ }
27
+ if (isset($parentIds[0])) {
28
+ $parent = Mage::getModel('catalog/product')->load($parentIds[0]);
29
+ $parent_sku = $parent->getSku();
30
+ if (!in_array($parent_sku, $product_skus)) {
31
+ $product_skus[] = $parent_sku;
32
+ }
33
+ } else {
34
+ if (!in_array($sku, $product_skus)) {
35
+ $product_skus[] = $sku;
36
+ }
37
+ }
38
+ } // end of product TYPE IF
39
+ } // end ITEMS FOREACH
40
  // get collections for IF cases
41
  $reviews_collection = Mage::getModel('reviewplus/reviews')->getCollection()->addFieldToFilter('order_id', $order_id);
42
  foreach ($reviews_collection as $value) {
45
  }
46
  $clientlog_collection = Mage::getModel('reviewplus/clientlog')->getCollection()->addFieldToFilter('order_id', $order_id);
47
  ?>
48
+
49
  <div class="reviewplus-wrapper">
50
  <?php if (count($reviews_collection) == 0) { ?>
51
  <form name="review_form" action="<?php echo $this->getUrl('reviewplus/index/rate') ?>" method="post">
52
  <table class="data-table">
53
+ <thead style="display:none;">
54
  <tr>
55
+ <th width="35%"></th>
56
  <th width="65%"></th>
57
  </tr>
58
  </thead>
71
  $reviewplus_reviews_db->setData('product_review', '')->save();
72
  $reviewplus_reviews_db->setData('review_status', 'pending')->save();
73
  $reviewplus_reviews_db->setData('store_id', Mage::app()->getStore()->getId())->save();
74
+ $reviewplus_reviews_db->setData('posted_time', time())->save();
75
  $reviewplus_reviews_id = $reviewplus_reviews_db->getId();
76
  ?>
77
  <tr>
81
  </div>
82
  <br />
83
  <div class="product-image">
84
+ <img src="<?php echo $product->getSmallImageUrl(); ?>" alt="<?php echo $val; ?>" style="width:100px; height:100px; border: 1px solid #b6b6b6;" />
85
  </div>
86
  </td>
87
  <td style="padding:20px;">
88
  <input type="hidden" name="sku[<?php echo $val; ?>]" value="<?php echo $val; ?>">
89
  <input type="hidden" name="nickname[<?php echo $val; ?>]" value="<?php echo $nickname; ?>">
 
90
  <input type="hidden" name="rating-id[<?php echo $val; ?>]" value="<?php echo $reviewplus_reviews_id; ?>">
91
  <div class="form-list">
92
+ <label class="required rating-label" for=""><em> *</em><?php echo $this->__('Rating'); ?></label>
93
+ <ul id="rating_stars_<?php echo $product_id; ?>" class="star-rating">
94
+ <li><a href="javascript:void(0);" onclick="setRating(this);" title="1" class="one-star <?php if ($rtng == 1) { echo 'current-rating'; } ?>">1</a></li>
95
+ <li><a href="javascript:void(0);" onclick="setRating(this);" title="2" class="two-stars <?php if ($rtng == 2) { echo 'current-rating'; } ?>">2</a></li>
96
+ <li><a href="javascript:void(0);" onclick="setRating(this);" title="3" class="three-stars <?php if ($rtng == 3) { echo 'current-rating'; } ?>">3</a></li>
97
+ <li><a href="javascript:void(0);" onclick="setRating(this);" title="4" class="four-stars <?php if ($rtng == 4) { echo 'current-rating'; } ?>">4</a></li>
98
+ <li><a href="javascript:void(0);" onclick="setRating(this);" title="5" class="five-stars <?php if ($rtng == 5) { echo 'current-rating'; } ?>">5</a></li>
99
+ <input type="hidden" name="rating[<?php echo $val; ?>]" value="<?php echo $rtng; ?>">
100
+ </ul>
101
+ <label class="required review-label" for=""><em> *</em><?php echo $this->__('Title'); ?></label>
102
  <div class="input-box">
103
+ <input type="text" name="title[<?php echo $val; ?>]" class="input-box required-entry" style="padding: 5px 10px; border: 1px solid #b6b6b6;"></textarea>
104
+ </div>
105
+ <label class="required review-label" for=""><em> *</em><?php echo $this->__('Review'); ?></label>
106
+ <div class="input-box">
107
+ <textarea name="detail[<?php echo $val; ?>]" class="required-entry" style="width:390px; height:70px; padding:10px;"></textarea>
108
  </div>
109
  </div>
110
  </td>
124
  <?php } else if (count($reviews_collection) == count($product_skus) && strlen($detail_contents) == 0 && $review_status == 'pending') { ?>
125
  <form name="review_form" action="<?php echo $this->getUrl('reviewplus/index/rate') ?>" method="post">
126
  <table class="data-table">
127
+ <thead style="display:none;">
128
  <tr>
129
+ <th width="35%"></th>
130
  <th width="65%"></th>
131
  </tr>
132
  </thead>
138
  $reviewplus_reviews_coll->addFieldToFilter('order_id', $order_id)->addFieldToFilter('product_sku', $val);
139
  foreach ($reviewplus_reviews_coll as $reviewplus_reviews_entry) {
140
  $reviewplus_reviews_id = $reviewplus_reviews_entry->getId();
141
+ }
142
  ?>
143
  <tr>
144
  <td style="padding:20px;">
147
  </div>
148
  <br />
149
  <div class="product-image">
150
+ <img src="<?php echo $product->getSmallImageUrl(); ?>" alt="<?php echo $val; ?>" style="width:100px; height:100px; border: 1px solid #b6b6b6;" />
151
  </div>
152
  </td>
153
  <td style="padding:20px;">
154
  <input type="hidden" name="sku[<?php echo $val; ?>]" value="<?php echo $val; ?>">
155
  <input type="hidden" name="nickname[<?php echo $val; ?>]" value="<?php echo $nickname; ?>">
 
156
  <input type="hidden" name="rating-id[<?php echo $val; ?>]" value="<?php echo $reviewplus_reviews_id; ?>">
157
  <div class="form-list">
158
+ <label class="required rating-label" for=""><em> *</em><?php echo $this->__('Rating'); ?></label>
159
+ <ul id="rating_stars_<?php echo $product_id; ?>" class="star-rating">
160
+ <li><a href="javascript:void(0);" onclick="setRating(this);" title="1" class="one-star <?php if ($rtng == 1) { echo 'current-rating'; } ?>">1</a></li>
161
+ <li><a href="javascript:void(0);" onclick="setRating(this);" title="2" class="two-stars <?php if ($rtng == 2) { echo 'current-rating'; } ?>">2</a></li>
162
+ <li><a href="javascript:void(0);" onclick="setRating(this);" title="3" class="three-stars <?php if ($rtng == 3) { echo 'current-rating'; } ?>">3</a></li>
163
+ <li><a href="javascript:void(0);" onclick="setRating(this);" title="4" class="four-stars <?php if ($rtng == 4) { echo 'current-rating'; } ?>">4</a></li>
164
+ <li><a href="javascript:void(0);" onclick="setRating(this);" title="5" class="five-stars <?php if ($rtng == 5) { echo 'current-rating'; } ?>">5</a></li>
165
+ <input type="hidden" name="rating[<?php echo $val; ?>]" value="<?php echo $rtng; ?>">
166
+ </ul>
167
+ <label class="required review-label" for=""><em> *</em><?php echo $this->__('Title'); ?></label>
168
  <div class="input-box">
169
+ <input type="text" name="title[<?php echo $val; ?>]" class="input-box required-entry" style="padding: 5px 10px; border: 1px solid #b6b6b6;"></textarea>
170
+ </div>
171
+ <label class="required review-label" for=""><em> *</em><?php echo $this->__('Review'); ?></label>
172
+ <div class="input-box">
173
+ <textarea name="detail[<?php echo $val; ?>]" class="required-entry" style="width:390px; height:70px; padding:10px;"></textarea>
174
  </div>
175
  </div>
176
  </td>
189
  </form>
190
  <?php } else if (count($reviews_collection) == count($product_skus) && strlen($detail_contents) == 0 && $review_status == 'approved') { ?>
191
  <ul class="messages">
192
+ <li class="success-msg"><ul><li><span><?php echo $this->__('Your review has been logged. Thank you for your time!'); ?></span></li></ul></li>
193
  </ul>
194
  <?php } else if (count($reviews_collection) == count($product_skus) && strlen($detail_contents) >= 2) { ?>
195
  <ul class="messages">
196
+ <li class="success-msg"><ul><li><span><?php echo $this->__('Your review has been logged. Thank you for your time!'); ?></span></li></ul></li>
197
  </ul>
198
  <?php } // end of collection IF ELSE IF ?>
199
  </div>
200
+
201
  <script type="text/javascript">
202
  review_form = new VarienForm('review_form', false);
203
+
204
+ function setRating(elmnt) {
205
+ var parent_ul_id = $(elmnt).up('li').up('ul').readAttribute('id');
206
+ var super_selector = '#' + parent_ul_id + ' a.current-rating';
207
+ $$(super_selector).each(function(e) {
208
+ e.removeClassName('current-rating');
209
+ });
210
+ $(elmnt).addClassName('current-rating');
211
+ $(elmnt).up('li').next('input').value = $(elmnt).readAttribute('title');
212
+ }
213
  </script>
214
 
215
+
216
  <?php } else { ?>
217
  <ul class="messages">
218
+ <li class="error-msg"><ul><li><span><?php echo $this->__('Access denied!'); ?></span></li></ul></li>
219
  </ul>
220
  <?php } // end HASH check IF ELSE ?>
app/locale/en_US/template/email/reviewplus_email.html DELETED
@@ -1,35 +0,0 @@
1
- <body style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
2
- <div style="background:#F6F6F6; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; margin:0; padding:0;">
3
- <table cellspacing="0" cellpadding="0" border="0" height="100%" width="100%">
4
- <tr>
5
- <td align="center" valign="top" style="padding:20px 0 20px 0">
6
- <table cellspacing="0" cellpadding="10" border="0" width="650" style="border:1px solid #E0E0E0; background-color:#FFFFFF;">
7
- <tr>
8
- <td valign="top">
9
- <a href="{{store url=""}}" style="color:#1E7EC8;"><img src="{{var logo_url}}" alt="{{var logo_alt}}" border="0"/></a>
10
- </td>
11
- </tr>
12
- <tr>
13
- <td valign="top">
14
- <h1 style="font-size:16px; font-weight:normal; line-height:22px; margin:0; margin-top:20px;">Dear {{var namevar}}, thank you for choosing us!</h1>
15
- <p style="border:1px solid #E0E0E0; font-size:12px; line-height:16px; margin-bottom:10px; padding:13px 18px; background:#F9F9F9;">Please take a minute of your time to give a short review for the product(s) you've recently purchased from our store.<p>
16
- <p style="border:1px solid #E0E0E0; font-size:12px; line-height:16px; margin-bottom:10px; padding:13px 18px; background:#F9F9F9;"><span style="font-weight:bold;">Ordered product(s): </span><br />{{var purchased_products}}</p>
17
- <p style="border:1px solid #E0E0E0; font-size:12px; line-height:16px; margin:0; padding:13px 18px; background:#F9F9F9;">How satisfied are you with the product(s) you've bought? Click the rating below which best describes your opinion.</p>
18
- <ul style="border:1px solid #E0E0E0;list-style:none; font-size:12px; line-height:16px; margin-top:0; margin-bottom:20px; padding-top:10px; padding-bottom:20px; background:#F9F9F9;">
19
- <li style="list-style:none;"><a href="{{var review_page_url}}&rtng=5"><img src="{{config path='web/unsecure/base_url'}}/skin/frontend/base/default/images/reviewplus_email_template/5-stars.jpg" alt="Very satisfied" /></a></li>
20
- <li style="list-style:none;"><a href="{{var review_page_url}}&rtng=4"><img src="{{config path='web/unsecure/base_url'}}/skin/frontend/base/default/images/reviewplus_email_template/4-stars.jpg" alt="Satisfied" /></a></li>
21
- <li style="list-style:none;"><a href="{{var review_page_url}}&rtng=3"><img src="{{config path='web/unsecure/base_url'}}/skin/frontend/base/default/images/reviewplus_email_template/3-stars.jpg" alt="Neutral" /></a></li>
22
- <li style="list-style:none;"><a href="{{var review_page_url}}&rtng=2"><img src="{{config path='web/unsecure/base_url'}}/skin/frontend/base/default/images/reviewplus_email_template/2-stars.jpg" alt="Unsatisfied" /></a></li>
23
- <li style="list-style:none;"><a href="{{var review_page_url}}&rtng=1"><img src="{{config path='web/unsecure/base_url'}}/skin/frontend/base/default/images/reviewplus_email_template/1-star.jpg" alt="Very unsatisfied" /></a></li>
24
- </ul>
25
- </td>
26
- </tr>
27
- <tr>
28
- <td align="center" style="background:#EAEAEA; text-align:center;"><p style="font-size:12px; margin:0;">Thank you <strong>{{var namevar}}</strong> and have a nice day!</p></td>
29
- </tr>
30
- </table>
31
- </td>
32
- </tr>
33
- </table>
34
- </div>
35
- </body>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
package.xml CHANGED
@@ -1,13 +1,20 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Briel_ReviewPlus</name>
4
- <version>0.9.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.gnu.org/licenses/gpl.html">GNU General Public License (GPL)</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>ReviewPlus will help boost the amount of reviews you receive for your products by sending a review notification email to customers.</summary>
10
- <description>Once enabled and configured, the extension will start logging orders and as per user defined settings will start sending review notification emails.&lt;br /&gt;&#xD;
 
 
 
 
 
 
 
11
  &lt;br /&gt;&#xD;
12
  In order for this to work properly, make sure both cron and email sending are configured and working on your server. And please define a transactional email based on our template.&lt;br /&gt;&#xD;
13
  &lt;br /&gt;&#xD;
@@ -16,9 +23,9 @@ Additionally, you can log individual orders via the ReviewPlus tab on Sales/Orde
16
  Once received, reviews can be approved from the Product Reviews grid and will appear on your site.</description>
17
  <notes>Stable version, fully functional on our website.</notes>
18
  <authors><author><name>Onel Velica</name><user>mage_briel</user><email>mage@briel.ro</email></author></authors>
19
- <date>2013-05-07</date>
20
- <time>13:50:31</time>
21
- <contents><target name="magecommunity"><dir name="Briel"><dir name="ReviewPlus"><dir name="Block"><dir name="Adminhtml"><dir name="Clientlog"><file name="Grid.php" hash="798e291ca45dde24ba06fe7c43c820b7"/><dir name="Renderer"><file name="Orderid.php" hash="d827cb94ef34cd3dd3fba167cd4b1501"/><file name="Sendtime.php" hash="5c6965be08be0856b9ae7be49be5c2d4"/><file name="Status.php" hash="0ae75b2f2740f047f3b2d07d8a80a507"/></dir></dir><file name="Clientlog.php" hash="54d09a42d11006f2425fb4c7227e6f0f"/><file name="Ordertab.php" hash="043b4df77ecf8311b56dd26722621d3a"/><dir name="Reviews"><file name="Grid.php" hash="77d93f579ed2e87d2ffbc9c9015f761c"/><dir name="Renderer"><file name="Rating.php" hash="34d9b45c8012d393bbad8361b55863c0"/></dir></dir><file name="Reviews.php" hash="57fc9e182ae5221c9fb2f4485a047dae"/></dir><file name="Review.php" hash="6b181bd14a05633e49c81758c2eeab57"/></dir><dir name="Helper"><file name="Data.php" hash="b6d18df74629c1499a1880fb9347a39e"/></dir><dir name="Model"><file name="Clientlog.php" hash="3d9d0b2896f596eed7c8b94e0ba8b457"/><dir name="Mysql4"><file name="Setup.php" hash="7afa5ad62c814dd2509791476354bd16"/></dir><file name="Observer.php" hash="03ac868c2af66025540ec686cc60074d"/><dir name="Resource"><dir name="Clientlog"><file name="Collection.php" hash="2b4a6adbe1faebcae17a8b6e2007a346"/></dir><file name="Clientlog.php" hash="b2570fccc223172f2194153a495c3034"/><dir name="Reviews"><file name="Collection.php" hash="a821396365da812545a22c1030076fad"/></dir><file name="Reviews.php" hash="b3c0b995486a6f0da43693998fb4bf58"/></dir><file name="Reviews.php" hash="bcd36606992998de00a52db4cf121e6a"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="ClientlogController.php" hash="95b97a615c71b43f083d017d375ee05a"/><file name="OrdertabController.php" hash="52828b442e388679546455143dc0c374"/><file name="ReviewsController.php" hash="9e066cb473dd13640bcdfa051ce4dcc6"/></dir><file name="IndexController.php" hash="3ba73988c86e2c9831670ab26462afaa"/></dir><dir name="etc"><file name="config.xml" hash="c837fe8d8fef41051a55167676740421"/><file name="system.xml" hash="be1b59421ec02c09285f483118e16472"/></dir><dir name="sql"><dir name="briel_reviewplus_setup"><file name="mysql4-install-0.9.1.php" hash="4b7d1693622586b1ffbf0c71d874d75a"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Briel_ReviewPlus.xml" hash="896cf8c524bc7cca77b68a94e9747f7b"/></dir></target><target name="magedesign"><dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="briel_reviewplus.xml" hash="20ec754748d22432060acae114be3937"/></dir><dir name="template"><dir name="briel_reviewplus"><file name="ordertab.phtml" hash="a586e49fa33021262b9579bb07cbb8b1"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="briel_reviewplus.xml" hash="5de4dbf6075c40c147da6c42c61ccf9b"/></dir><dir name="template"><dir name="briel_reviewplus"><file name="review.phtml" hash="2ea263fdac247bf7943ee54d99935e5e"/></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir><dir name="en_US"><dir name="template"><dir name="email"><file name="reviewplus_email.html" hash="9ddf01044dc7b6ce0cd9f3f0a99bce33"/></dir></dir></dir></dir></target><target name="mageskin"><dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><dir name="reviewplus_email_template"><file name="1-star.jpg" hash="3d6fbc36d97bde7d10cfe2ca1a86f89f"/><file name="2-stars.jpg" hash="311c7e4d5cb9af3badaa45436d28ad24"/><file name="3-stars.jpg" hash="859affa52072d9c6809c4dbd5f70d70a"/><file name="4-stars.jpg" hash="307572d5b17dbc2e4c6d201ac5c53e2a"/><file name="5-stars.jpg" hash="dbce095164d7af04b0950f5cf2a84e3b"/></dir></dir></dir></dir></dir></dir></target></contents>
22
  <compatible/>
23
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
24
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Briel_ReviewPlus</name>
4
+ <version>1.0.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.gnu.org/licenses/gpl.html">GNU General Public License (GPL)</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>ReviewPlus will help boost the amount of reviews you receive for your products by sending a review notification email to customers.</summary>
10
+ <description>Version 1.0 is out! Please make sure you upgrade to our latest version, which includes a whole host of bug fixes and some new features:&lt;br /&gt;&#xD;
11
+ - automated install for transactional email, &lt;br /&gt;&#xD;
12
+ - support for configurable products, &lt;br /&gt;&#xD;
13
+ - better looking transactional email, &lt;br /&gt; &#xD;
14
+ - much improved review form, &lt;br /&gt;&#xD;
15
+ - a help page in Magento admin to help you configure the extension properly. &lt;br /&gt;&#xD;
16
+ &lt;strong&gt;WARNING! - Because of the new features the install needs to drop older versions' database tables. Please approve any reviews you still need to approve before starting the install.&lt;/strong&gt;&#xD;
17
+ Once enabled and configured, the extension will start logging orders and as per user defined settings will start sending review notification emails.&lt;br /&gt;&#xD;
18
  &lt;br /&gt;&#xD;
19
  In order for this to work properly, make sure both cron and email sending are configured and working on your server. And please define a transactional email based on our template.&lt;br /&gt;&#xD;
20
  &lt;br /&gt;&#xD;
23
  Once received, reviews can be approved from the Product Reviews grid and will appear on your site.</description>
24
  <notes>Stable version, fully functional on our website.</notes>
25
  <authors><author><name>Onel Velica</name><user>mage_briel</user><email>mage@briel.ro</email></author></authors>
26
+ <date>2013-08-05</date>
27
+ <time>15:50:49</time>
28
+ <contents><target name="magecommunity"><dir name="Briel"><dir name="ReviewPlus"><dir name="Block"><dir name="Adminhtml"><dir name="Clientlog"><file name="Grid.php" hash="711661f41dc3f618a4f8c7595a00cd90"/><dir name="Renderer"><file name="DueDate.php" hash="6936085bb9450377ea4d00edc9860496"/><file name="Orderid.php" hash="2b210da51dac76d661f1b8e5a990b80f"/><file name="Sendtime.php" hash="5c6965be08be0856b9ae7be49be5c2d4"/><file name="Status.php" hash="0ae75b2f2740f047f3b2d07d8a80a507"/><file name="TimeSent.php" hash="02b81ccb1924827b4370b89e814a25a7"/></dir></dir><file name="Clientlog.php" hash="54d09a42d11006f2425fb4c7227e6f0f"/><file name="Ordertab.php" hash="043b4df77ecf8311b56dd26722621d3a"/><dir name="Reviews"><file name="Grid.php" hash="36a17a6e1e359509e8099ab67ae95750"/><dir name="Renderer"><file name="EditAction.php" hash="6f7c60d924c85fe738d1488400ad3304"/><file name="PostedTime.php" hash="27324e865cb7284811725217deeca43d"/><file name="Rating.php" hash="34d9b45c8012d393bbad8361b55863c0"/></dir></dir><file name="Reviews.php" hash="57fc9e182ae5221c9fb2f4485a047dae"/></dir><file name="Review.php" hash="6b181bd14a05633e49c81758c2eeab57"/></dir><dir name="Helper"><file name="Data.php" hash="b6d18df74629c1499a1880fb9347a39e"/></dir><dir name="Model"><file name="Clientlog.php" hash="3d9d0b2896f596eed7c8b94e0ba8b457"/><dir name="Mysql4"><file name="Setup.php" hash="7afa5ad62c814dd2509791476354bd16"/></dir><file name="Observer.php" hash="52d40fc6b9f5f25fc8fe642e6bb027dc"/><dir name="Resource"><dir name="Clientlog"><file name="Collection.php" hash="2b4a6adbe1faebcae17a8b6e2007a346"/></dir><file name="Clientlog.php" hash="b2570fccc223172f2194153a495c3034"/><dir name="Reviews"><file name="Collection.php" hash="a821396365da812545a22c1030076fad"/></dir><file name="Reviews.php" hash="b3c0b995486a6f0da43693998fb4bf58"/></dir><file name="Reviews.php" hash="bcd36606992998de00a52db4cf121e6a"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="ClientlogController.php" hash="896d903acdcc34d3f9aade24cb7ef963"/><file name="OrdertabController.php" hash="8db0c6595629f3d7d10a97184f52c131"/><file name="ReviewsController.php" hash="ce73d49915a99f1b2bafd34de07f0cf2"/></dir><file name="IndexController.php" hash="bf170783e2e9af4faddbcbf06803040b"/></dir><dir name="etc"><file name="config.xml" hash="b6ca75eb57d0a754d74b5f302a0c20e8"/><file name="system.xml" hash="be1b59421ec02c09285f483118e16472"/></dir><dir name="sql"><dir name="briel_reviewplus_setup"><file name="mysql4-install-0.9.1.php" hash="4b7d1693622586b1ffbf0c71d874d75a"/><file name="mysql4-install-0.9.2.php" hash="4217c703e05133de9c187863410f5d2c"/><file name="mysql4-install-1.0.0.php" hash="4217c703e05133de9c187863410f5d2c"/><file name="mysql4-upgrade-0.9.1-1.0.0.php" hash="4217c703e05133de9c187863410f5d2c"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Briel_ReviewPlus.xml" hash="896cf8c524bc7cca77b68a94e9747f7b"/></dir></target><target name="magedesign"><dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="briel_reviewplus.xml" hash="1387d757ab0fa9fada043e9d6b53bb64"/></dir><dir name="template"><dir name="briel_reviewplus"><file name="edit.phtml" hash="5311c0eccfdcc1c2e752ad71d65acf3d"/><file name="help.phtml" hash="7719d9c654699717231fc18115e7b03c"/><file name="ordertab.phtml" hash="0145639887ef5d9b17b967a3aa1a960d"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="briel_reviewplus.xml" hash="bf61877ac3a0d32fcb4517e725f11302"/></dir><dir name="template"><dir name="briel_reviewplus"><file name="review.phtml" hash="044986df389c1372195c182626976128"/></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><dir name="reviewplus_email_template"><file name="1-star.jpg" hash="d4c998b0f2efc05ee544adc9fccfd0b2"/><file name="2-stars.jpg" hash="232cc822dd3d944ff7aca96e52ab35ac"/><file name="3-stars.jpg" hash="1cd84c7a07b3c76c5669ef288a12b525"/><file name="4-stars.jpg" hash="69f5b9daf6732819b9eb030309da7a47"/><file name="5-stars.jpg" hash="e0144f14ed7e1b7dcec68e83998b0555"/><file name="star.gif" hash="c98f042b486593285337166e9e2e2a03"/></dir></dir><dir name="css"><file name="briel_reviewplus.css" hash="4133d51223217c534f80d61c4b37b84d"/></dir></dir></dir></dir></dir></target></contents>
29
  <compatible/>
30
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
31
  </package>
skin/frontend/base/default/css/briel_reviewplus.css ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*---STARTBOX-styling---*/
2
+ .rating-label { margin:3px 15px 0 0; }
3
+ .review-label { margin-top:10px; }
4
+ .star-rating, .star-rating a:hover, .star-rating a:active, .star-rating a:focus, .star-rating .current-rating {
5
+ background:url('/skin/frontend/base/default/images/reviewplus_email_template/star.gif') left -1000px repeat-x;
6
+ }
7
+ .star-rating {
8
+ position:relative;
9
+ width:125px;
10
+ height:25px;
11
+ overflow:hidden;
12
+ list-style:none;
13
+ margin:0;
14
+ padding:0;
15
+ background-position: left top;
16
+ }
17
+ .star-rating li { display:inline; }
18
+ .star-rating a,
19
+ .star-rating .current-rating {
20
+ position:absolute;
21
+ top:0;
22
+ left:0;
23
+ text-indent:-1000em;
24
+ height:25px;
25
+ line-height:25px;
26
+ outline:none;
27
+ overflow:hidden;
28
+ border: none;
29
+ }
30
+ .star-rating a:hover, .star-rating a:active, .star-rating a:focus { background-position:left bottom; }
31
+ .star-rating a.one-star { width:20%; z-index:6; }
32
+ .star-rating a.two-stars { width:40%; z-index:5; }
33
+ .star-rating a.three-stars { width:60%; z-index:4; }
34
+ .star-rating a.four-stars { width:80%; z-index:3; }
35
+ .star-rating a.five-stars { width:100%; z-index:2; }
36
+ .star-rating .current-rating { z-index:1; background-position:left center; }
skin/frontend/base/default/images/reviewplus_email_template/1-star.jpg CHANGED
Binary file
skin/frontend/base/default/images/reviewplus_email_template/2-stars.jpg CHANGED
Binary file
skin/frontend/base/default/images/reviewplus_email_template/3-stars.jpg CHANGED
Binary file
skin/frontend/base/default/images/reviewplus_email_template/4-stars.jpg CHANGED
Binary file
skin/frontend/base/default/images/reviewplus_email_template/5-stars.jpg CHANGED
Binary file
skin/frontend/base/default/images/reviewplus_email_template/star.gif ADDED
Binary file