RateItCool_ProductReviews - Version 1.0.4

Version Notes

- Add the detail review values
- Add product review form at public page

Download this release

Release Info

Developer Thomas Gravel
Extension RateItCool_ProductReviews
Version 1.0.4
Comparing to
See all releases


Code changes from version 1.0.3 to 1.0.4

app/code/community/RateItCool/ProductReviews/Block/Order/Item/Renderer/Default.php CHANGED
@@ -35,7 +35,7 @@
35
  class RateItCool_ProductReviews_Block_Order_Item_Renderer_Default extends Mage_Sales_Block_Order_Item_Renderer_Default
36
  {
37
  public function getName() {
38
- return 'NBLA';
39
  }
40
 
41
  public function getSummaryHtml($product, $templateType, $displayIfNoReviews)
35
  class RateItCool_ProductReviews_Block_Order_Item_Renderer_Default extends Mage_Sales_Block_Order_Item_Renderer_Default
36
  {
37
  public function getName() {
38
+
39
  }
40
 
41
  public function getSummaryHtml($product, $templateType, $displayIfNoReviews)
app/code/community/RateItCool/ProductReviews/etc/config.xml CHANGED
@@ -74,6 +74,8 @@
74
  <api_user>demo</api_user>
75
  <api_key>password</api_key>
76
  <server_api_key>password</server_api_key>
 
 
77
  </productreviews>
78
  </catalog>
79
  </default>
74
  <api_user>demo</api_user>
75
  <api_key>password</api_key>
76
  <server_api_key>password</server_api_key>
77
+ <limit>3</limit>
78
+ <security_text>mysecret</security_text>
79
  </productreviews>
80
  </catalog>
81
  </default>
app/code/community/RateItCool/ProductReviews/etc/system.xml CHANGED
@@ -56,11 +56,27 @@
56
  <server_api_key translate="label">
57
  <label>Server API Key</label>
58
  <frontend_type>text</frontend_type>
59
- <sort_order>2</sort_order>
60
  <show_in_default>1</show_in_default>
61
  <show_in_website>1</show_in_website>
62
  <show_in_store>1</show_in_store>
63
  </server_api_key>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  </fields>
65
  </RateItCool_ProductReviews>
66
  </groups>
56
  <server_api_key translate="label">
57
  <label>Server API Key</label>
58
  <frontend_type>text</frontend_type>
59
+ <sort_order>3</sort_order>
60
  <show_in_default>1</show_in_default>
61
  <show_in_website>1</show_in_website>
62
  <show_in_store>1</show_in_store>
63
  </server_api_key>
64
+ <limit translate="label">
65
+ <label>Limit of reviews</label>
66
+ <frontend_type>text</frontend_type>
67
+ <sort_order>4</sort_order>
68
+ <show_in_default>1</show_in_default>
69
+ <show_in_website>1</show_in_website>
70
+ <show_in_store>1</show_in_store>
71
+ </limit>
72
+ <security_text translate="label">
73
+ <label>Secret text for review form</label>
74
+ <frontend_type>text</frontend_type>
75
+ <sort_order>5</sort_order>
76
+ <show_in_default>1</show_in_default>
77
+ <show_in_website>1</show_in_website>
78
+ <show_in_store>1</show_in_store>
79
+ </security_text>
80
  </fields>
81
  </RateItCool_ProductReviews>
82
  </groups>
app/design/frontend/base/default/template/productreviews/helper/summary.phtml CHANGED
@@ -24,14 +24,103 @@
24
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
  */
26
  ?>
27
- <div class="ratings rate-it-cool-product-detail" data-gpnvalue="<?php echo $this->getGpnValue(); ?>" data-gpntype="<?php echo $this->getGpnType(); ?>">
28
- <div class="rating-box">
29
- <div class="rating rate-it-cool-review-summary-empty rate-it-cool-review-summary" style=""></div>
30
- </div>
31
- <div class="ratingCount">(<span class="rate-it-cool-review-counts">0</span>)</div>
32
- <!--
33
- <p class="rating-links rateit-cool-review-link" style="display:none;">
34
- <a href="<?php echo $this->getReviewsUrl() ?>"><?php echo $this->__('ShowReviews') ?></a>
35
- </p>
36
- -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  </div>
24
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
  */
26
  ?>
27
+ <div class="ratings rate-it-cool-product-detail"
28
+ data-gpnvalue="<?php echo $this->getGpnValue(); ?>"
29
+ data-language="<?php echo Mage::app()->getLocale()->getLocaleCode(); ?>"
30
+ data-gpntype="<?php echo $this->getGpnType(); ?>">
31
+
32
+ <div class="rating-box">
33
+ <div class="rating rate-it-cool-review-summary-empty rate-it-cool-review-summary" style=""></div>
34
+ </div>
35
+ <div class="ratingCount">(<span class="rate-it-cool-review-counts">0</span>)
36
+ <span class="icon-sprite rate-it-cool-show-stars" style="display:none;"></span>
37
+ </div>
38
+ </div>
39
+ <div class="ratings rate-it-cool-stars-detail-table" style="display: none;">
40
+ <table style="width:100%;">
41
+ <tbody>
42
+ <tr>
43
+ <th colspan="2"><?php echo $this->__('Overview'); ?></th>
44
+ </tr>
45
+ </tbody>
46
+ <tr>
47
+ <td>
48
+ <div class="rating-box">
49
+ <div class="rating" style="width: 100%;"></div>
50
+ </div>
51
+ </td>
52
+ <td>$review.star5</td>
53
+ </tr>
54
+ <tr>
55
+ <td>
56
+ <div class="rating-box">
57
+ <div class="rating" style="width: 80%;"></div>
58
+ </div>
59
+ </td>
60
+ <td>$review.star4</td>
61
+ </tr>
62
+ <tr>
63
+ <td>
64
+ <div class="rating-box">
65
+ <div class="rating" style="width: 60%;"></div>
66
+ </div>
67
+ </td>
68
+ <td>$review.star3</td>
69
+ </tr>
70
+ <tr>
71
+ <td>
72
+ <div class="rating-box">
73
+ <div class="rating" style="width: 40%;"></div>
74
+ </div>
75
+ </td>
76
+ <td>$review.star2</td>
77
+ </tr>
78
+ <tr>
79
+ <td>
80
+ <div class="rating-box">
81
+ <div class="rating" style="width: 20%;"></div>
82
+ </div>
83
+ </td>
84
+ <td>$review.star1</td>
85
+ </tr>
86
+ </table>
87
+ <table style="width:100%;$details.display">
88
+ <tbody>
89
+ <tr>
90
+ <th colspan="2"><?php echo $this->__('Detail'); ?> ($details.total/$review.total)</th>
91
+ </tr>
92
+ </tbody>
93
+ <tr style="$details.detail1.display">
94
+ <td>$details.detail1.title</td>
95
+ <td class="stars">
96
+ <div class="rating-box">
97
+ <div class="rating" style="width: $review.details.detail1%;"></div>
98
+ </div>
99
+ </td>
100
+ </tr>
101
+ <tr style="$details.detail2.display">
102
+ <td>$details.detail2.title</td>
103
+ <td class="stars">
104
+ <div class="rating-box">
105
+ <div class="rating" style="width: $review.details.detail2%;"></div>
106
+ </div>
107
+ </td>
108
+ </tr>
109
+ <tr style="$details.detail3.display">
110
+ <td>$details.detail3.title</td>
111
+ <td class="stars">
112
+ <div class="rating-box">
113
+ <div class="rating" style="width: $review.details.detail3%;"></div>
114
+ </div>
115
+ </td>
116
+ </tr>
117
+ <tr style="$details.detail4.display">
118
+ <td>$details.detail4.title</td>
119
+ <td class="stars">
120
+ <div class="rating-box">
121
+ <div class="rating" style="width: $review.details.detail4%;"></div>
122
+ </div>
123
+ </td>
124
+ </tr>
125
+ </table>
126
  </div>
app/design/frontend/base/default/template/productreviews/helper/summary_short.phtml CHANGED
@@ -24,7 +24,10 @@
24
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
  */
26
  ?>
27
- <div class="ratings rate-it-cool-product" data-gpnvalue="<?php echo $this->getGpnValue(); ?>" data-gpntype="<?php echo $this->getGpnType(); ?>">
 
 
 
28
  <div class="rating-box">
29
  <div class="rating rate-it-cool-review-summary-empty rate-it-cool-review-summary" style=""></div>
30
  </div>
24
  * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
  */
26
  ?>
27
+ <div class="ratings rate-it-cool-product"
28
+ data-gpnvalue="<?php echo $this->getGpnValue(); ?>"
29
+ data-language="<?php echo Mage::app()->getLocale()->getLocaleCode(); ?>"
30
+ data-gpntype="<?php echo $this->getGpnType(); ?>">
31
  <div class="rating-box">
32
  <div class="rating rate-it-cool-review-summary-empty rate-it-cool-review-summary" style=""></div>
33
  </div>
app/design/frontend/base/default/template/productreviews/javascript.phtml CHANGED
@@ -5,7 +5,8 @@
5
  RateItCoolAPI.init({
6
  username: '<?php echo Mage::getStoreConfig('catalog/RateItCool_ProductReviews/api_user'); ?>',
7
  password: '<?php echo Mage::getStoreConfig('catalog/RateItCool_ProductReviews/api_key'); ?>',
8
- limit: '3',
 
9
  noConflict: false
10
  });
11
  </script>
5
  RateItCoolAPI.init({
6
  username: '<?php echo Mage::getStoreConfig('catalog/RateItCool_ProductReviews/api_user'); ?>',
7
  password: '<?php echo Mage::getStoreConfig('catalog/RateItCool_ProductReviews/api_key'); ?>',
8
+ limit: '<?php echo Mage::getStoreConfig('catalog/RateItCool_ProductReviews/limit'); ?>',
9
+ securitytext: '<?php echo Mage::getStoreConfig('catalog/RateItCool_ProductReviews/security_text'); ?>',
10
  noConflict: false
11
  });
12
  </script>
app/design/frontend/base/default/template/productreviews/product/view/list.phtml CHANGED
@@ -58,9 +58,19 @@
58
  </div>
59
 
60
  <div id="rate-it-cool-product-feedbacks-template" style="display:none;">
 
 
 
 
 
 
 
 
 
 
61
  <div class="feedbackElements">
62
  <div class="overview">
63
- <?php echo $this->__('Reviews'); ?>
64
  <table class="feedbackOverview">
65
  <tr>
66
  <td class="ratings">
@@ -123,6 +133,210 @@
123
  </td>
124
  </tr>
125
  </table>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
126
  </div>
127
  <div class="recommend">
128
  <?php echo $this->__('Customer recommended this product'); ?>: $recommend%
@@ -154,9 +368,11 @@
154
  <div class="rating" style="width:$review.stars%;"></div>
155
  </div>
156
  </div>
157
- <span class="date">($review.time)</span>
158
  <h3>$review.title</h3>
159
-
 
 
160
  </dt>
161
  <dd>
162
  $review.content
58
  </div>
59
 
60
  <div id="rate-it-cool-product-feedbacks-template" style="display:none;">
61
+ <div class="missingFeedback">
62
+ <div class="rate-it-cool-product-public-feedbackform">
63
+ <h3><?php echo $this->__('First product review for this product'); ?></h3>
64
+ <div id="feedbackform" class="rate-it-cool-feedback-form" style="">
65
+ <form name="productDetailFeedbackform$gpnvalue">
66
+ $feedbackForm
67
+ </form>
68
+ </div>
69
+ </div>
70
+ </div>
71
  <div class="feedbackElements">
72
  <div class="overview">
73
+ <h3><?php echo $this->__('Reviews'); ?></h3>
74
  <table class="feedbackOverview">
75
  <tr>
76
  <td class="ratings">
133
  </td>
134
  </tr>
135
  </table>
136
+ <table class="rate-it-cool-detail-stars" style="$detail.show">
137
+ <thead>
138
+ <tr>
139
+ <th colspan="2"><?php echo $this->__('Detail'); ?> ($details.total / $overview.total)</th>
140
+ </tr>
141
+ </thead>
142
+ <tr style="$details.detail1.display">
143
+ <td>$details.detail1.title</td>
144
+ <td class="ratings">
145
+ <div class="rating-box">
146
+ <div class="rating" style="width:$detail.detail1%;"></div>
147
+ </div>
148
+ </td>
149
+ </tr>
150
+ <tr style="$details.detail2.display">
151
+ <td>$details.detail2.title</td>
152
+ <td class="ratings">
153
+ <div class="rating-box">
154
+ <div class="rating" style="width:$detail.detail2%;"></div>
155
+ </div>
156
+ </td>
157
+ </tr>
158
+ <tr style="$details.detail3.display">
159
+ <td>$details.detail3.title</td>
160
+ <td class="ratings">
161
+ <div class="rating-box">
162
+ <div class="rating" style="width:$detail.detail3%;"></div>
163
+ </div>
164
+ </td>
165
+ </tr>
166
+ <tr style="$details.detail4.display">
167
+ <td>$details.detail4.title</td>
168
+ <td class="ratings">
169
+ <div class="rating-box">
170
+ <div class="rating" style="width:$detail.detail4%;"></div>
171
+ </div>
172
+ </td>
173
+ </tr>
174
+ </table>
175
+ <div class="clearfix"></div>
176
+ </div>
177
+ <div class="rate-it-cool-product-public-feedbackform">
178
+ <div class="rate-it-cool-product-feedbackform">
179
+ <a href="#"
180
+ class="rateit-cool-show-feedbackform-link"
181
+ title="<?php echo $this->__('Write a product review.'); ?>"><?php echo $this->__('Write a product review'); ?></a>
182
+ </div>
183
+ <div id="feedbackform" class="rate-it-cool-feedback-form" style="display:none;">
184
+ <br>
185
+ <form name="productDetailFeedbackform$gpnvalue">
186
+ <input type="hidden" name="gpntype" value="$gpntype"/>
187
+ <input type="hidden" name="gpnvalue" value="$gpnvalue"/>
188
+ <input type="hidden" name="source" value="public"/>
189
+ <input type="hidden" name="language" value="<?php echo Mage::app()->getLocale()->getLocaleCode(); ?>"/>
190
+ <table>
191
+ <tr>
192
+ <td class="label second"><?php echo $this->__('Global'); ?></td>
193
+ <td class="ratings">
194
+ <span class="reviewStars">
195
+ <input type="hidden" class="stars" name="stars" value="0"/>
196
+ <div class="rating-box oneStars" style="width: 13px;float:left;" title="<?php echo Mage::helper('RateItCool_ProductReviews')->__('not really ok'); ?>">
197
+ <div class="rating rate-it-cool-review-summary-empty rate-it-cool-review-summary"></div>
198
+ </div>
199
+ <div class="rating-box twoStars" style="width: 13px;float:left;" title="<?php echo Mage::helper('RateItCool_ProductReviews')->__('hm ok'); ?>">
200
+ <div class="rating rate-it-cool-review-summary-empty rate-it-cool-review-summary"></div>
201
+ </div>
202
+ <div class="rating-box threeStars" style="width: 13px;float:left;" title="<?php echo Mage::helper('RateItCool_ProductReviews')->__('ok'); ?>">
203
+ <div class="rating rate-it-cool-review-summary-empty rate-it-cool-review-summary"></div>
204
+ </div>
205
+ <div class="rating-box fourStars" style="width: 13px;float:left;" title="<?php echo Mage::helper('RateItCool_ProductReviews')->__('cool'); ?>">
206
+ <div class="rating rate-it-cool-review-summary-empty rate-it-cool-review-summary"></div>
207
+ </div>
208
+ <div class="rating-box fiveStars" style="width: 13px;float:left;" title="<?php echo Mage::helper('RateItCool_ProductReviews')->__('coolest'); ?>">
209
+ <div class="rating rate-it-cool-review-summary-empty rate-it-cool-review-summary"></div>
210
+ </div>
211
+ </div>
212
+ </span>
213
+ </td>
214
+ </tr>
215
+ <tr class="reviewDetail1" style="display:none;">
216
+ <td class="label"></td>
217
+ <td class="ratings">
218
+ <span class="reviewStars">
219
+ <input type="hidden" class="stars" name="detail1" value="0"/>
220
+ <div class="rating-box oneStars" style="width: 13px;float:left;" title="<?php echo Mage::helper('RateItCool_ProductReviews')->__('not really ok'); ?>">
221
+ <div class="rating rate-it-cool-review-summary-empty rate-it-cool-review-summary"></div>
222
+ </div>
223
+ <div class="rating-box twoStars" style="width: 13px;float:left;" title="<?php echo Mage::helper('RateItCool_ProductReviews')->__('hm ok'); ?>">
224
+ <div class="rating rate-it-cool-review-summary-empty rate-it-cool-review-summary"></div>
225
+ </div>
226
+ <div class="rating-box threeStars" style="width: 13px;float:left;" title="<?php echo Mage::helper('RateItCool_ProductReviews')->__('ok'); ?>">
227
+ <div class="rating rate-it-cool-review-summary-empty rate-it-cool-review-summary"></div>
228
+ </div>
229
+ <div class="rating-box fourStars" style="width: 13px;float:left;" title="<?php echo Mage::helper('RateItCool_ProductReviews')->__('cool'); ?>">
230
+ <div class="rating rate-it-cool-review-summary-empty rate-it-cool-review-summary"></div>
231
+ </div>
232
+ <div class="rating-box fiveStars" style="width: 13px;float:left;" title="<?php echo Mage::helper('RateItCool_ProductReviews')->__('coolest'); ?>">
233
+ <div class="rating rate-it-cool-review-summary-empty rate-it-cool-review-summary"></div>
234
+ </div>
235
+ </div>
236
+ </span>
237
+ </td>
238
+ </tr>
239
+ <tr class="reviewDetail2" style="display:none;">
240
+ <td class="label second"></td>
241
+ <td class="ratings">
242
+ <span class="reviewStars">
243
+ <input type="hidden" class="stars" name="detail2" value="0"/>
244
+ <div class="rating-box oneStars" style="width: 13px;float:left;" title="<?php echo Mage::helper('RateItCool_ProductReviews')->__('not really ok'); ?>">
245
+ <div class="rating rate-it-cool-review-summary-empty rate-it-cool-review-summary"></div>
246
+ </div>
247
+ <div class="rating-box twoStars" style="width: 13px;float:left;" title="<?php echo Mage::helper('RateItCool_ProductReviews')->__('hm ok'); ?>">
248
+ <div class="rating rate-it-cool-review-summary-empty rate-it-cool-review-summary"></div>
249
+ </div>
250
+ <div class="rating-box threeStars" style="width: 13px;float:left;" title="<?php echo Mage::helper('RateItCool_ProductReviews')->__('ok'); ?>">
251
+ <div class="rating rate-it-cool-review-summary-empty rate-it-cool-review-summary"></div>
252
+ </div>
253
+ <div class="rating-box fourStars" style="width: 13px;float:left;" title="<?php echo Mage::helper('RateItCool_ProductReviews')->__('cool'); ?>">
254
+ <div class="rating rate-it-cool-review-summary-empty rate-it-cool-review-summary"></div>
255
+ </div>
256
+ <div class="rating-box fiveStars" style="width: 13px;float:left;" title="<?php echo Mage::helper('RateItCool_ProductReviews')->__('coolest'); ?>">
257
+ <div class="rating rate-it-cool-review-summary-empty rate-it-cool-review-summary"></div>
258
+ </div>
259
+ </div>
260
+ </span>
261
+ </td>
262
+ </tr>
263
+ <tr class="reviewDetail3" style="display:none;">
264
+ <td class="label"></td>
265
+ <td class="ratings">
266
+ <span class="reviewStars">
267
+ <input type="hidden" class="stars" name="detail3" value="0"/>
268
+ <div class="rating-box oneStars" style="width: 13px;float:left;" title="<?php echo Mage::helper('RateItCool_ProductReviews')->__('not really ok'); ?>">
269
+ <div class="rating rate-it-cool-review-summary-empty rate-it-cool-review-summary"></div>
270
+ </div>
271
+ <div class="rating-box twoStars" style="width: 13px;float:left;" title="<?php echo Mage::helper('RateItCool_ProductReviews')->__('hm ok'); ?>">
272
+ <div class="rating rate-it-cool-review-summary-empty rate-it-cool-review-summary"></div>
273
+ </div>
274
+ <div class="rating-box threeStars" style="width: 13px;float:left;" title="<?php echo Mage::helper('RateItCool_ProductReviews')->__('ok'); ?>">
275
+ <div class="rating rate-it-cool-review-summary-empty rate-it-cool-review-summary"></div>
276
+ </div>
277
+ <div class="rating-box fourStars" style="width: 13px;float:left;" title="<?php echo Mage::helper('RateItCool_ProductReviews')->__('cool'); ?>">
278
+ <div class="rating rate-it-cool-review-summary-empty rate-it-cool-review-summary"></div>
279
+ </div>
280
+ <div class="rating-box fiveStars" style="width: 13px;float:left;" title="<?php echo Mage::helper('RateItCool_ProductReviews')->__('coolest'); ?>">
281
+ <div class="rating rate-it-cool-review-summary-empty rate-it-cool-review-summary"></div>
282
+ </div>
283
+ </div>
284
+ </span>
285
+ </td>
286
+ </tr>
287
+ <tr class="reviewDetail4" style="display:none;">
288
+ <td class="label second"></td>
289
+ <td class="ratings">
290
+ <span class="reviewStars">
291
+ <input type="hidden" class="stars" name="detail4" value="0"/>
292
+ <div class="rating-box oneStars" style="width: 13px;float:left;" title="<?php echo Mage::helper('RateItCool_ProductReviews')->__('not really ok'); ?>">
293
+ <div class="rating rate-it-cool-review-summary-empty rate-it-cool-review-summary"></div>
294
+ </div>
295
+ <div class="rating-box twoStars" style="width: 13px;float:left;" title="<?php echo Mage::helper('RateItCool_ProductReviews')->__('hm ok'); ?>">
296
+ <div class="rating rate-it-cool-review-summary-empty rate-it-cool-review-summary"></div>
297
+ </div>
298
+ <div class="rating-box threeStars" style="width: 13px;float:left;" title="<?php echo Mage::helper('RateItCool_ProductReviews')->__('ok'); ?>">
299
+ <div class="rating rate-it-cool-review-summary-empty rate-it-cool-review-summary"></div>
300
+ </div>
301
+ <div class="rating-box fourStars" style="width: 13px;float:left;" title="<?php echo Mage::helper('RateItCool_ProductReviews')->__('cool'); ?>">
302
+ <div class="rating rate-it-cool-review-summary-empty rate-it-cool-review-summary"></div>
303
+ </div>
304
+ <div class="rating-box fiveStars" style="width: 13px;float:left;" title="<?php echo Mage::helper('RateItCool_ProductReviews')->__('coolest'); ?>">
305
+ <div class="rating rate-it-cool-review-summary-empty rate-it-cool-review-summary"></div>
306
+ </div>
307
+ </div>
308
+ </span>
309
+ </td>
310
+ </tr>
311
+ </table>
312
+ <br/>
313
+ <div class="feedback-title">
314
+ <input type="text" name="feedbackTitle" placeholder="<?php echo $this->__('Title of the review');?>" />
315
+ </div>
316
+ <div class="feedback-content">
317
+ <textarea name="feedbackContent" placeholder="<?php echo $this->__('Content of the review');?>"></textarea>
318
+ </div>
319
+ <div class="feedback-recommend">
320
+ <input name="recommend" type="checkbox"> <?php echo $this->__('I recommend the product to a friend'); ?>
321
+ </div>
322
+ <br/>
323
+ <div class="feedback-title">
324
+ <?php echo $this->__('Please fill in the fellowing text'); ?>: <b><?php echo Mage::getStoreConfig('catalog/RateItCool_ProductReviews/security_text'); ?></b>
325
+ <br/>
326
+ <input name="securityText" type="text" placeholder="">
327
+ </div>
328
+ <br/>
329
+ <div class="rateit-cool-send-feedback">
330
+ <a href="#" data-formname="productDetailFeedbackform$gpnvalue" class="button rateit-cool-send-produkt-feedback"><?php echo $this->__('Send the review');?></a>
331
+ </div>
332
+ </form>
333
+ <div class="rateit-cool-send-feedback-success" style="display:none">
334
+ <?php echo $this->__('Thank you for the review'); ?>
335
+ </div>
336
+ <div class="rateit-cool-send-feedback-error" style="display:none">
337
+ <?php echo $this->__("Can't send the review"); ?>
338
+ </div>
339
+ </div>
340
  </div>
341
  <div class="recommend">
342
  <?php echo $this->__('Customer recommended this product'); ?>: $recommend%
368
  <div class="rating" style="width:$review.stars%;"></div>
369
  </div>
370
  </div>
371
+ <span class="date">$review.time</span>
372
  <h3>$review.title</h3>
373
+ <span class="rate-it-cool-verified" style="$review.verified_source"><?php echo Mage::helper('RateItCool_ProductReviews')->__('verified'); ?></span>
374
+ <span class="rate-it-cool-public" style="$review.public_source"><?php echo Mage::helper('RateItCool_ProductReviews')->__('public'); ?></span>
375
+ <span class="rate-it-cool-mobile" style="$review.mobile_source"><?php echo Mage::helper('RateItCool_ProductReviews')->__('mobile'); ?></span>
376
  </dt>
377
  <dd>
378
  $review.content
app/locale/de_DE/RateItCool_ProductReviews.csv CHANGED
@@ -37,3 +37,9 @@
37
  "Shop Review Hint","Geben Sie uns zu unserm Shop, unserer Lieferung und unseren Preisen Feedback. Bitte benutzen Sie unser %sFeedback-Formular%s."
38
  "Maximum Stars text","Maximum Wert der Sterne %s"
39
  "Minimum Stars text","Minimum Wert der Sterne %s"
 
 
 
 
 
 
37
  "Shop Review Hint","Geben Sie uns zu unserm Shop, unserer Lieferung und unseren Preisen Feedback. Bitte benutzen Sie unser %sFeedback-Formular%s."
38
  "Maximum Stars text","Maximum Wert der Sterne %s"
39
  "Minimum Stars text","Minimum Wert der Sterne %s"
40
+ "verified","Verifizierter Kauf"
41
+ "public","Öffentliche Bewertung"
42
+ "mobile","Bewertung über die App"
43
+ "Write a product review","Schreiben Sie eine Bewertung"
44
+ "Please fill in the fellowing text","Bitte geben Sie den folgenden Sicherheitstext ein"
45
+ "First product review for this product","Es gab bisher noch keine Produktberwertungen."
app/locale/en_US/RateItCool_ProductReviews.csv CHANGED
@@ -37,3 +37,9 @@
37
  "Shop Review Hint","You can give us a review of our shop, our shippment and price. Please use this %sFeedback form%s."
38
  "Maximum Stars text","Maximum of Stars %s"
39
  "Minimum Stars text","Minimum of Stars %s"
 
 
 
 
 
 
37
  "Shop Review Hint","You can give us a review of our shop, our shippment and price. Please use this %sFeedback form%s."
38
  "Maximum Stars text","Maximum of Stars %s"
39
  "Minimum Stars text","Minimum of Stars %s"
40
+ "verified","Verified customer"
41
+ "public","Public review"
42
+ "mobile","Review from mobile app"
43
+ "Write a product review","Write a product review"
44
+ "Please fill in the fellowing text","Please fill in the fellowing text"
45
+ "First product review for this product","First product review for this product."
js/rateitcool/rateit.cool.js CHANGED
@@ -5,7 +5,11 @@ var RateItCoolAPI = (function($){
5
  _version = '1.0.0',
6
  _limit = 3,
7
  _jQuery = $,
8
- _oldjQuery = $;
 
 
 
 
9
 
10
  var _zerofilledGtin = function(n,w) {
11
  if (n.length < 13) {
@@ -19,15 +23,27 @@ var RateItCoolAPI = (function($){
19
 
20
  var _ratingsProductList = function () {
21
  var productlistSpans = _jQuery('.rate-it-cool-product');
 
22
  if (productlistSpans && productlistSpans.length > 0) {
23
 
24
  var gpntype = '',
25
  gpnvalues = {},
26
  gpnvalue = '',
27
- error = true;
 
 
 
28
  for ( var i = 0; i < productlistSpans.length; i++ ) {
29
  if (_jQuery(productlistSpans[ i ]).attr('data-gpntype') !== undefined) {
30
- gpntype = _jQuery(productlistSpans[ i ]).attr('data-gpntype');
 
 
 
 
 
 
 
 
31
  }
32
  if (_jQuery(productlistSpans[ i ]).attr('data-gpnvalue') !== undefined) {
33
  gpnvalue = _jQuery(productlistSpans[ i ]).attr('data-gpnvalue');
@@ -43,12 +59,15 @@ var RateItCoolAPI = (function($){
43
  error = false;
44
  }
45
  }
 
 
 
46
  }
47
  if (!error) {
48
  _jQuery.each(gpnvalues, function(gpntype, values) {
49
  if (values.length > 0) {
50
  _jQuery.ajax({
51
- url : 'https://api.rateit.cool/stars/' + gpntype + '/' + values.join(','),
52
  method: 'GET',
53
  dataType : 'json',
54
  crossDomain: true,
@@ -64,6 +83,45 @@ var RateItCoolAPI = (function($){
64
  destinationElement.find('.rate-it-cool-review-counts').text(oneRatingResponse.total);
65
  destinationElement.find('.rate-it-cool-review-summary').removeClass('rate-it-cool-review-summary-empty').attr('style','width: ' + Number((oneRatingResponse.summary * 20).toFixed(0)) + '%;');
66
  destinationElement.find('.rateit-cool-review-link').show();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  });
68
  }
69
  }
@@ -78,12 +136,20 @@ var RateItCoolAPI = (function($){
78
 
79
  var productlistSpans = _jQuery('.rate-it-cool-product-detail'),
80
  gpntype = '',
81
- gpnvalue = '';
 
 
82
 
83
  if (productlistSpans && productlistSpans.length > 0) {
84
 
 
 
 
85
  if (_jQuery(productlistSpans[0]).attr('data-gpntype') !== undefined) {
86
  gpntype = _jQuery(productlistSpans[0]).attr('data-gpntype');
 
 
 
87
  }
88
  if (_jQuery(productlistSpans[0]).attr('data-gpnvalue') !== undefined) {
89
  gpnvalue = _jQuery(productlistSpans[0]).attr('data-gpnvalue');
@@ -91,7 +157,7 @@ var RateItCoolAPI = (function($){
91
  var destinationElement = _jQuery(productlistSpans[0]);
92
  if (gpntype && gpnvalue) {
93
  _jQuery.ajax({
94
- url : 'https://api.rateit.cool/stars/' + gpntype + '/' + gpnvalue,
95
  method: 'GET',
96
  dataType : 'json',
97
  crossDomain: true,
@@ -103,9 +169,55 @@ var RateItCoolAPI = (function($){
103
  success : function(data) {
104
  if (data.length > 0) {
105
  var oneRatingResponse = data[0];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
106
  destinationElement.find('.rate-it-cool-review-counts').text(oneRatingResponse.total);
107
  destinationElement.find('.rate-it-cool-review-summary').removeClass('rate-it-cool-review-summary-empty').attr('style','width: ' + Number((oneRatingResponse.summary * 20).toFixed(0)) + '%;');
108
- destinationElement.find('.rateit-cool-review-link').show();
109
  }
110
  }
111
  });
@@ -118,11 +230,15 @@ var RateItCoolAPI = (function($){
118
  gpnvalue = '',
119
  language = '',
120
  templateOneFeedback = _jQuery('#rate-it-cool-product-feedbacks-template .feedbackElement').html(),
 
 
121
  templateList = _jQuery('#rate-it-cool-product-feedbacks-template .feedbackElements').html();
122
-
123
  if (productfeedbackSpans.length > 0) {
124
  if (_jQuery(productfeedbackSpans[0]).attr('data-gpntype') !== undefined) {
125
  gpntype = _jQuery(productfeedbackSpans[0]).attr('data-gpntype');
 
 
 
126
  }
127
  if (_jQuery(productfeedbackSpans[0]).attr('data-gpnvalue') !== undefined) {
128
  gpnvalue = _jQuery(productfeedbackSpans[0]).attr('data-gpnvalue');
@@ -141,7 +257,7 @@ var RateItCoolAPI = (function($){
141
  if (gpntype && gpnvalue && language) {
142
 
143
  _jQuery.ajax({
144
- url : 'https://api.rateit.cool/feedback/' + gpntype + '/' + gpnvalue + '/' + language + '?limit=' + _limit + '&full=true' + extendedString,
145
  method: 'GET',
146
  dataType : 'json',
147
  crossDomain: true,
@@ -161,6 +277,10 @@ var RateItCoolAPI = (function($){
161
  if (data.region > 0) {
162
  counts = data.region;
163
  }
 
 
 
 
164
  templateList = templateList.replace('$five', data.overview.stars.five)
165
  .replace('$four', data.overview.stars.four)
166
  .replace('$three', data.overview.stars.three)
@@ -169,6 +289,22 @@ var RateItCoolAPI = (function($){
169
  .replace('$total.all', data.total.all)
170
  .replace('$total.language', data.total.language)
171
  .replace('$total.region', data.total.region)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
172
  .replace('$count', data.elements.length)
173
  .replace('$showNewtLink', (counts > data.elements.length?'block':'none'))
174
  .split('$gpntype').join(data.gpntype)
@@ -178,20 +314,60 @@ var RateItCoolAPI = (function($){
178
  data.elements.forEach(function(feedback) {
179
  // create elemnt from template
180
  var oneFeedback = templateOneFeedback;
 
 
 
181
  oneFeedback = oneFeedback.replace('$review.stars', (feedback.stars * 20))
182
- .replace('$review.time', new Date(feedback.time).toLocaleString())
183
  .replace('$review.title', feedback.title)
184
  .replace('$review.content', feedback.content)
185
  .split('$review.id').join(feedback._id)
186
  .split('$review.gpntype').join(data.gpntype)
187
  .split('$review.gpnvalue').join(data.gpnvalue)
188
  .split('$review.language').join(feedback.language + '_' + feedback.region)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
189
  .split('$review.positive').join(feedback.positive)
190
  .split('$review.negative').join(feedback.negative);
191
 
192
  feedbackElements.push(oneFeedback);
193
  });
194
  destinationElement.html(templateList.replace('$list',feedbackElements.join('')));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
195
  }
196
  }
197
  });
@@ -212,6 +388,9 @@ var RateItCoolAPI = (function($){
212
  if (productfeedbackSpans.length > 0) {
213
  if (_jQuery(productfeedbackSpans[0]).attr('data-gpntype') !== undefined) {
214
  gpntype = _jQuery(productfeedbackSpans[0]).attr('data-gpntype');
 
 
 
215
  }
216
  if (_jQuery(productfeedbackSpans[0]).attr('data-gpnvalue') !== undefined) {
217
  gpnvalue = _jQuery(productfeedbackSpans[0]).attr('data-gpnvalue');
@@ -235,7 +414,7 @@ var RateItCoolAPI = (function($){
235
  if (gpntype && gpnvalue && language) {
236
 
237
  _jQuery.ajax({
238
- url : 'https://api.rateit.cool/feedback/' + gpntype + '/' + gpnvalue + '/' + language + '?limit=' + _limit + extendedString,
239
  method: 'GET',
240
  dataType : 'json',
241
  crossDomain: true,
@@ -263,18 +442,38 @@ var RateItCoolAPI = (function($){
263
  if (data.elements && data.elements.length > 0) {
264
 
265
  var feedbackElements = [];
266
-
267
  data.elements.forEach(function(feedback) {
268
  // create elemnt from template
269
  var oneFeedback = templateOneFeedback;
 
 
 
270
  oneFeedback = oneFeedback.replace('$review.stars', (feedback.stars * 20))
271
- .replace('$review.time', new Date(feedback.time).toLocaleString())
272
  .replace('$review.title', feedback.title)
273
  .replace('$review.content', feedback.content)
274
  .split('$review.id').join(feedback._id)
275
  .split('$review.gpntype').join(data.gpntype)
276
  .split('$review.gpnvalue').join(data.gpnvalue)
277
  .split('$review.language').join(feedback.language + '_' + feedback.region)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
278
  .split('$review.positive').join(feedback.positive)
279
  .split('$review.negative').join(feedback.negative);
280
 
@@ -292,20 +491,50 @@ var RateItCoolAPI = (function($){
292
  var _registerClickFeedbackSend = function() {
293
  _jQuery('.rateit-cool-send-feedback').delegate('a', 'click', function(e){
294
  e.preventDefault();
295
- var gpntype = _jQuery('form[name=' + _jQuery(this).attr('data-formname') + ']').find('[name=gpntype]').val(),
296
- gpnvalue = _jQuery('form[name=' + _jQuery(this).attr('data-formname') + ']').find('[name=gpnvalue]').val(),
297
- language = _jQuery('form[name=' + _jQuery(this).attr('data-formname') + ']').find('[name=language]').val(),
 
 
 
 
 
 
298
  feedbackElement = {
299
- stars: parseInt(_jQuery('form[name=' + _jQuery(this).attr('data-formname') + ']').find('[name=stars]').val()),
300
- title: _jQuery('form[name=' + _jQuery(this).attr('data-formname') + ']').find('[name=feedbackTitle]').val(),
301
- content: _jQuery('form[name=' + _jQuery(this).attr('data-formname') + ']').find('[name=feedbackContent]').val(),
302
- recommend: (_jQuery('form[name=' + _jQuery(this).attr('data-formname') + ']').find('[name=recommend]').is(':checked')?1:0)
 
 
 
 
 
 
 
303
  },
304
- destinationElement = _jQuery(this);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
305
 
306
- if (gpntype && gpnvalue && language && feedbackElement.title !== '' && feedbackElement.content !== '' && feedbackElement.stars > 0) {
307
  _jQuery.ajax({
308
- url : 'https://api.rateit.cool/feedback/' + gpntype + '/' + gpnvalue + '/' + language,
309
  method: 'POST',
310
  data: JSON.stringify(feedbackElement),
311
  dataType : 'json',
@@ -317,14 +546,14 @@ var RateItCoolAPI = (function($){
317
  },
318
  success: function(data) {
319
  _jQuery('#' + destinationElement.attr('data-formname')).removeClass('error').addClass('success');
320
- _jQuery('form[name=' + destinationElement.attr('data-formname') + ']').hide();
321
- _jQuery('form[name=' + destinationElement.attr('data-formname') + ']').parent().find('.rateit-cool-send-feedback-error').hide();
322
- _jQuery('form[name=' + destinationElement.attr('data-formname') + ']').parent().find('.rateit-cool-send-feedback-success').show();
323
  },
324
  error: function() {
325
  _jQuery('#' + destinationElement.attr('data-formname')).removeClass('success').addClass('error');
326
- _jQuery('form[name=' + destinationElement.attr('data-formname') + ']').parent().find('.rateit-cool-send-feedback-success').hide();
327
- _jQuery('form[name=' + destinationElement.attr('data-formname') + ']').parent().find('.rateit-cool-send-feedback-error').show();
328
  }
329
  });
330
  } else {
@@ -345,57 +574,62 @@ var RateItCoolAPI = (function($){
345
  // fill stars on click
346
  _jQuery('.rate-it-cool-feedback-form').delegate('.oneStars', 'click', function(e) {
347
  e.preventDefault();
348
- _jQuery(this).parents('form').find('.rate-it-cool-review-summary').attr('style','');
349
  _jQuery(this).find('.rate-it-cool-review-summary').attr('style','width:100%;');
350
- _jQuery(this).parents('form').find('.oneStars .rate-it-cool-review-summary').attr('style','width:100%;');
351
- _jQuery(this).parents('form').find('[name=stars]').val(2);
352
- _jQuery(this).parents('form').find('.rate-it-cool-star-text').html(_jQuery(this).attr('title'));
 
353
  });
354
 
355
  _jQuery('.rate-it-cool-feedback-form').delegate('.twoStars', 'click', function(e) {
356
  e.preventDefault();
357
- _jQuery(this).parents('form').find('.rate-it-cool-review-summary').attr('style','');
358
  _jQuery(this).find('.rate-it-cool-review-summary').attr('style','width:100%;');
359
- _jQuery(this).parents('form').find('.oneStars .rate-it-cool-review-summary').attr('style','width:100%;');
360
- _jQuery(this).parents('form').find('.twoStars .rate-it-cool-review-summary').attr('style','width:100%;');
361
- _jQuery(this).parents('form').find('[name=stars]').val(2);
362
- _jQuery(this).parents('form').find('.rate-it-cool-star-text').html(_jQuery(this).attr('title'));
 
363
  });
364
 
365
  _jQuery('.rate-it-cool-feedback-form').delegate('.threeStars', 'click', function(e) {
366
  e.preventDefault();
367
- _jQuery(this).parents('form').find('.rate-it-cool-review-summary').attr('style','');
368
  _jQuery(this).find('.rate-it-cool-review-summary').attr('style','width:100%;');
369
- _jQuery(this).parents('form').find('.oneStars .rate-it-cool-review-summary').attr('style','width:100%;');
370
- _jQuery(this).parents('form').find('.twoStars .rate-it-cool-review-summary').attr('style','width:100%;');
371
- _jQuery(this).parents('form').find('.threeStars .rate-it-cool-review-summary').attr('style','width:100%;');
372
- _jQuery(this).parents('form').find('[name=stars]').val(3);
373
- _jQuery(this).parents('form').find('.rate-it-cool-star-text').html(_jQuery(this).attr('title'));
 
374
  });
375
 
376
  _jQuery('.rate-it-cool-feedback-form').delegate('.fourStars', 'click', function(e) {
377
  e.preventDefault();
378
- _jQuery(this).parents('form').find('.rate-it-cool-review-summary').attr('style','');
379
  _jQuery(this).find('.rate-it-cool-review-summary').attr('style','width:100%;');
380
- _jQuery(this).parents('form').find('.oneStars .rate-it-cool-review-summary').attr('style','width:100%;');
381
- _jQuery(this).parents('form').find('.twoStars .rate-it-cool-review-summary').attr('style','width:100%;');
382
- _jQuery(this).parents('form').find('.threeStars .rate-it-cool-review-summary').attr('style','width:100%;');
383
- _jQuery(this).parents('form').find('.fourStars .rate-it-cool-review-summary').attr('style','width:100%;');
384
- _jQuery(this).parents('form').find('[name=stars]').val(4);
385
- _jQuery(this).parents('form').find('.rate-it-cool-star-text').html(_jQuery(this).attr('title'));
 
386
  });
387
 
388
  _jQuery('.rate-it-cool-feedback-form').delegate('.fiveStars', 'click', function(e) {
389
  e.preventDefault();
390
- _jQuery(this).parents('form').find('.rate-it-cool-review-summary').attr('style','');
391
  _jQuery(this).find('.rate-it-cool-review-summary').attr('style','width:100%;');
392
- _jQuery(this).parents('form').find('.oneStars .rate-it-cool-review-summary').attr('style','width:100%;');
393
- _jQuery(this).parents('form').find('.twoStars .rate-it-cool-review-summary').attr('style','width:100%;');
394
- _jQuery(this).parents('form').find('.threeStars .rate-it-cool-review-summary').attr('style','width:100%;');
395
- _jQuery(this).parents('form').find('.fourStars .rate-it-cool-review-summary').attr('style','width:100%;');
396
- _jQuery(this).parents('form').find('.fiveStars .rate-it-cool-review-summary').attr('style','width:100%;');
397
- _jQuery(this).parents('form').find('[name=stars]').val(5);
398
- _jQuery(this).parents('form').find('.rate-it-cool-star-text').html(_jQuery(this).attr('title'));
 
399
  });
400
  // fill stars on click end
401
  };
@@ -414,7 +648,7 @@ var RateItCoolAPI = (function($){
414
  thisElement.attr('data-positive', (positive+1));
415
  _jQuery(destinationElement).html(positive+1);
416
  _jQuery.ajax({
417
- url : 'https://api.rateit.cool/feedback/' + gpntype + '/' + gpnvalue + '/' + language + '?helpful=positive&id='+feedbackId,
418
  method: 'PUT',
419
  dataType : 'json',
420
  crossDomain: true,
@@ -443,7 +677,7 @@ var RateItCoolAPI = (function($){
443
 
444
  if (feedbackId && gpntype && gpnvalue && language) {
445
  _jQuery.ajax({
446
- url : 'https://api.rateit.cool/feedback/' + gpntype + '/' + gpnvalue + '/' + language + '?incorrect=1&id='+feedbackId,
447
  method: 'PUT',
448
  dataType : 'json',
449
  crossDomain: true,
@@ -483,7 +717,7 @@ var RateItCoolAPI = (function($){
483
 
484
  if (feedbackId && gpntype && gpnvalue && language) {
485
  _jQuery.ajax({
486
- url : 'https://api.rateit.cool/feedback/' + gpntype + '/' + gpnvalue + '/' + language + '?helpful=negative&id='+feedbackId,
487
  method: 'PUT',
488
  dataType : 'json',
489
  crossDomain: true,
@@ -493,6 +727,8 @@ var RateItCoolAPI = (function($){
493
  xhr.setRequestHeader("X-Api-Version", _version);
494
  },
495
  success : function(data) {
 
 
496
  }
497
  });
498
  }
@@ -517,6 +753,13 @@ var RateItCoolAPI = (function($){
517
  });
518
  };
519
 
 
 
 
 
 
 
 
520
  var _showFeedbacksWithStarsOnClick = function() {
521
  _jQuery('a.showOnlyStars').on('click',function(e) {
522
  e.preventDefault();
@@ -539,7 +782,7 @@ var RateItCoolAPI = (function($){
539
  feedbackElements = [];
540
  if (gpntype && gpnvalue && language && count && extraParameter != undefined) {
541
  _jQuery.ajax({
542
- url : 'https://api.rateit.cool/feedback/' + gpntype + '/' + gpnvalue + '/' + language + '?limit=5&skip=' + count + extraParameter,
543
  method: 'GET',
544
  dataType : 'json',
545
  crossDomain: true,
@@ -568,14 +811,34 @@ var RateItCoolAPI = (function($){
568
  data.elements.forEach(function(feedback) {
569
  // create elemnt from template
570
  var oneFeedback = templateOneFeedback;
 
 
 
571
  oneFeedback = oneFeedback.replace('$review.stars', (feedback.stars * 20))
572
- .replace('$review.time', new Date(feedback.time).toLocaleString())
573
  .replace('$review.title', feedback.title)
574
  .replace('$review.content', feedback.content)
575
  .split('$review.id').join(feedback._id)
576
  .split('$review.gpntype').join(data.gpntype)
577
  .split('$review.gpnvalue').join(data.gpnvalue)
578
  .split('$review.language').join(feedback.language + '_' + feedback.region)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
579
  .split('$review.positive').join(feedback.positive)
580
  .split('$review.negative').join(feedback.negative);
581
  _jQuery('.rate-it-cool-product-feedbacks .list').append(oneFeedback);
@@ -606,8 +869,12 @@ var RateItCoolAPI = (function($){
606
  _sendNotHelpfulOnClick();
607
  _showFeedbacksWithStarsOnClick();
608
  _showMoreFeedbacksOnClick();
 
609
  _sendIncorrectOnClick();
610
-
 
 
 
611
  _openFeedbackForm();
612
  }
613
 
@@ -615,7 +882,8 @@ var RateItCoolAPI = (function($){
615
  init: function(params) {
616
  _username = params.username;
617
  _password = params.password;
618
- _limit = params.limit;
 
619
  if (params.noConflict) {
620
  _jQuery = jQuery.noConflict();
621
  $ = _oldjQuery;
5
  _version = '1.0.0',
6
  _limit = 3,
7
  _jQuery = $,
8
+ _oldjQuery = $,
9
+ _securityText = '',
10
+ _labels = {},
11
+ _server = 'https://api.rateit.cool/';
12
+ // _server = 'http://localhost:8080/';
13
 
14
  var _zerofilledGtin = function(n,w) {
15
  if (n.length < 13) {
23
 
24
  var _ratingsProductList = function () {
25
  var productlistSpans = _jQuery('.rate-it-cool-product');
26
+
27
  if (productlistSpans && productlistSpans.length > 0) {
28
 
29
  var gpntype = '',
30
  gpnvalues = {},
31
  gpnvalue = '',
32
+ language = '',
33
+ error = true,
34
+ formId = undefined;
35
+
36
  for ( var i = 0; i < productlistSpans.length; i++ ) {
37
  if (_jQuery(productlistSpans[ i ]).attr('data-gpntype') !== undefined) {
38
+ gpntype = _jQuery(productlistSpans[ i ]).attr('data-gpntype');
39
+ if (gpntype === '') {
40
+ gpntype = _username;
41
+ }
42
+ }
43
+ if (_jQuery(productlistSpans[ i ]).attr('data-language') !== undefined) {
44
+ if (language === '') {
45
+ language = _jQuery(productlistSpans[ i ]).attr('data-language');
46
+ }
47
  }
48
  if (_jQuery(productlistSpans[ i ]).attr('data-gpnvalue') !== undefined) {
49
  gpnvalue = _jQuery(productlistSpans[ i ]).attr('data-gpnvalue');
59
  error = false;
60
  }
61
  }
62
+ if (_jQuery(productlistSpans[ i ]).attr('data-form') !== undefined) {
63
+ formId = _jQuery(productlistSpans[ i ]).attr('data-form');
64
+ }
65
  }
66
  if (!error) {
67
  _jQuery.each(gpnvalues, function(gpntype, values) {
68
  if (values.length > 0) {
69
  _jQuery.ajax({
70
+ url : _server + 'stars/' + gpntype + '/' + values.join(',') + '/' + language,
71
  method: 'GET',
72
  dataType : 'json',
73
  crossDomain: true,
83
  destinationElement.find('.rate-it-cool-review-counts').text(oneRatingResponse.total);
84
  destinationElement.find('.rate-it-cool-review-summary').removeClass('rate-it-cool-review-summary-empty').attr('style','width: ' + Number((oneRatingResponse.summary * 20).toFixed(0)) + '%;');
85
  destinationElement.find('.rateit-cool-review-link').show();
86
+
87
+ if (formId !== undefined) {
88
+ // feedback form
89
+ if (oneRatingResponse.details !== undefined) {
90
+ if (oneRatingResponse.details.detail1 !== undefined) {
91
+ _jQuery('form[name=' + formId + ']').find('.reviewDetail1 .label').text(oneRatingResponse.labels.detail1);
92
+ _jQuery('form[name=' + formId + ']').find('.reviewDetail1').show();
93
+ }
94
+ if (oneRatingResponse.details.detail2 !== undefined) {
95
+ _jQuery('form[name=' + formId + ']').find('.reviewDetail2 .label').text(oneRatingResponse.labels.detail2);
96
+ _jQuery('form[name=' + formId + ']').find('.reviewDetail2').show();
97
+ }
98
+ if (oneRatingResponse.details.detail3 !== undefined) {
99
+ _jQuery('form[name=' + formId + ']').find('.reviewDetail3 .label').text(oneRatingResponse.labels.detail3);
100
+ _jQuery('form[name=' + formId + ']').find('.reviewDetail3').show();
101
+ }
102
+ if (oneRatingResponse.details.detail4 !== undefined) {
103
+ _jQuery('form[name=' + formId + ']').find('.reviewDetail4 .label').text(oneRatingResponse.labels.detail4);
104
+ _jQuery('form[name=' + formId + ']').find('.reviewDetail4').show();
105
+ }
106
+ }
107
+ } else if (oneRatingResponse.details !== undefined) {
108
+ if (oneRatingResponse.details.detail1 !== undefined) {
109
+ _jQuery('.rate-it-cool-feedback-form').find('.reviewDetail1 .label').text(oneRatingResponse.labels.detail1);
110
+ _jQuery('.rate-it-cool-feedback-form').find('.reviewDetail1').show();
111
+ }
112
+ if (oneRatingResponse.details.detail2 !== undefined) {
113
+ _jQuery('.rate-it-cool-feedback-form').find('.reviewDetail2 .label').text(oneRatingResponse.labels.detail2);
114
+ _jQuery('.rate-it-cool-feedback-form').find('.reviewDetail2').show();
115
+ }
116
+ if (oneRatingResponse.details.detail3 !== undefined) {
117
+ _jQuery('.rate-it-cool-feedback-form').find('.reviewDetail3 .label').text(oneRatingResponse.labels.detail3);
118
+ _jQuery('.rate-it-cool-feedback-form').find('.reviewDetail3').show();
119
+ }
120
+ if (oneRatingResponse.details.detail4 !== undefined) {
121
+ _jQuery('.rate-it-cool-feedback-form').find('.reviewDetail4 .label').text(oneRatingResponse.labels.detail4);
122
+ _jQuery('.rate-it-cool-feedback-form').find('.reviewDetail4').show();
123
+ }
124
+ }
125
  });
126
  }
127
  }
136
 
137
  var productlistSpans = _jQuery('.rate-it-cool-product-detail'),
138
  gpntype = '',
139
+ gpnvalue = '',
140
+ language = '',
141
+ template = '';
142
 
143
  if (productlistSpans && productlistSpans.length > 0) {
144
 
145
+ if (_jQuery(productlistSpans[0]).attr('data-language') !== undefined) {
146
+ language = _jQuery(productlistSpans[0]).attr('data-language');
147
+ }
148
  if (_jQuery(productlistSpans[0]).attr('data-gpntype') !== undefined) {
149
  gpntype = _jQuery(productlistSpans[0]).attr('data-gpntype');
150
+ if (gpntype === '') {
151
+ gpntype = _username;
152
+ }
153
  }
154
  if (_jQuery(productlistSpans[0]).attr('data-gpnvalue') !== undefined) {
155
  gpnvalue = _jQuery(productlistSpans[0]).attr('data-gpnvalue');
157
  var destinationElement = _jQuery(productlistSpans[0]);
158
  if (gpntype && gpnvalue) {
159
  _jQuery.ajax({
160
+ url : _server + 'stars/' + gpntype + '/' + gpnvalue + '/' + language,
161
  method: 'GET',
162
  dataType : 'json',
163
  crossDomain: true,
169
  success : function(data) {
170
  if (data.length > 0) {
171
  var oneRatingResponse = data[0];
172
+ if (oneRatingResponse.details !== undefined) {
173
+ if (oneRatingResponse.details.detail1 !== undefined) {
174
+ _jQuery('#feedbackform.rate-it-cool-feedback-form').find('.reviewDetail1 .label').text(oneRatingResponse.labels.detail1);
175
+ _jQuery('#feedbackform.rate-it-cool-feedback-form').find('.reviewDetail1').show();
176
+ }
177
+ if (oneRatingResponse.details.detail2 !== undefined) {
178
+ _jQuery('#feedbackform.rate-it-cool-feedback-form').find('.reviewDetail2 .label').text(oneRatingResponse.labels.detail2);
179
+ _jQuery('#feedbackform.rate-it-cool-feedback-form').find('.reviewDetail2').show();
180
+ }
181
+ if (oneRatingResponse.details.detail3 !== undefined) {
182
+ _jQuery('#feedbackform.rate-it-cool-feedback-form').find('.reviewDetail3 .label').text(oneRatingResponse.labels.detail3);
183
+ _jQuery('#feedbackform.rate-it-cool-feedback-form').find('.reviewDetail3').show();
184
+ }
185
+ if (oneRatingResponse.details.detail4 !== undefined) {
186
+ _jQuery('#feedbackform.rate-it-cool-feedback-form').find('.reviewDetail4 .label').text(oneRatingResponse.labels.detail4);
187
+ _jQuery('#feedbackform.rate-it-cool-feedback-form').find('.reviewDetail4').show();
188
+ }
189
+ }
190
+ template = _jQuery('.rate-it-cool-stars-detail-table').html();
191
+ if (oneRatingResponse.total > 0) {
192
+ _jQuery('.rate-it-cool-stars-detail-table').html(template
193
+ .split('$review.summary').join(Number((oneRatingResponse.summary).toFixed(0)))
194
+ .split('$review.total').join(oneRatingResponse.total)
195
+ .split('$review.star5').join(oneRatingResponse.stars.five)
196
+ .split('$review.star4').join(oneRatingResponse.stars.four)
197
+ .split('$review.star3').join(oneRatingResponse.stars.three)
198
+ .split('$review.star2').join(oneRatingResponse.stars.two)
199
+ .split('$review.star1').join(oneRatingResponse.stars.one)
200
+ .split('$details.display').join((oneRatingResponse.details == undefined || oneRatingResponse.details.detail1 == undefined ? 'display:none;':''))
201
+ .split('$details.total').join((oneRatingResponse.details == undefined || oneRatingResponse.details.total !== undefined ? oneRatingResponse.details.total:0))
202
+ .split('$details.percent').join((oneRatingResponse.details == undefined || oneRatingResponse.details.total !== undefined ? Number(oneRatingResponse.details.total/(oneRatingResponse.total/100).toFixed(2)) :0))
203
+ .split('$details.detail1.display').join((oneRatingResponse.details == undefined || oneRatingResponse.details.detail1 == undefined ? 'display:none;':''))
204
+ .split('$details.detail2.display').join((oneRatingResponse.details == undefined || oneRatingResponse.details.detail2 == undefined ? 'display:none;':''))
205
+ .split('$details.detail3.display').join((oneRatingResponse.details == undefined || oneRatingResponse.details.detail3 == undefined ? 'display:none;':''))
206
+ .split('$details.detail4.display').join((oneRatingResponse.details == undefined || oneRatingResponse.details.detail4 == undefined ? 'display:none;':''))
207
+ .split('$details.detail1.title').join((oneRatingResponse.labels.detail1 !== undefined ? oneRatingResponse.labels.detail1:''))
208
+ .split('$details.detail2.title').join((oneRatingResponse.labels.detail2 !== undefined ? oneRatingResponse.labels.detail2:''))
209
+ .split('$details.detail3.title').join((oneRatingResponse.labels.detail3 !== undefined ? oneRatingResponse.labels.detail3:''))
210
+ .split('$details.detail4.title').join((oneRatingResponse.labels.detail4 !== undefined ? oneRatingResponse.labels.detail4:''))
211
+ .split('$review.details.detail1').join( (Number(oneRatingResponse.details.detail1)*20).toFixed(0) )
212
+ .split('$review.details.detail2').join( (Number(oneRatingResponse.details.detail2)*20).toFixed(0) )
213
+ .split('$review.details.detail3').join( (Number(oneRatingResponse.details.detail3)*20).toFixed(0) )
214
+ .split('$review.details.detail4').join( (Number(oneRatingResponse.details.detail4)*20).toFixed(0) )
215
+ );
216
+
217
+ destinationElement.find('.rate-it-cool-show-stars').show();
218
+ }
219
  destinationElement.find('.rate-it-cool-review-counts').text(oneRatingResponse.total);
220
  destinationElement.find('.rate-it-cool-review-summary').removeClass('rate-it-cool-review-summary-empty').attr('style','width: ' + Number((oneRatingResponse.summary * 20).toFixed(0)) + '%;');
 
221
  }
222
  }
223
  });
230
  gpnvalue = '',
231
  language = '',
232
  templateOneFeedback = _jQuery('#rate-it-cool-product-feedbacks-template .feedbackElement').html(),
233
+ templateMissingFeedback = _jQuery('#rate-it-cool-product-feedbacks-template .missingFeedback').html(),
234
+ templateFeedbackForm = _jQuery('#rate-it-cool-product-feedbacks-template .feedbackElements #feedbackform').html(),
235
  templateList = _jQuery('#rate-it-cool-product-feedbacks-template .feedbackElements').html();
 
236
  if (productfeedbackSpans.length > 0) {
237
  if (_jQuery(productfeedbackSpans[0]).attr('data-gpntype') !== undefined) {
238
  gpntype = _jQuery(productfeedbackSpans[0]).attr('data-gpntype');
239
+ if (gpntype === '') {
240
+ gpntype = _username;
241
+ }
242
  }
243
  if (_jQuery(productfeedbackSpans[0]).attr('data-gpnvalue') !== undefined) {
244
  gpnvalue = _jQuery(productfeedbackSpans[0]).attr('data-gpnvalue');
257
  if (gpntype && gpnvalue && language) {
258
 
259
  _jQuery.ajax({
260
+ url : _server + 'feedback/' + gpntype + '/' + gpnvalue + '/' + language + '?limit=' + _limit + extendedString,
261
  method: 'GET',
262
  dataType : 'json',
263
  crossDomain: true,
277
  if (data.region > 0) {
278
  counts = data.region;
279
  }
280
+ _labels = data.overview.labels;
281
+ if (data.overview.details == undefined) {
282
+ data.overview.details = {};
283
+ }
284
  templateList = templateList.replace('$five', data.overview.stars.five)
285
  .replace('$four', data.overview.stars.four)
286
  .replace('$three', data.overview.stars.three)
289
  .replace('$total.all', data.total.all)
290
  .replace('$total.language', data.total.language)
291
  .replace('$total.region', data.total.region)
292
+ .replace('$overview.total', data.overview.total)
293
+ .split('$detail.show').join( (data.overview.details.detail1 !== undefined?'':'display:none;') )
294
+ .replace('$details.total', (data.overview.details == undefined || data.overview.details.total !== undefined ? data.overview.details.total : 0))
295
+ .replace('$details.percent', (data.overview.details == undefined || data.overview.details.total !== undefined ? Number(data.overview.details.total/(data.overview.total/100).toFixed(2)) :0))
296
+ .replace('$details.detail1.display', (data.overview.details == undefined || data.overview.details.detail1 == undefined ? 'display:none;':''))
297
+ .replace('$details.detail2.display', (data.overview.details == undefined || data.overview.details.detail2 == undefined ? 'display:none;':''))
298
+ .replace('$details.detail3.display', (data.overview.details == undefined || data.overview.details.detail3 == undefined ? 'display:none;':''))
299
+ .replace('$details.detail4.display', (data.overview.details == undefined || data.overview.details.detail4 == undefined ? 'display:none;':''))
300
+ .replace('$details.detail1.title', (data.overview.labels.detail1 !== undefined ? data.overview.labels.detail1:''))
301
+ .replace('$details.detail2.title', (data.overview.labels.detail2 !== undefined ? data.overview.labels.detail2:''))
302
+ .replace('$details.detail3.title', (data.overview.labels.detail3 !== undefined ? data.overview.labels.detail3:''))
303
+ .replace('$details.detail4.title', (data.overview.labels.detail4 !== undefined ? data.overview.labels.detail4:''))
304
+ .split('$detail.detail1').join( Number((data.overview.details.detail1 !== undefined?(data.overview.details.detail1*20):0)).toFixed(0) )
305
+ .split('$detail.detail2').join( Number((data.overview.details.detail2 !== undefined?(data.overview.details.detail2*20):0)).toFixed(0) )
306
+ .split('$detail.detail3').join( Number((data.overview.details.detail3 !== undefined?(data.overview.details.detail3*20):0)).toFixed(0) )
307
+ .split('$detail.detail4').join( Number((data.overview.details.detail4 !== undefined?(data.overview.details.detail4*20):0)).toFixed(0) )
308
  .replace('$count', data.elements.length)
309
  .replace('$showNewtLink', (counts > data.elements.length?'block':'none'))
310
  .split('$gpntype').join(data.gpntype)
314
  data.elements.forEach(function(feedback) {
315
  // create elemnt from template
316
  var oneFeedback = templateOneFeedback;
317
+ if (feedback.details == undefined) {
318
+ feedback.details = {};
319
+ }
320
  oneFeedback = oneFeedback.replace('$review.stars', (feedback.stars * 20))
321
+ .replace('$review.time', new Date(feedback.time).toLocaleDateString())
322
  .replace('$review.title', feedback.title)
323
  .replace('$review.content', feedback.content)
324
  .split('$review.id').join(feedback._id)
325
  .split('$review.gpntype').join(data.gpntype)
326
  .split('$review.gpnvalue').join(data.gpnvalue)
327
  .split('$review.language').join(feedback.language + '_' + feedback.region)
328
+ .split('$review.detail.show').join( (feedback.details !== undefined && feedback.details.detail1 !== undefined?'':'display:none;'))
329
+ .replace('$details.detail1.display', (feedback.details == undefined || feedback.details.detail1 == undefined ? 'display:none;':''))
330
+ .replace('$details.detail2.display', (feedback.details == undefined || feedback.details.detail2 == undefined ? 'display:none;':''))
331
+ .replace('$details.detail3.display', (feedback.details == undefined || feedback.details.detail3 == undefined ? 'display:none;':''))
332
+ .replace('$details.detail4.display', (feedback.details == undefined || feedback.details.detail4 == undefined ? 'display:none;':''))
333
+ .replace('$details.detail1.title', (_labels.detail1 !== undefined ? _labels.detail1:''))
334
+ .replace('$details.detail2.title', (_labels.detail2 !== undefined ? _labels.detail2:''))
335
+ .replace('$details.detail3.title', (_labels.detail3 !== undefined ? _labels.detail3:''))
336
+ .replace('$details.detail4.title', (_labels.detail4 !== undefined ? _labels.detail4:''))
337
+ .split('$review.detail.detail1').join( (feedback.details.detail1 !== undefined?(feedback.details.detail1*20):0))
338
+ .split('$review.detail.detail2').join( (feedback.details.detail2 !== undefined?(feedback.details.detail2*20):0))
339
+ .split('$review.detail.detail3').join( (feedback.details.detail3 !== undefined?(feedback.details.detail3*20):0))
340
+ .split('$review.detail.detail4').join( (feedback.details.detail4 !== undefined?(feedback.details.detail4*20):0))
341
+ .split('$review.source').join(feedback.source)
342
+ .split('$review.verified_source').join((feedback.source === 'verified'?'display:block;':'display:none;'))
343
+ .split('$review.public_source').join((feedback.source === 'public'?'display:block;':'display:none;'))
344
+ .split('$review.mobile_source').join((feedback.source === 'mobile'?'display:block;':'display:none;'))
345
  .split('$review.positive').join(feedback.positive)
346
  .split('$review.negative').join(feedback.negative);
347
 
348
  feedbackElements.push(oneFeedback);
349
  });
350
  destinationElement.html(templateList.replace('$list',feedbackElements.join('')));
351
+ } else {
352
+ destinationElement.html(templateMissingFeedback.split('$feedbackForm').join(templateFeedbackForm));
353
+ if (data.overview.details !== undefined) {
354
+ if (data.overview.details.detail1 !== undefined) {
355
+ destinationElement.find('.reviewDetail1 .label').text(data.overview.labels.detail1);
356
+ destinationElement.find('.reviewDetail1').show();
357
+ }
358
+ if (data.overview.details.detail2 !== undefined) {
359
+ destinationElement.find('.reviewDetail2 .label').text(data.overview.labels.detail2);
360
+ destinationElement.find('.reviewDetail2').show();
361
+ }
362
+ if (data.overview.details.detail3 !== undefined) {
363
+ destinationElement.find('.reviewDetail3 .label').text(data.overview.labels.detail3);
364
+ destinationElement.find('.reviewDetail3').show();
365
+ }
366
+ if (data.overview.details.detail4 !== undefined) {
367
+ destinationElement.find('.reviewDetail4 .label').text(data.overview.labels.detail4);
368
+ destinationElement.find('.reviewDetail4').show();
369
+ }
370
+ }
371
  }
372
  }
373
  });
388
  if (productfeedbackSpans.length > 0) {
389
  if (_jQuery(productfeedbackSpans[0]).attr('data-gpntype') !== undefined) {
390
  gpntype = _jQuery(productfeedbackSpans[0]).attr('data-gpntype');
391
+ if (gpntype === '') {
392
+ gpntype = _username;
393
+ }
394
  }
395
  if (_jQuery(productfeedbackSpans[0]).attr('data-gpnvalue') !== undefined) {
396
  gpnvalue = _jQuery(productfeedbackSpans[0]).attr('data-gpnvalue');
414
  if (gpntype && gpnvalue && language) {
415
 
416
  _jQuery.ajax({
417
+ url : _server + 'feedback/' + gpntype + '/' + gpnvalue + '/' + language + '?limit=' + _limit + extendedString,
418
  method: 'GET',
419
  dataType : 'json',
420
  crossDomain: true,
442
  if (data.elements && data.elements.length > 0) {
443
 
444
  var feedbackElements = [];
445
+ _labels = data.overview.labels;
446
  data.elements.forEach(function(feedback) {
447
  // create elemnt from template
448
  var oneFeedback = templateOneFeedback;
449
+ if (feedback.details == undefined) {
450
+ feedback.details = {};
451
+ }
452
  oneFeedback = oneFeedback.replace('$review.stars', (feedback.stars * 20))
453
+ .replace('$review.time', new Date(feedback.time).toLocaleDateString())
454
  .replace('$review.title', feedback.title)
455
  .replace('$review.content', feedback.content)
456
  .split('$review.id').join(feedback._id)
457
  .split('$review.gpntype').join(data.gpntype)
458
  .split('$review.gpnvalue').join(data.gpnvalue)
459
  .split('$review.language').join(feedback.language + '_' + feedback.region)
460
+ .split('$review.detail.show').join( (feedback.details.detail1 !== undefined?'':'display:none;'))
461
+ .replace('$details.detail1.display', (feedback.details == undefined || feedback.details.detail1 == undefined ? 'display:none;':''))
462
+ .replace('$details.detail2.display', (feedback.details == undefined || feedback.details.detail2 == undefined ? 'display:none;':''))
463
+ .replace('$details.detail3.display', (feedback.details == undefined || feedback.details.detail3 == undefined ? 'display:none;':''))
464
+ .replace('$details.detail4.display', (feedback.details == undefined || feedback.details.detail4 == undefined ? 'display:none;':''))
465
+ .replace('$details.detail1.title', (_labels.detail1 !== undefined ? _labels.detail1:''))
466
+ .replace('$details.detail2.title', (_labels.detail2 !== undefined ? _labels.detail2:''))
467
+ .replace('$details.detail3.title', (_labels.detail3 !== undefined ? _labels.detail3:''))
468
+ .replace('$details.detail4.title', (_labels.detail4 !== undefined ? _labels.detail4:''))
469
+ .split('$review.detail.detail1').join( (feedback.details.detail1 !== undefined?feedback.details.detail1:0))
470
+ .split('$review.detail.detail2').join( (feedback.details.detail2 !== undefined?feedback.details.detail2:0))
471
+ .split('$review.detail.detail3').join( (feedback.details.detail3 !== undefined?feedback.details.detail3:0))
472
+ .split('$review.detail.detail4').join( (feedback.details.detail4 !== undefined?feedback.details.detail4:0))
473
+ .split('$review.source').join(feedback.source)
474
+ .split('$review.verified_source').join((feedback.source === 'verified'?'display:block;':'display:none;'))
475
+ .split('$review.public_source').join((feedback.source === 'public'?'display:block;':'display:none;'))
476
+ .split('$review.mobile_source').join((feedback.source === 'mobile'?'display:block;':'display:none;'))
477
  .split('$review.positive').join(feedback.positive)
478
  .split('$review.negative').join(feedback.negative);
479
 
491
  var _registerClickFeedbackSend = function() {
492
  _jQuery('.rateit-cool-send-feedback').delegate('a', 'click', function(e){
493
  e.preventDefault();
494
+ var _form = _jQuery('form[name=' + _jQuery(this).attr('data-formname') + ']'),
495
+ gpntype = _form.find('[name=gpntype]').val(),
496
+ gpnvalue = _form.find('[name=gpnvalue]').val(),
497
+ language = _form.find('[name=language]').val(),
498
+ detail1 = parseInt(_form.find('[name=detail1]').val()),
499
+ detail2 = parseInt(_form.find('[name=detail2]').val()),
500
+ detail3 = parseInt(_form.find('[name=detail3]').val()),
501
+ detail4 = parseInt(_form.find('[name=detail4]').val()),
502
+ detail = (detail1 + detail2 + detail3 + detail4),
503
  feedbackElement = {
504
+ stars: parseInt(_form.find('[name=stars]').val()),
505
+ title: _form.find('[name=feedbackTitle]').val(),
506
+ source: _form.find('[name=source]').val(),
507
+ content: _form.find('[name=feedbackContent]').val(),
508
+ recommend: (_form.find('[name=recommend]').is(':checked')?1:0),
509
+ details: {
510
+ detail1: detail1,
511
+ detail2: detail2,
512
+ detail3: detail3,
513
+ detail4: detail4
514
+ }
515
  },
516
+ destinationElement = _jQuery(this),
517
+ securitytext = _form.find('[name=securityText]').val(),
518
+ formOk = true;
519
+ if (detail > 0) {
520
+ feedbackElement.stars = (detail / ((detail1 > 0?1:0) + (detail2 > 0?1:0) + (detail3 > 0?1:0) + (detail4 > 0?1:0)));
521
+ }
522
+ if (securitytext !== undefined) {
523
+ formOk = (securitytext === _securityText);
524
+ if (!formOk) {
525
+ _form.find('[name=securityText]').addClass('rate-it-cool-error');
526
+ }
527
+ }
528
+ if (feedbackElement.title == '') {
529
+ _form.find('[name=feedbackTitle]').addClass('rate-it-cool-error');
530
+ }
531
+ if (feedbackElement.content == '') {
532
+ _form.find('[name=feedbackContent]').addClass('rate-it-cool-error');
533
+ }
534
 
535
+ if (formOk && gpntype && gpnvalue && language && feedbackElement.title !== '' && feedbackElement.content !== '' && feedbackElement.stars > 0) {
536
  _jQuery.ajax({
537
+ url : _server + 'feedback/' + gpntype + '/' + gpnvalue + '/' + language,
538
  method: 'POST',
539
  data: JSON.stringify(feedbackElement),
540
  dataType : 'json',
546
  },
547
  success: function(data) {
548
  _jQuery('#' + destinationElement.attr('data-formname')).removeClass('error').addClass('success');
549
+ _form.hide();
550
+ _form.parent().find('.rateit-cool-send-feedback-error').hide();
551
+ _form.parent().find('.rateit-cool-send-feedback-success').show();
552
  },
553
  error: function() {
554
  _jQuery('#' + destinationElement.attr('data-formname')).removeClass('success').addClass('error');
555
+ _form.parent().find('.rateit-cool-send-feedback-success').hide();
556
+ _form.parent().find('.rateit-cool-send-feedback-error').show();
557
  }
558
  });
559
  } else {
574
  // fill stars on click
575
  _jQuery('.rate-it-cool-feedback-form').delegate('.oneStars', 'click', function(e) {
576
  e.preventDefault();
577
+ _jQuery(this).parents('tr').find('.rate-it-cool-review-summary').attr('style','');
578
  _jQuery(this).find('.rate-it-cool-review-summary').attr('style','width:100%;');
579
+ _jQuery(this).parents('tr').find('.oneStars .rate-it-cool-review-summary').attr('style','width:100%;');
580
+ _jQuery(this).parents('tr').find('input.stars').val(1);
581
+ _jQuery(this).parents('tr').find('[name=stars]').val(1);
582
+ _jQuery(this).parents('tr').find('.rate-it-cool-star-text').html(_jQuery(this).attr('title'));
583
  });
584
 
585
  _jQuery('.rate-it-cool-feedback-form').delegate('.twoStars', 'click', function(e) {
586
  e.preventDefault();
587
+ _jQuery(this).parents('tr').find('.rate-it-cool-review-summary').attr('style','');
588
  _jQuery(this).find('.rate-it-cool-review-summary').attr('style','width:100%;');
589
+ _jQuery(this).parents('tr').find('.oneStars .rate-it-cool-review-summary').attr('style','width:100%;');
590
+ _jQuery(this).parents('tr').find('.twoStars .rate-it-cool-review-summary').attr('style','width:100%;');
591
+ _jQuery(this).parents('tr').find('input.stars').val(2);
592
+ _jQuery(this).parents('tr').find('[name=stars]').val(2);
593
+ _jQuery(this).parents('tr').find('.rate-it-cool-star-text').html(_jQuery(this).attr('title'));
594
  });
595
 
596
  _jQuery('.rate-it-cool-feedback-form').delegate('.threeStars', 'click', function(e) {
597
  e.preventDefault();
598
+ _jQuery(this).parents('tr').find('.rate-it-cool-review-summary').attr('style','');
599
  _jQuery(this).find('.rate-it-cool-review-summary').attr('style','width:100%;');
600
+ _jQuery(this).parents('tr').find('.oneStars .rate-it-cool-review-summary').attr('style','width:100%;');
601
+ _jQuery(this).parents('tr').find('.twoStars .rate-it-cool-review-summary').attr('style','width:100%;');
602
+ _jQuery(this).parents('tr').find('.threeStars .rate-it-cool-review-summary').attr('style','width:100%;');
603
+ _jQuery(this).parents('tr').find('input.stars').val(3);
604
+ _jQuery(this).parents('tr').find('[name=stars]').val(3);
605
+ _jQuery(this).parents('tr').find('.rate-it-cool-star-text').html(_jQuery(this).attr('title'));
606
  });
607
 
608
  _jQuery('.rate-it-cool-feedback-form').delegate('.fourStars', 'click', function(e) {
609
  e.preventDefault();
610
+ _jQuery(this).parents('tr').find('.rate-it-cool-review-summary').attr('style','');
611
  _jQuery(this).find('.rate-it-cool-review-summary').attr('style','width:100%;');
612
+ _jQuery(this).parents('tr').find('.oneStars .rate-it-cool-review-summary').attr('style','width:100%;');
613
+ _jQuery(this).parents('tr').find('.twoStars .rate-it-cool-review-summary').attr('style','width:100%;');
614
+ _jQuery(this).parents('tr').find('.threeStars .rate-it-cool-review-summary').attr('style','width:100%;');
615
+ _jQuery(this).parents('tr').find('.fourStars .rate-it-cool-review-summary').attr('style','width:100%;');
616
+ _jQuery(this).parents('tr').find('input.stars').val(4);
617
+ _jQuery(this).parents('tr').find('[name=stars]').val(4);
618
+ _jQuery(this).parents('tr').find('.rate-it-cool-star-text').html(_jQuery(this).attr('title'));
619
  });
620
 
621
  _jQuery('.rate-it-cool-feedback-form').delegate('.fiveStars', 'click', function(e) {
622
  e.preventDefault();
623
+ _jQuery(this).parents('tr').find('.rate-it-cool-review-summary').attr('style','');
624
  _jQuery(this).find('.rate-it-cool-review-summary').attr('style','width:100%;');
625
+ _jQuery(this).parents('tr').find('.oneStars .rate-it-cool-review-summary').attr('style','width:100%;');
626
+ _jQuery(this).parents('tr').find('.twoStars .rate-it-cool-review-summary').attr('style','width:100%;');
627
+ _jQuery(this).parents('tr').find('.threeStars .rate-it-cool-review-summary').attr('style','width:100%;');
628
+ _jQuery(this).parents('tr').find('.fourStars .rate-it-cool-review-summary').attr('style','width:100%;');
629
+ _jQuery(this).parents('tr').find('.fiveStars .rate-it-cool-review-summary').attr('style','width:100%;');
630
+ _jQuery(this).parents('tr').find('input.stars').val(5);
631
+ _jQuery(this).parents('tr').find('[name=stars]').val(5);
632
+ _jQuery(this).parents('tr').find('.rate-it-cool-star-text').html(_jQuery(this).attr('title'));
633
  });
634
  // fill stars on click end
635
  };
648
  thisElement.attr('data-positive', (positive+1));
649
  _jQuery(destinationElement).html(positive+1);
650
  _jQuery.ajax({
651
+ url : _server + 'feedback/' + gpntype + '/' + gpnvalue + '/' + language + '?helpful=positive&id='+feedbackId,
652
  method: 'PUT',
653
  dataType : 'json',
654
  crossDomain: true,
677
 
678
  if (feedbackId && gpntype && gpnvalue && language) {
679
  _jQuery.ajax({
680
+ url : _server + 'feedback/' + gpntype + '/' + gpnvalue + '/' + language + '?incorrect=1&id='+feedbackId,
681
  method: 'PUT',
682
  dataType : 'json',
683
  crossDomain: true,
717
 
718
  if (feedbackId && gpntype && gpnvalue && language) {
719
  _jQuery.ajax({
720
+ url : _server + 'feedback/' + gpntype + '/' + gpnvalue + '/' + language + '?helpful=negative&id='+feedbackId,
721
  method: 'PUT',
722
  dataType : 'json',
723
  crossDomain: true,
727
  xhr.setRequestHeader("X-Api-Version", _version);
728
  },
729
  success : function(data) {
730
+ thisElement.attr('data-negative', (negative+1));
731
+ _jQuery(destinationElement).html(negative+1);
732
  }
733
  });
734
  }
753
  });
754
  };
755
 
756
+ var _showFeedbackFormOnClick = function() {
757
+ _jQuery('.rate-it-cool-product-feedbackform').delegate('a.rateit-cool-show-feedbackform-link','click',function(e) {
758
+ e.preventDefault();
759
+ _jQuery('.rate-it-cool-feedback-form').toggle('bounce');
760
+ });
761
+ };
762
+
763
  var _showFeedbacksWithStarsOnClick = function() {
764
  _jQuery('a.showOnlyStars').on('click',function(e) {
765
  e.preventDefault();
782
  feedbackElements = [];
783
  if (gpntype && gpnvalue && language && count && extraParameter != undefined) {
784
  _jQuery.ajax({
785
+ url : _server + 'feedback/' + gpntype + '/' + gpnvalue + '/' + language + '?limit=5&skip=' + count + extraParameter,
786
  method: 'GET',
787
  dataType : 'json',
788
  crossDomain: true,
811
  data.elements.forEach(function(feedback) {
812
  // create elemnt from template
813
  var oneFeedback = templateOneFeedback;
814
+ if (feedback.details == undefined) {
815
+ feedback.details = {};
816
+ }
817
  oneFeedback = oneFeedback.replace('$review.stars', (feedback.stars * 20))
818
+ .replace('$review.time', new Date(feedback.time).toLocaleDateString())
819
  .replace('$review.title', feedback.title)
820
  .replace('$review.content', feedback.content)
821
  .split('$review.id').join(feedback._id)
822
  .split('$review.gpntype').join(data.gpntype)
823
  .split('$review.gpnvalue').join(data.gpnvalue)
824
  .split('$review.language').join(feedback.language + '_' + feedback.region)
825
+ .split('$review.detail.show').join( (feedback.details.detail1 !== undefined?'':'display:none;'))
826
+ .replace('$details.detail1.display', (feedback.details == undefined || feedback.details.detail1 == undefined ? 'display:none;':''))
827
+ .replace('$details.detail2.display', (feedback.details == undefined || feedback.details.detail2 == undefined ? 'display:none;':''))
828
+ .replace('$details.detail3.display', (feedback.details == undefined || feedback.details.detail3 == undefined ? 'display:none;':''))
829
+ .replace('$details.detail4.display', (feedback.details == undefined || feedback.details.detail4 == undefined ? 'display:none;':''))
830
+ .replace('$details.detail1.title', (_labels.detail1 !== undefined ? _labels.detail1:''))
831
+ .replace('$details.detail2.title', (_labels.detail2 !== undefined ? _labels.detail2:''))
832
+ .replace('$details.detail3.title', (_labels.detail3 !== undefined ? _labels.detail3:''))
833
+ .replace('$details.detail4.title', (_labels.detail4 !== undefined ? _labels.detail4:''))
834
+ .split('$review.detail.detail1').join( (feedback.details.detail1 !== undefined?feedback.details.detail1:0))
835
+ .split('$review.detail.detail2').join( (feedback.details.detail2 !== undefined?feedback.details.detail2:0))
836
+ .split('$review.detail.detail3').join( (feedback.details.detail3 !== undefined?feedback.details.detail3:0))
837
+ .split('$review.detail.detail4').join( (feedback.details.detail4 !== undefined?feedback.details.detail4:0))
838
+ .split('$review.source').join(feedback.source)
839
+ .split('$review.verified_source').join((feedback.source === 'verified'?'display:block;':'display:none;'))
840
+ .split('$review.public_source').join((feedback.source === 'public'?'display:block;':'display:none;'))
841
+ .split('$review.mobile_source').join((feedback.source === 'mobile'?'display:block;':'display:none;'))
842
  .split('$review.positive').join(feedback.positive)
843
  .split('$review.negative').join(feedback.negative);
844
  _jQuery('.rate-it-cool-product-feedbacks .list').append(oneFeedback);
869
  _sendNotHelpfulOnClick();
870
  _showFeedbacksWithStarsOnClick();
871
  _showMoreFeedbacksOnClick();
872
+ _showFeedbackFormOnClick();
873
  _sendIncorrectOnClick();
874
+ _jQuery('.rate-it-cool-show-stars').on('click',function(e) {
875
+ e.preventDefault();
876
+ _jQuery('.rate-it-cool-stars-detail-table').toggle('bounce');
877
+ });
878
  _openFeedbackForm();
879
  }
880
 
882
  init: function(params) {
883
  _username = params.username;
884
  _password = params.password;
885
+ _limit = (params.limit !== undefined? params.limit: _limit);
886
+ _securityText = params.securitytext;
887
  if (params.noConflict) {
888
  _jQuery = jQuery.noConflict();
889
  $ = _oldjQuery;
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>RateItCool_ProductReviews</name>
4
- <version>1.0.3</version>
5
  <stability>stable</stability>
6
  <license>MTL</license>
7
  <channel>community</channel>
@@ -23,12 +23,13 @@ The plugin provides the stars per product&#xD;
23
  Furthermore review texts are displayed on the article detail view. For the collection of product reviews a form is available in the order history. &#xD;
24
  &#xD;
25
  The service the plugin calls is settled on the number of service requests. This number corresponds to the page impressions in the shop for the list of products, the product detail page, and the pages with topseller integration.</description>
26
- <notes>- Change the ean field to gtin&#xD;
 
27
  </notes>
28
  <authors><author><name>Thomas Gravel</name><user>RateItCoolReviews</user><email>thomas.gravel@rateit.cool</email></author></authors>
29
- <date>2015-09-25</date>
30
- <time>10:16:39</time>
31
- <contents><target name="magecommunity"><dir name="RateItCool"><dir name="ProductReviews"><dir name="Block"><file name="Helper.php" hash="82f94ae20cc04bfafbf5b5064fa8e7dd"/><dir name="Order"><dir name="Item"><dir name="Renderer"><file name="Default.php" hash="e81b821b3dc1eb8708cb346654fd7d6a"/></dir></dir></dir><dir name="Product"><dir name="View"><file name="List.php" hash="702c625af767f14a85573f3465f6c701"/></dir><file name="View.php" hash="f4dc4a5bcf0ad9ad91639e7181ed0f51"/></dir><file name="View.php" hash="ff4654a9860e98d98275d42d5d3c02bd"/></dir><dir name="Helper"><file name="Data.php" hash="2a9f2f7a0eefb8c26c4c4ce3116879cf"/></dir><dir name="Model"><dir name="Order"><file name="Item.php" hash="f8fcf509cd72ff6e38241793390c2327"/></dir><file name="Product.php" hash="afc49151829b2ba130f2f004b9de2037"/><dir name="Review"><file name="Reviews.php" hash="f80c67b5e082998fd0a00390a597e02e"/></dir><file name="Review.php" hash="5ef8e7ca6a2309efb30eeb0a4aba74a6"/></dir><dir name="etc"><file name="config.xml" hash="472b16ff0be92b95d8aeb48c4f629652"/><file name="system.xml" hash="8b560ce64adfc5248d9c180c3c73b6a8"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="productreviews"><dir name="helper"><file name="summary.phtml" hash="bf986ff812fe27a2fe6d75a5d3921518"/><file name="summary_short.phtml" hash="b7cefced1edd907dbe062dea7b5fd727"/></dir><file name="javascript.phtml" hash="3d5a2736bd215769e6c47ff0557b4a44"/><file name="metatag.phtml" hash="8019fb54db1017b4e120423d548230bc"/><dir name="product"><dir name="view"><file name="list.phtml" hash="ec7228ba4c14a248f243b6a9d278dc78"/></dir></dir><file name="view.phtml" hash="26584f68b240e9b4b497bc09af7704f8"/></dir></dir><dir name="layout"><file name="productreviews.xml" hash="c86f76a0103dde43f7d156ad5e67dd71"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="RateItCool_ProductReviews.xml" hash="2de7f921ef87e18450027a5206d4ed93"/></dir></target><target name="magelocale"><dir name="en_US"><file name="RateItCool_ProductReviews.csv" hash="e0106966b75513df0573374b225e9d49"/></dir><dir name="de_DE"><file name="RateItCool_ProductReviews.csv" hash="ec21b5e58b4664c33c3e16bb6eaf540b"/></dir></target><target name="mageweb"><dir name="js"><dir name="rateitcool"><file name="rateit.cool.js" hash="60740951be3b503e83718fa4b15dd146"/></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="rateitcool"><file name="rateit.cool.css" hash="747697475255ab2c0cff7ab01f43acca"/></dir></dir></dir></dir></target></contents>
32
  <compatible/>
33
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
34
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>RateItCool_ProductReviews</name>
4
+ <version>1.0.4</version>
5
  <stability>stable</stability>
6
  <license>MTL</license>
7
  <channel>community</channel>
23
  Furthermore review texts are displayed on the article detail view. For the collection of product reviews a form is available in the order history. &#xD;
24
  &#xD;
25
  The service the plugin calls is settled on the number of service requests. This number corresponds to the page impressions in the shop for the list of products, the product detail page, and the pages with topseller integration.</description>
26
+ <notes>- Add the detail review values&#xD;
27
+ - Add product review form at public page&#xD;
28
  </notes>
29
  <authors><author><name>Thomas Gravel</name><user>RateItCoolReviews</user><email>thomas.gravel@rateit.cool</email></author></authors>
30
+ <date>2015-11-30</date>
31
+ <time>21:40:40</time>
32
+ <contents><target name="magecommunity"><dir name="RateItCool"><dir name="ProductReviews"><dir name="Block"><file name="Helper.php" hash="82f94ae20cc04bfafbf5b5064fa8e7dd"/><dir name="Order"><dir name="Item"><dir name="Renderer"><file name="Default.php" hash="b9443870b753f0c8f3905d2f4e92d1be"/></dir></dir></dir><dir name="Product"><dir name="View"><file name="List.php" hash="702c625af767f14a85573f3465f6c701"/></dir><file name="View.php" hash="f4dc4a5bcf0ad9ad91639e7181ed0f51"/></dir><file name="View.php" hash="ff4654a9860e98d98275d42d5d3c02bd"/></dir><dir name="Helper"><file name="Data.php" hash="2a9f2f7a0eefb8c26c4c4ce3116879cf"/></dir><dir name="Model"><dir name="Order"><file name="Item.php" hash="f8fcf509cd72ff6e38241793390c2327"/></dir><file name="Product.php" hash="afc49151829b2ba130f2f004b9de2037"/><dir name="Review"><file name="Reviews.php" hash="f80c67b5e082998fd0a00390a597e02e"/></dir><file name="Review.php" hash="5ef8e7ca6a2309efb30eeb0a4aba74a6"/></dir><dir name="etc"><file name="config.xml" hash="1bb3a0d9727e13393985ea2f726a1fef"/><file name="system.xml" hash="93f4fed874f18c4571b20a32928160e7"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="productreviews"><dir name="helper"><file name="summary.phtml" hash="9cfcd37876cfe5ab2091aa0e76663c32"/><file name="summary_short.phtml" hash="efd3a51bdbb3fa3b6c2e8fa4ff9bbd67"/></dir><file name="javascript.phtml" hash="b56bf3b30cee49b754e9836f11dfb04d"/><file name="metatag.phtml" hash="8019fb54db1017b4e120423d548230bc"/><dir name="product"><dir name="view"><file name="list.phtml" hash="f436935ae876c00098bbea68967f3c78"/></dir></dir><file name="view.phtml" hash="26584f68b240e9b4b497bc09af7704f8"/></dir></dir><dir name="layout"><file name="productreviews.xml" hash="c86f76a0103dde43f7d156ad5e67dd71"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="RateItCool_ProductReviews.xml" hash="2de7f921ef87e18450027a5206d4ed93"/></dir></target><target name="magelocale"><dir name="en_US"><file name="RateItCool_ProductReviews.csv" hash="9f6869df28721ff02ca7aa038986ea29"/></dir><dir name="de_DE"><file name="RateItCool_ProductReviews.csv" hash="a7793891537086c080c0db527d548ed3"/></dir></target><target name="mageweb"><dir name="js"><dir name="rateitcool"><file name="rateit.cool.js" hash="f2546b5ab9cdef160cadaa5f04e58e37"/></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="rateitcool"><file name="rateit.cool.css" hash="cf19f570f29b8963c840d53403fdab00"/></dir></dir></dir></dir></target></contents>
33
  <compatible/>
34
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
35
  </package>
skin/frontend/base/default/rateitcool/rateit.cool.css CHANGED
@@ -1,6 +1,6 @@
1
  .ratings .ratingCount {
2
  float:left;
3
- width:20px;
4
  margin-top:5px;
5
  }
6
  .ratings .rating.rate-it-cool-review-summary-empty {
@@ -9,7 +9,7 @@
9
  .feedbackOverview td.count {
10
  padding-left: 5px;
11
  }
12
- .rate-it-cool-product-feedbacks .overview, .rate-it-cool-product-feedbacks .recommend {
13
  margin: 10px 0;
14
  padding-bottom: 10px;
15
  border-bottom: solid 1px #ccc;
@@ -38,6 +38,9 @@
38
  .rate-it-cool-product-feedbacks .date {
39
  float:right;
40
  }
 
 
 
41
 
42
  .box-up-sell .ratings, .cms-index-index .products-grid .ratings, .cms-index-noroute .products-grid .ratings {
43
  display: block !important;
@@ -52,7 +55,13 @@
52
  .rate-it-cool-feedback-form .feedback-title {
53
  margin-top: 10px;
54
  }
55
- .rate-it-cool-feedback-form .feedback-content textarea
 
 
 
 
 
 
56
  {
57
  padding: 10px 0 10px 5px;
58
  width: 99% !important;
@@ -60,9 +69,48 @@
60
  margin: 10px 0;
61
  border-color: #ccc;
62
  }
 
 
 
63
  .rate-it-cool-feedback-form .rate-it-cool-star-text {
64
  margin-left: 10px;
65
  }
66
  .rateit-cool-send-feedback-error {
67
  color: red;
68
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  .ratings .ratingCount {
2
  float:left;
3
+ width:60px;
4
  margin-top:5px;
5
  }
6
  .ratings .rating.rate-it-cool-review-summary-empty {
9
  .feedbackOverview td.count {
10
  padding-left: 5px;
11
  }
12
+ .rate-it-cool-product-feedbacks .overview, .rate-it-cool-product-feedbacks .recommend, .rate-it-cool-product-public-feedbackform {
13
  margin: 10px 0;
14
  padding-bottom: 10px;
15
  border-bottom: solid 1px #ccc;
38
  .rate-it-cool-product-feedbacks .date {
39
  float:right;
40
  }
41
+ .rate-it-cool-product-feedbacks table.feedbackOverview {
42
+ float: left;
43
+ }
44
 
45
  .box-up-sell .ratings, .cms-index-index .products-grid .ratings, .cms-index-noroute .products-grid .ratings {
46
  display: block !important;
55
  .rate-it-cool-feedback-form .feedback-title {
56
  margin-top: 10px;
57
  }
58
+ .rate-it-cool-feedback-form td {
59
+ padding: 2px 10px;
60
+ }
61
+ .rate-it-cool-feedback-form td.second {
62
+ background-color:#eee;
63
+ }
64
+ .rate-it-cool-feedback-form .feedback-content textarea, .feedback-content textarea
65
  {
66
  padding: 10px 0 10px 5px;
67
  width: 99% !important;
69
  margin: 10px 0;
70
  border-color: #ccc;
71
  }
72
+ .feedback-title input {
73
+ width: 100%;
74
+ }
75
  .rate-it-cool-feedback-form .rate-it-cool-star-text {
76
  margin-left: 10px;
77
  }
78
  .rateit-cool-send-feedback-error {
79
  color: red;
80
  }
81
+ .rate-it-cool-show-stars {
82
+ font-size: 10px;
83
+ outline: solid 1px #ccc;
84
+ padding: 2px 8px;
85
+ background-position: 0 -573px;
86
+ cursor: pointer;
87
+ }
88
+ .rate-it-cool-show-stars:hover {
89
+ background-position: -50px -573px;
90
+ }
91
+ .rate-it-cool-stars-detail-table {
92
+ outline: solid 1px #ccc;
93
+ margin-top: 10px;
94
+ width: inherit;
95
+ }
96
+
97
+ .rate-it-cool-stars-detail-table td, .rate-it-cool-stars-detail-table th {
98
+ padding: 2px;
99
+ }
100
+
101
+ .rate-it-cool-stars-detail-table th {
102
+ background-color: #ccc;
103
+ font-weight: bold;
104
+ }
105
+ .rate-it-cool-detail-stars {
106
+ float: right;
107
+ }
108
+
109
+ .feedbackOverview td, .rate-it-cool-detail-stars td {
110
+ padding: 2px;
111
+ }
112
+
113
+ .rate-it-cool-verified, .rate-it-cool-public, .rate-it-cool-mobile {
114
+ float: right;
115
+ font-weight: bold;
116
+ }