RateItCool_ProductReviews - Version 1.0.2

Version Notes

- Add the shop review form
- Add the seo feature to the detail page
- Add the server api calls

Download this release

Release Info

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


Code changes from version 1.0.1 to 1.0.2

app/code/community/RateItCool/ProductReviews/Block/Product/View/List.php CHANGED
@@ -34,35 +34,34 @@
34
  */
35
  class RateItCool_ProductReviews_Block_Product_View_List extends Mage_Review_Block_Product_View
36
  {
37
- protected $_forceHasOptions = false;
38
 
39
- public function getProductId()
40
- {
41
- return Mage::registry('product')->getId();
42
- }
43
 
44
- public function getGpnValue()
45
- {
46
- if (Mage::registry('product')->getEan() != NULL) {
47
- return Mage::registry('product')->getEan();
48
- } else if (Mage::registry('product')->getSku() != NULL) {
49
- return Mage::registry('product')->getSku();
50
- } else {
51
- return Mage::registry('product')->getId();
52
- }
53
- }
54
 
55
- public function getGpnType()
56
- {
57
- if (Mage::registry('product')->getEan() != NULL) {
58
- return 'ean';
59
- } else {
60
- return $this->_apiUserName;
61
- }
62
- }
63
 
64
- public function getReviewUrl($id)
65
- {
66
- return Mage::getUrl('review/product/view', array('id' => $id));
 
 
 
 
 
 
67
  }
 
 
 
68
  }
34
  */
35
  class RateItCool_ProductReviews_Block_Product_View_List extends Mage_Review_Block_Product_View
36
  {
37
+ protected $_forceHasOptions = false;
38
 
39
+ public function getProductId()
40
+ {
41
+ return Mage::registry('product')->getId();
42
+ }
43
 
44
+ public function getGpnValue()
45
+ {
46
+ return $this->getProduct()->getGpnValue();
47
+ }
 
 
 
 
 
 
48
 
49
+ public function getGpnType()
50
+ {
51
+ return $this->getProduct()->getGpnType();
52
+ }
 
 
 
 
53
 
54
+ public function getReviewUrl($id)
55
+ {
56
+ return Mage::getUrl('review/product/view', array('id' => $id));
57
+ }
58
+
59
+ public function getReviewsCollection()
60
+ {
61
+ if (null === $this->_reviewsCollection) {
62
+ $this->_reviewsCollection = Mage::getModel('productreviews/reviews')->getCollection($this->getProduct()->getGpnType(), $this->getProduct()->getGpnValue());
63
  }
64
+ return $this->_reviewsCollection;
65
+ }
66
+
67
  }
app/code/community/RateItCool/ProductReviews/Model/Order/Item.php CHANGED
@@ -18,9 +18,10 @@
18
  * versions in the future. If you wish to customize Magento for your
19
  * needs please refer to http://www.magento.com for more information.
20
  *
21
- * @category Mage
22
- * @package Mage_Sales
23
- * @copyright Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
 
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
  */
26
 
@@ -28,9 +29,9 @@
28
  * Order Item Model
29
  *
30
  *
31
- * @category Mage
32
- * @package Mage_Sales
33
- * @author Magento Core Team <core@magentocommerce.com>
34
  */
35
  class RateItCool_ProductReviews_Model_Order_Item extends Mage_Sales_Model_Order_Item
36
  {
18
  * versions in the future. If you wish to customize Magento for your
19
  * needs please refer to http://www.magento.com for more information.
20
  *
21
+ * @category RateItCool
22
+ * @package RateItCool_ProductReviews
23
+ * @author Cool Services GbR <thomas.gravel@rateit.cool>
24
+ * @copyright Copyright (c) 2015 Cool Services GbR (https://www.rateit.cool)
25
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
  */
27
 
29
  * Order Item Model
30
  *
31
  *
32
+ * @category RateItCool
33
+ * @package RateItCool_ProductReviews
34
+ * @author Cool Services GbR <thomas.gravel@rateit.cool>
35
  */
36
  class RateItCool_ProductReviews_Model_Order_Item extends Mage_Sales_Model_Order_Item
37
  {
app/code/community/RateItCool/ProductReviews/Model/Review.php ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category RateItCool
22
+ * @package RateItCool_ProductReviews
23
+ * @author Cool Services GbR <thomas.gravel@rateit.cool>
24
+ * @copyright Copyright (c) 2015 Cool Services GbR (https://www.rateit.cool)
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+
28
+ /**
29
+ * Review model
30
+ *
31
+ * @category RateItCool
32
+ * @package RateItCool_ProductReviews
33
+ * @author Cool Services GbR <thomas.gravel@rateit.cool>
34
+ */
35
+ class RateItCool_ProductReviews_Model_Review
36
+ {
37
+
38
+ protected $_id = '';
39
+ protected $time = '';
40
+ protected $recommend = 0;
41
+ protected $negative = 0;
42
+ protected $positive = 0;
43
+ protected $content ='';
44
+ protected $title ='';
45
+ protected $region ='';
46
+ protected $language ='';
47
+ // protected $details = new stdClass();
48
+ /*
49
+ stdClass::__set_state(array(
50
+ 'total' => 1,
51
+ 'description' => 0,
52
+ 'workmanship' => 0,
53
+ 'design' => 0,
54
+ 'costbenefit' => 0,
55
+ )),
56
+ */
57
+ protected $stars = 0;
58
+
59
+ public function map($input) {
60
+
61
+ try {
62
+ $this->_id = $input['_id'];
63
+ $this->time = $input['time'];
64
+ $this->recommend = $input['recommend'];
65
+ $this->negative = $input['negative'];
66
+ $this->positive = $input['positive'];
67
+ $this->content = $input['content'];
68
+ $this->title = $input['title'];
69
+ $this->language = $input['language'];
70
+ $this->stars = $input['stars'];
71
+ } catch(Exception $e) {
72
+
73
+ }
74
+ }
75
+
76
+ public function getTime($format = false) {
77
+ $tempDateTime = new DateTime($this->time);
78
+ if ($format) {
79
+ return Mage::helper('core')->formatDate($tempDateTime->format('Y-m-d'), Mage_Core_Model_Locale::FORMAT_TYPE_LONG, false);
80
+ }
81
+ return $tempDateTime->format('Y-m-d');
82
+ }
83
+
84
+ public function getRecommend() {
85
+ return $this->recommend;
86
+ }
87
+
88
+ public function getNegative() {
89
+ return $this->negative;
90
+ }
91
+
92
+ public function getPositive() {
93
+ return $this->positive;
94
+ }
95
+
96
+ public function getContent() {
97
+ return $this->content;
98
+ }
99
+
100
+ public function getTitle() {
101
+ return $this->title;
102
+ }
103
+
104
+ public function getRegion() {
105
+ return $this->region;
106
+ }
107
+
108
+ public function getLanguage() {
109
+ return $this->language;
110
+ }
111
+
112
+ public function getDetails() {
113
+ return $this->details;
114
+ }
115
+
116
+ public function getStars() {
117
+ return $this->stars;
118
+ }
119
+
120
+ }
app/code/community/RateItCool/ProductReviews/Model/Review/Reviews.php ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magento.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magento.com for more information.
20
+ *
21
+ * @category RateItCool
22
+ * @package RateItCool_ProductReviews
23
+ * @author Cool Services GbR <thomas.gravel@rateit.cool>
24
+ * @copyright Copyright (c) 2015 Cool Services GbR (https://www.rateit.cool)
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+
28
+ /**
29
+ * Review model
30
+ *
31
+ * @category RateItCool
32
+ * @package RateItCool_ProductReviews
33
+ * @author Cool Services GbR <thomas.gravel@rateit.cool>
34
+ */
35
+ class RateItCool_ProductReviews_Model_Review_Reviews extends Mage_Core_Model_Abstract
36
+ {
37
+
38
+ protected $_server_api_key = '';
39
+ protected $_api_key = '';
40
+ protected $_server_api_username = '';
41
+
42
+ protected function _construct()
43
+ {
44
+ $this->_server_api_username = Mage::getStoreConfig('catalog/RateItCool_ProductReviews/api_user');
45
+ $this->_server_api_key = Mage::getStoreConfig('catalog/RateItCool_ProductReviews/server_api_key');
46
+ $this->_api_key = Mage::getStoreConfig('catalog/RateItCool_ProductReviews/api_key');
47
+ $this->_init('productreviews/review_reviews');
48
+ }
49
+
50
+ public function getCollection($gpntype, $gpnvalue)
51
+ {
52
+ // get from api
53
+ $headers = array(
54
+ 'Content-Type:application/json',
55
+ 'X-Api-Version: 1.0.0',
56
+ 'X-Api-Key: ' . $this->_api_key,
57
+ 'Origin: localhost',
58
+ 'Authorization: Basic '. base64_encode($this->_server_api_username . ':' . $this->_server_api_key)
59
+ );
60
+ try {
61
+ $url = 'https://api.rateit.cool/feedback/' . $gpntype . '/' . $gpnvalue;
62
+ $url .= '/' . Mage::app()->getLocale()->getLocaleCode() . '?&limit=5';
63
+ $ch = curl_init();
64
+
65
+ curl_setopt($ch, CURLOPT_URL, $url);
66
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
67
+ curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
68
+ $returnElement = array();
69
+
70
+ if( ! $response = curl_exec($ch))
71
+ {
72
+ return $returnElement;
73
+ }
74
+ curl_close($ch);
75
+ } catch(Exception $ex) {
76
+
77
+ }
78
+
79
+ try {
80
+ $reponseObj = json_decode($response, true);
81
+ foreach($reponseObj['elements'] as $element) {
82
+ $review = new RateItCool_ProductReviews_Model_Review();
83
+ $review->map($element);
84
+ $returnElement[] = $review;
85
+ }
86
+ } catch (Exception $e) {
87
+ return $returnElement;
88
+ }
89
+
90
+ return $returnElement;
91
+ }
92
+
93
+ }
app/code/community/RateItCool/ProductReviews/etc/config.xml CHANGED
@@ -14,6 +14,9 @@
14
  <product>RateItCool_ProductReviews_Model_Product</product>
15
  </rewrite>
16
  </catalog>
 
 
 
17
  <sales>
18
  <rewrite>
19
  <order_item>RateItCool_ProductReviews_Model_Order_Item</order_item>
@@ -21,11 +24,11 @@
21
  </sales>
22
  </models>
23
  <resources>
24
- <review_setup>
25
  <setup>
26
  <module>RateItCool_ProductReviews</module>
27
  </setup>
28
- </review_setup>
29
  </resources>
30
  <blocks>
31
  <review>
@@ -47,30 +50,31 @@
47
  </updates>
48
  </layout>
49
  <routers>
50
- <review>
51
  <use>standard</use>
52
  <args>
53
  <module>RateItCool_ProductReviews</module>
54
- <frontName>review</frontName>
55
  </args>
56
- </review>
57
  </routers>
58
  <translate>
59
  <modules>
60
- <RateItCool_ProductReviews>
61
  <files>
62
  <default>RateItCool_ProductReviews.csv</default>
63
  </files>
64
- </RateItCool_ProductReviews>
65
  </modules>
66
  </translate>
67
  </frontend>
68
  <default>
69
  <catalog>
70
- <RateItCool_ProductReviews>
71
  <api_user>demo</api_user>
72
  <api_key>password</api_key>
73
- </RateItCool_ProductReviews>
 
74
  </catalog>
75
  </default>
76
  </config>
14
  <product>RateItCool_ProductReviews_Model_Product</product>
15
  </rewrite>
16
  </catalog>
17
+ <productreviews>
18
+ <class>RateItCool_ProductReviews_Model_Review</class>
19
+ </productreviews>
20
  <sales>
21
  <rewrite>
22
  <order_item>RateItCool_ProductReviews_Model_Order_Item</order_item>
24
  </sales>
25
  </models>
26
  <resources>
27
+ <productreviews_setup>
28
  <setup>
29
  <module>RateItCool_ProductReviews</module>
30
  </setup>
31
+ </productreviews_setup>
32
  </resources>
33
  <blocks>
34
  <review>
50
  </updates>
51
  </layout>
52
  <routers>
53
+ <productreviews>
54
  <use>standard</use>
55
  <args>
56
  <module>RateItCool_ProductReviews</module>
57
+ <frontName>productreviews</frontName>
58
  </args>
59
+ </productreviews>
60
  </routers>
61
  <translate>
62
  <modules>
63
+ <productreviews>
64
  <files>
65
  <default>RateItCool_ProductReviews.csv</default>
66
  </files>
67
+ </productreviews>
68
  </modules>
69
  </translate>
70
  </frontend>
71
  <default>
72
  <catalog>
73
+ <productreviews>
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>
80
  </config>
app/code/community/RateItCool/ProductReviews/etc/system.xml CHANGED
@@ -53,6 +53,14 @@
53
  <show_in_website>1</show_in_website>
54
  <show_in_store>1</show_in_store>
55
  </api_key>
 
 
 
 
 
 
 
 
56
  </fields>
57
  </RateItCool_ProductReviews>
58
  </groups>
53
  <show_in_website>1</show_in_website>
54
  <show_in_store>1</show_in_store>
55
  </api_key>
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>
app/design/frontend/base/default/template/productreviews/product/view/list.phtml CHANGED
@@ -32,6 +32,29 @@
32
  data-count=""
33
  data-extraParameter="" id="customer-reviews">
34
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  </div>
36
 
37
  <div id="rate-it-cool-product-feedbacks-template" style="display:none;">
32
  data-count=""
33
  data-extraParameter="" id="customer-reviews">
34
 
35
+ <?php $_items = $this->getReviewsCollection();?>
36
+ <?php foreach($_items as $_review): ?>
37
+ <div itemscope itemtype="http://schema.org/Review">
38
+ <meta itemprop="datePublished" content="<?php echo $_review->getTime(false); ?>"><?php echo $_review->getTime(true); ?>
39
+ <div itemprop="itemReviewed" itemscope itemtype="http://schema.org/Product">
40
+ <span itemprop="name"><?php echo $this->getProduct()->getName(); ?></span>
41
+ </div>
42
+ <span itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating">
43
+ <span itemprop="ratingValue"><?php echo $_review->getStars(); ?></span>
44
+ <?php echo $this->__('Maximum Stars text', '<span itemprop="bestRating">5</span>'); ?>
45
+ <?php echo $this->__('Minimum Stars text', '<span itemprop="worstRating">1</span>'); ?>
46
+ </span>
47
+ <br/>
48
+ <h3><span itemprop="name"><?php echo $_review->getTitle(); ?></span></h3>
49
+ <span itemprop="reviewBody"><?php echo $_review->getContent(); ?></span>
50
+
51
+ <div itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
52
+ <meta itemprop="name" content="<?php echo Mage::getStoreConfig('general/store_information/name'); ?>">
53
+ </div>
54
+ </div>
55
+ <hr/>
56
+ <?php endforeach; ?>
57
+
58
  </div>
59
 
60
  <div id="rate-it-cool-product-feedbacks-template" style="display:none;">
app/design/frontend/base/default/template/productreviews/sales/order/items.phtml DELETED
@@ -1 +0,0 @@
1
- bla
 
app/locale/de_DE/RateItCool_ProductReviews.csv CHANGED
@@ -1,4 +1,4 @@
1
- "Reviews","Gesamtbewertung"
2
  "Show only reviews with 5 stars","Nur Bewertungen mit 5 Sternen anzeigen"
3
  "Show only reviews with 4 stars","Nur Bewertungen mit 4 Sternen anzeigen"
4
  "Show only reviews with 3 stars","Nur Bewertungen mit 3 Sternen anzeigen"
@@ -18,16 +18,22 @@
18
  "No","Nein"
19
  "Feedback %s report %s","Bewertung %s melden %s"
20
  "ShowReviews","Zeige Bewertungen"
21
- "Product review for the product","Bewertung für das Produkt"
 
22
  "not really ok","nicht ganz ok"
23
  "hm ok","ganz ok"
24
  "ok","ok"
25
  "cool","cool"
26
  "coolest","sehr cool"
27
- "I recommend the product to a friend","I epfehle das Produkt einem Freund"
 
28
  "Send the review","Sende die Bewertung"
29
  "Review the product","Produkt bewerten",
30
  "Title of the review","Titel der Bewertung"
31
  "Content of the review","Bewertung als Text"
32
  "Thank you for the review","Danke für die Bewertung des Produktes"
33
  "Can't send the review","Konnte die Bewertung leider nicht senden"
 
 
 
 
1
+ "Reviews","Bewertungen"
2
  "Show only reviews with 5 stars","Nur Bewertungen mit 5 Sternen anzeigen"
3
  "Show only reviews with 4 stars","Nur Bewertungen mit 4 Sternen anzeigen"
4
  "Show only reviews with 3 stars","Nur Bewertungen mit 3 Sternen anzeigen"
18
  "No","Nein"
19
  "Feedback %s report %s","Bewertung %s melden %s"
20
  "ShowReviews","Zeige Bewertungen"
21
+ "Review for the product","Bewertung für das Produkt"
22
+ "Review for the shop","Bewertung für den Shop"
23
  "not really ok","nicht ganz ok"
24
  "hm ok","ganz ok"
25
  "ok","ok"
26
  "cool","cool"
27
  "coolest","sehr cool"
28
+ "I recommend the product to a friend","Ich empfehle das Produkt einem Freund"
29
+ "I recommend the shop to a friend","Ich empfehle den Shop einem Freund"
30
  "Send the review","Sende die Bewertung"
31
  "Review the product","Produkt bewerten",
32
  "Title of the review","Titel der Bewertung"
33
  "Content of the review","Bewertung als Text"
34
  "Thank you for the review","Danke für die Bewertung des Produktes"
35
  "Can't send the review","Konnte die Bewertung leider nicht senden"
36
+ "Shop Review Title","Shop bewerten"
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"
app/locale/en_US/RateItCool_ProductReviews.csv CHANGED
@@ -18,16 +18,22 @@
18
  "No","No"
19
  "Feedback %s report %s","Feedback %s report %s"
20
  "ShowReviews","ShowReviews"
21
- "Product review for the product","Product review for the product"
 
22
  "not really ok","not really ok"
23
  "hm ok","hm ok"
24
  "ok","ok"
25
  "cool","cool"
26
  "coolest","coolest"
27
  "I recommend the product to a friend","I recommend the product to a friend"
 
28
  "Send the review","Send the review"
29
  "Review the product","Review the product",
30
  "Title of the review","Title of the review"
31
  "Content of the review","Content of the review"
32
  "Thank you for the review","Thank you for the review"
33
  "Can't send the review","Can't send the review"
 
 
 
 
18
  "No","No"
19
  "Feedback %s report %s","Feedback %s report %s"
20
  "ShowReviews","ShowReviews"
21
+ "Review for the product","Review for the product"
22
+ "Review for the shop","Review for the shop"
23
  "not really ok","not really ok"
24
  "hm ok","hm ok"
25
  "ok","ok"
26
  "cool","cool"
27
  "coolest","coolest"
28
  "I recommend the product to a friend","I recommend the product to a friend"
29
+ "I recommend the shop to a friend","I recommend the shop to a friend"
30
  "Send the review","Send the review"
31
  "Review the product","Review the product",
32
  "Title of the review","Title of the review"
33
  "Content of the review","Content of the review"
34
  "Thank you for the review","Thank you for the review"
35
  "Can't send the review","Can't send the review"
36
+ "Shop Review Title","Shop Review"
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"
js/rateitcool/rateit.cool.js CHANGED
@@ -288,7 +288,7 @@ var RateItCoolAPI = (function($){
288
  recommend: (_jQuery('form[name=' + _jQuery(this).attr('data-formname') + ']').find('[name=recommend]').is(':checked')?1:0)
289
  },
290
  destinationElement = _jQuery(this);
291
- console.log(gpntype,gpnvalue, language, feedbackElement);
292
  if (gpntype && gpnvalue && language && feedbackElement.title !== '' && feedbackElement.content !== '' && feedbackElement.stars > 0) {
293
  _jQuery.ajax({
294
  url : 'https://api.rateit.cool/feedback/' + gpntype + '/' + gpnvalue + '/' + language,
288
  recommend: (_jQuery('form[name=' + _jQuery(this).attr('data-formname') + ']').find('[name=recommend]').is(':checked')?1:0)
289
  },
290
  destinationElement = _jQuery(this);
291
+
292
  if (gpntype && gpnvalue && language && feedbackElement.title !== '' && feedbackElement.content !== '' && feedbackElement.stars > 0) {
293
  _jQuery.ajax({
294
  url : 'https://api.rateit.cool/feedback/' + gpntype + '/' + gpnvalue + '/' + language,
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>RateItCool_ProductReviews</name>
4
- <version>1.0.1</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>- Add the product review form&#xD;
27
- - Add locale "de_DE"</notes>
 
28
  <authors><author><name>Thomas Gravel</name><user>RateItCoolReviews</user><email>thomas.gravel@rateit.cool</email></author></authors>
29
- <date>2015-09-07</date>
30
- <time>14:54:32</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="ecea759a46f911a28616dca5fb7380a8"/></dir></dir></dir><dir name="Product"><dir name="View"><file name="List.php" hash="17c1f9e6e6f79d40fdc14fd39b1d24d6"/></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="fa2e4fbfebbe5d13da139d169b959f23"/></dir><file name="Product.php" hash="1ebd505b405b4db842d81ca7ffc00796"/></dir><dir name="etc"><file name="config.xml" hash="577b0de63d060bb1fafe209b914b0cb4"/><file name="system.xml" hash="f04c9a8051826fa1773a3c95a587bd4f"/></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="7dfb5ebad9c7819f025d7e2682d61eb6"/></dir></dir><dir name="sales"><dir name="order"><file name="items.phtml" hash="3cd7a0db76ff9dca48979e24c39b408c"/></dir></dir><file name="view.phtml" hash="4651fb9bf0f1bff168be7ce8d2b51ecb"/></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="99993497b7e238c43cf794e3775e6979"/></dir><dir name="de_DE"><file name="RateItCool_ProductReviews.csv" hash="046969d6170e7c290578e4b3ee8c192b"/></dir></target><target name="mageweb"><dir name="js"><dir name="rateitcool"><file name="rateit.cool.js" hash="0d3b8d7c71dbf7a27776e5c672119e23"/></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.2</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 shop review form&#xD;
27
+ - Add the seo feature to the detail page&#xD;
28
+ - Add the server api calls</notes>
29
  <authors><author><name>Thomas Gravel</name><user>RateItCoolReviews</user><email>thomas.gravel@rateit.cool</email></author></authors>
30
+ <date>2015-09-09</date>
31
+ <time>15:56:46</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="ecea759a46f911a28616dca5fb7380a8"/></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="1ebd505b405b4db842d81ca7ffc00796"/><dir name="Review"><file name="Reviews.php" hash="98cc9d0286730d62ef0ee09f8fb7dd9f"/></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="4651fb9bf0f1bff168be7ce8d2b51ecb"/></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="867ad0a68c6e2d356c447a2ae68b6d5d"/></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>
33
  <compatible/>
34
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
35
  </package>