lipscore - Version 1.4.3

Version Notes

Stability improvements

Download this release

Release Info

Developer Henning Frettem
Extension lipscore
Version 1.4.3
Comparing to
See all releases


Code changes from version 1.4.2 to 1.4.3

app/code/community/Lipscore/RatingsReviews/Block/Review/Helper.php CHANGED
@@ -7,7 +7,7 @@ class Lipscore_RatingsReviews_Block_Review_Helper extends Mage_Review_Block_Help
7
  'long' => 'id="lipscore-rating"',
8
  'short' => 'class="lipscore-rating-small"'
9
  );
10
-
11
  public function getSummaryHtml($product, $templateType, $displayIfNoReviews)
12
  {
13
  try {
@@ -16,44 +16,50 @@ class Lipscore_RatingsReviews_Block_Review_Helper extends Mage_Review_Block_Help
16
  $templateType = 'short';
17
  Lipscore_RatingsReviews_Logger::logException($e);
18
  }
19
-
20
  $this->setRatingType(self::$_availableTypes[$templateType]);
 
 
 
 
 
 
21
  $this->setProduct($product);
22
-
23
  try {
24
  $this->setWidgetAttrs($product, $templateType);
25
  } catch (Exception $e) {
26
  Lipscore_RatingsReviews_Logger::logException($e);
27
- }
28
-
29
  return $this->toHtml();
30
  }
31
-
32
  protected function getTemplateType($templateType)
33
  {
34
  $layoutHandles = $this->getLayout()->getUpdate()->getHandles();
35
  $isProductView = in_array('catalog_product_view', $layoutHandles);
36
-
37
  if ($isProductView) {
38
  return 'long';
39
- }
40
-
41
  if (isset(self::$_availableTypes[$templateType])) {
42
  return $templateType;
43
  } else {
44
  return 'short';
45
- }
46
  }
47
-
48
  protected function setWidgetAttrs($product, $templateType)
49
  {
50
  $widgetHelper = $this->helper('lipscore_ratingsreviews/widget');
51
  $productHelper = $this->helper('lipscore_ratingsreviews/product');
52
-
53
  $productData = $productHelper->getProductData($product);
54
  $productAttrs = $widgetHelper->getProductAttrs($productData);
55
  $this->setLsProductAttrs($productAttrs);
56
-
57
  if ($templateType == 'long') {
58
  $rsProductData = $productHelper->getRichsnippetProductData($product);
59
  $rsAttrs = $widgetHelper->getRichsnippetPproductAttrs($rsProductData);
7
  'long' => 'id="lipscore-rating"',
8
  'short' => 'class="lipscore-rating-small"'
9
  );
10
+
11
  public function getSummaryHtml($product, $templateType, $displayIfNoReviews)
12
  {
13
  try {
16
  $templateType = 'short';
17
  Lipscore_RatingsReviews_Logger::logException($e);
18
  }
19
+
20
  $this->setRatingType(self::$_availableTypes[$templateType]);
21
+ $this->setDisplayIfEmpty(true);
22
+
23
+ if (!$product->getRatingSummary()) {
24
+ Mage::getModel('review/review')->getEntitySummary($product, Mage::app()->getStore()->getId());
25
+ }
26
+
27
  $this->setProduct($product);
28
+
29
  try {
30
  $this->setWidgetAttrs($product, $templateType);
31
  } catch (Exception $e) {
32
  Lipscore_RatingsReviews_Logger::logException($e);
33
+ }
34
+
35
  return $this->toHtml();
36
  }
37
+
38
  protected function getTemplateType($templateType)
39
  {
40
  $layoutHandles = $this->getLayout()->getUpdate()->getHandles();
41
  $isProductView = in_array('catalog_product_view', $layoutHandles);
42
+
43
  if ($isProductView) {
44
  return 'long';
45
+ }
46
+
47
  if (isset(self::$_availableTypes[$templateType])) {
48
  return $templateType;
49
  } else {
50
  return 'short';
51
+ }
52
  }
53
+
54
  protected function setWidgetAttrs($product, $templateType)
55
  {
56
  $widgetHelper = $this->helper('lipscore_ratingsreviews/widget');
57
  $productHelper = $this->helper('lipscore_ratingsreviews/product');
58
+
59
  $productData = $productHelper->getProductData($product);
60
  $productAttrs = $widgetHelper->getProductAttrs($productData);
61
  $this->setLsProductAttrs($productAttrs);
62
+
63
  if ($templateType == 'long') {
64
  $rsProductData = $productHelper->getRichsnippetProductData($product);
65
  $rsAttrs = $widgetHelper->getRichsnippetPproductAttrs($rsProductData);
app/code/community/Lipscore/RatingsReviews/Block/System/Config/Form/Coupons.php CHANGED
@@ -9,14 +9,14 @@ class Lipscore_RatingsReviews_Block_System_Config_Form_Coupons extends Mage_Admi
9
  $generateCoupons = Mage::helper('lipscore_ratingsreviews/coupon')->isAutoGenerationSupported();
10
  } catch (Exception $e) {
11
  Lipscore_RatingsReviews_Logger::logException($e);
12
- }
13
-
14
  switch ($field->getName()) {
15
  case 'coupons':
16
- return $generateCoupons;
17
  break;
18
  case 'coupons_warning':
19
- return !$generateCoupons;
20
  break;
21
  default:
22
  return parent::_canShowField($field);
9
  $generateCoupons = Mage::helper('lipscore_ratingsreviews/coupon')->isAutoGenerationSupported();
10
  } catch (Exception $e) {
11
  Lipscore_RatingsReviews_Logger::logException($e);
12
+ }
13
+
14
  switch ($field->getName()) {
15
  case 'coupons':
16
+ return (int) $generateCoupons;
17
  break;
18
  case 'coupons_warning':
19
+ return (int) !$generateCoupons;
20
  break;
21
  default:
22
  return parent::_canShowField($field);
app/code/community/Lipscore/RatingsReviews/Model/Observer/Output.php CHANGED
@@ -29,7 +29,9 @@ class Lipscore_RatingsReviews_Model_Observer_Output extends Lipscore_RatingsRevi
29
  $collection = $observer->getEvent()->getCollection();
30
  if ($collection->count()) {
31
  foreach ($collection as $product) {
32
- $product->setData('rating_summary', 1);
 
 
33
  }
34
  }
35
 
29
  $collection = $observer->getEvent()->getCollection();
30
  if ($collection->count()) {
31
  foreach ($collection as $product) {
32
+ if (!is_a($product->getRatingSummary(), 'Mage_Review_Model_Review_Summary')) {
33
+ Mage::getModel('review/review')->getEntitySummary($product);
34
+ }
35
  }
36
  }
37
 
app/code/community/Lipscore/RatingsReviews/etc/config.xml CHANGED
@@ -11,7 +11,7 @@
11
  <config>
12
  <modules>
13
  <Lipscore_RatingsReviews>
14
- <version>1.4.1</version>
15
  </Lipscore_RatingsReviews>
16
  </modules>
17
 
11
  <config>
12
  <modules>
13
  <Lipscore_RatingsReviews>
14
+ <version>1.4.3</version>
15
  </Lipscore_RatingsReviews>
16
  </modules>
17
 
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>lipscore</name>
4
- <version>1.4.2</version>
5
  <stability>stable</stability>
6
  <license uri="https://lipscore.com/signup">Terms of use</license>
7
  <channel>community</channel>
@@ -11,13 +11,13 @@
11
  Lipscore has a range of great features that will&#xD;
12
  take all the hassle out of collecting product reviews, and help convert more&#xD;
13
  visitors in to profitable customers.</description>
14
- <notes>Add CloudFlare Rocket Loader support&#xD;
15
  &#xD;
16
  </notes>
17
  <authors><author><name>Henning Frettem</name><user>Lipscore</user><email>henning@lipscore.com</email></author><author><name>Olga Ivanova</name><user>oivanova</user><email>o.ivanova@datacrafts.io</email></author></authors>
18
- <date>2016-05-21</date>
19
- <time>08:37:22</time>
20
- <contents><target name="magecommunity"><dir name="Lipscore"><dir name="RatingsReviews"><dir name="Block"><dir name="Catalog"><dir name="Product"><file name="Reviews.php" hash="e42b5b73a1b0f108818e4e8dad529d65"/><file name="View.php" hash="64d1e7a6a79a2c69f5fcc7f93b600947"/></dir></dir><file name="Init.php" hash="5537b142d273b6e5948e0e3bc7c2dc84"/><dir name="Review"><file name="Helper.php" hash="d9f5a39a6e432b5ea58f7b3ed08084e4"/><file name="Single.php" hash="1828a165516557d36820851da6a4fd6a"/><file name="Tabtitle.php" hash="20dfc5f3dc63c5b341c98ac1652b81d9"/></dir><dir name="System"><dir name="Config"><dir name="Form"><file name="Coupons.php" hash="75b2d3c48d10ef77c2a9e5b560767be0"/><dir name="Field"><file name="Abstract.php" hash="d3aacaca28c50d77b4766b35a98cb064"/><file name="Apikey.php" hash="213fd68e66912f5e4d0930e595aee9c6"/><file name="Emailstext.php" hash="0f850db8a26e3dfecc429b2ed0850052"/><file name="Reminderperiod.php" hash="06e032dbd4319123fc20806e8357b77a"/></dir><dir name="Fieldset"><file name="Coupons.php" hash="ea3b6a086bf35810492a89103c81c3c5"/><file name="Dashboardlink.php" hash="7b35ae95cd4f55f6e18b1819a17ae57c"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="Abstract.php" hash="4715d026440f1bb1cda70d56a69a2513"/><file name="Config.php" hash="e252d8f075fd27417293027beb6eb85d"/><file name="Coupon.php" hash="c44e0a938edccb05e733f40955a8a179"/><file name="Data.php" hash="d4a2ee7e1dbdd277e5a6eff4927fe4b2"/><file name="Kickstart.php" hash="606cd0b7efc96758a71decad671302ad"/><file name="Locale.php" hash="1cfc0eb4dc3ede4aa07fbf1bba7ff104"/><file name="Module.php" hash="e1842e7db598288f6c2ac1a706a5956b"/><file name="Price.php" hash="a18d38d97b10f2bf7ab4e1cd0a9e83a4"/><file name="Product.php" hash="09ea9f1d7cacd16ad663ebd1588df46a"/><file name="Purchase.php" hash="30991d1ae641b9a3ea3dcf72c0da53d7"/><file name="Reminder.php" hash="f7b0e91e3fafd000765ac1c3dc21409f"/><file name="Widget.php" hash="fe913158ac4075f107286b08fed57d47"/></dir><file name="Logger.php" hash="29c5f230b560c3008b5e3ac64f291d91"/><dir name="Model"><dir name="Api"><file name="Request.php" hash="b61017066275ec132bf94e1997896bde"/></dir><dir name="Config"><file name="Abstract.php" hash="3dc2509e1ed5efa45d24e402dcb4e285"/><file name="Env.php" hash="6d541047b5f1366271d4ac92d4cd65b5"/><file name="Kickstart.php" hash="0c876e326ff864aea25e036cf5a5f89a"/></dir><file name="Config.php" hash="5c041889edbc7a9614ea65f9d62ef253"/><dir name="Coupon"><file name="Generator.php" hash="39700bbd52697c3e12a3953d9007282a"/></dir><dir name="Observer"><file name="Abstract.php" hash="25d275ebb7a0802aff0fee93a2d49169"/><file name="Module.php" hash="4abd870492ed134a8694cb57d2109b4c"/><dir name="Order"><file name="Status.php" hash="f1ed8507c85c5d21a09be0de16ebe51f"/></dir><file name="Output.php" hash="4ff1c21f7edd4d251f212ea68949cb0b"/></dir><dir name="Purchase"><file name="Reminder.php" hash="c03f3b15c7a67528059d6803083c8785"/></dir><file name="Shop.php" hash="b23d54688fc733ea672d427072a675af"/><dir name="System"><dir name="Config"><dir name="Backend"><file name="Apikey.php" hash="53385393e0e6c6320878f06929424581"/><file name="Module.php" hash="1e72a92489834742460f9f97cc5f82aa"/></dir><dir name="Source"><file name="Active.php" hash="c60478c02a6c1a8bc54bd4682d694843"/><file name="Locale.php" hash="6cb71dca2b2e76a756fc794a136cc9c5"/><dir name="Order"><dir name="Status"><file name="Abstract.php" hash="cf141cb1baae94f3214af72196418773"/><file name="Reminder.php" hash="9a48a5d055ad5bff4d0bd2b9d0346b74"/><file name="Reminders.php" hash="7b3fc04193f846838a58d0148d9def23"/></dir></dir><file name="Pricerule.php" hash="5204f6c341f8adc8a6b8c77888e40396"/><dir name="Productattr"><file name="Brand.php" hash="fc166f0faa7304b4bc861d50e7b9a8e7"/></dir><file name="Reminderperiod.php" hash="1c6a9df19b5507ab2d706af46c96f4d5"/></dir></dir></dir><dir name="Tracker"><file name="Action.php" hash="94a353059f272207491baa05dd7686f5"/><file name="Installation.php" hash="15a0823b0fd346fba58a313c711c4103"/></dir></dir><dir name="controllers"><dir name="Purchases"><file name="RemindersController.php" hash="29856cfcba2ce85e53b7200f5559df72"/></dir></dir><dir name="data"><dir name="lipscore_ratingsreviews_setup"><file name="data-install-1.2.21.0.php" hash="0ebbbd1f815ef325cee95311bc4023f8"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="c3a5ed358f97a2119bcaf3a6c1d6c026"/><file name="config.xml" hash="fedd8f46910ad3c56b18bfa8873bfcc0"/><dir name="environments"><file name="production.xml" hash="a519f9130a42c2bc04a30c23eeb3adaf"/></dir><file name="system.xml" hash="57a826b3ab33ab373dcb042d89f3598b"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="lipscore"><file name="init.phtml" hash="32270173123e557595129252d6e20db5"/><dir name="rating"><file name="view.phtml" hash="91139825141bf5ce3f7c5d13d72c13dc"/></dir><dir name="reviews"><file name="tab_title.phtml" hash="716d399499e80fa1cb61dd83295be1f7"/><file name="view.phtml" hash="37b2a4de52536e0632bad412a80a21fc"/><file name="view_single.phtml" hash="3675bcf396c750b63e01dd56b576a676"/></dir></dir></dir><dir name="layout"><file name="lipscore_ratingsreviews.xml" hash="c41ae9b0c0add978cbec4b9ea07b293a"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="lipscore_ratingsreviews.xml" hash="3e6353dfc81756e37494941ef6eb8bee"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Lipscore_RatingsReviews.xml" hash="9422ff014d7fcbd68274ffd97182de1d"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="lipscore.css" hash="550a3270e8fd600f032b4e3f39cfe431"/></dir><dir name="js"><file name="lipscore.js" hash="0ac6084e3d815ef75855fe2c2ebcae06"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><file name="lipscore.css" hash="334ed799b7c5dcdf6752cbbd0baf45c7"/><dir name="js"><file name="lipscore.js" hash="2e02504dc2065d9915b4717908d28f69"/></dir></dir></dir></dir></target></contents>
21
  <compatible/>
22
  <dependencies><required><php><min>5.2.13</min><max>6.0.0</max></php></required></dependencies>
23
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>lipscore</name>
4
+ <version>1.4.3</version>
5
  <stability>stable</stability>
6
  <license uri="https://lipscore.com/signup">Terms of use</license>
7
  <channel>community</channel>
11
  Lipscore has a range of great features that will&#xD;
12
  take all the hassle out of collecting product reviews, and help convert more&#xD;
13
  visitors in to profitable customers.</description>
14
+ <notes>Stability improvements&#xD;
15
  &#xD;
16
  </notes>
17
  <authors><author><name>Henning Frettem</name><user>Lipscore</user><email>henning@lipscore.com</email></author><author><name>Olga Ivanova</name><user>oivanova</user><email>o.ivanova@datacrafts.io</email></author></authors>
18
+ <date>2016-10-05</date>
19
+ <time>12:46:24</time>
20
+ <contents><target name="magecommunity"><dir name="Lipscore"><dir name="RatingsReviews"><dir name="Block"><dir name="Catalog"><dir name="Product"><file name="Reviews.php" hash="e42b5b73a1b0f108818e4e8dad529d65"/><file name="View.php" hash="64d1e7a6a79a2c69f5fcc7f93b600947"/></dir></dir><file name="Init.php" hash="5537b142d273b6e5948e0e3bc7c2dc84"/><dir name="Review"><file name="Helper.php" hash="fdf8d0a486f37072f9b6f535ae4ce866"/><file name="Single.php" hash="1828a165516557d36820851da6a4fd6a"/><file name="Tabtitle.php" hash="20dfc5f3dc63c5b341c98ac1652b81d9"/></dir><dir name="System"><dir name="Config"><dir name="Form"><file name="Coupons.php" hash="6d116d921d55332776becd8e49ed90bc"/><dir name="Field"><file name="Abstract.php" hash="d3aacaca28c50d77b4766b35a98cb064"/><file name="Apikey.php" hash="213fd68e66912f5e4d0930e595aee9c6"/><file name="Emailstext.php" hash="0f850db8a26e3dfecc429b2ed0850052"/><file name="Reminderperiod.php" hash="06e032dbd4319123fc20806e8357b77a"/></dir><dir name="Fieldset"><file name="Coupons.php" hash="ea3b6a086bf35810492a89103c81c3c5"/><file name="Dashboardlink.php" hash="7b35ae95cd4f55f6e18b1819a17ae57c"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="Abstract.php" hash="4715d026440f1bb1cda70d56a69a2513"/><file name="Config.php" hash="e252d8f075fd27417293027beb6eb85d"/><file name="Coupon.php" hash="c44e0a938edccb05e733f40955a8a179"/><file name="Data.php" hash="d4a2ee7e1dbdd277e5a6eff4927fe4b2"/><file name="Kickstart.php" hash="606cd0b7efc96758a71decad671302ad"/><file name="Locale.php" hash="1cfc0eb4dc3ede4aa07fbf1bba7ff104"/><file name="Module.php" hash="e1842e7db598288f6c2ac1a706a5956b"/><file name="Price.php" hash="a18d38d97b10f2bf7ab4e1cd0a9e83a4"/><file name="Product.php" hash="09ea9f1d7cacd16ad663ebd1588df46a"/><file name="Purchase.php" hash="30991d1ae641b9a3ea3dcf72c0da53d7"/><file name="Reminder.php" hash="f7b0e91e3fafd000765ac1c3dc21409f"/><file name="Widget.php" hash="fe913158ac4075f107286b08fed57d47"/></dir><file name="Logger.php" hash="29c5f230b560c3008b5e3ac64f291d91"/><dir name="Model"><dir name="Api"><file name="Request.php" hash="b61017066275ec132bf94e1997896bde"/></dir><dir name="Config"><file name="Abstract.php" hash="3dc2509e1ed5efa45d24e402dcb4e285"/><file name="Env.php" hash="6d541047b5f1366271d4ac92d4cd65b5"/><file name="Kickstart.php" hash="0c876e326ff864aea25e036cf5a5f89a"/></dir><file name="Config.php" hash="5c041889edbc7a9614ea65f9d62ef253"/><dir name="Coupon"><file name="Generator.php" hash="39700bbd52697c3e12a3953d9007282a"/></dir><dir name="Observer"><file name="Abstract.php" hash="25d275ebb7a0802aff0fee93a2d49169"/><file name="Module.php" hash="4abd870492ed134a8694cb57d2109b4c"/><dir name="Order"><file name="Status.php" hash="f1ed8507c85c5d21a09be0de16ebe51f"/></dir><file name="Output.php" hash="99937c30daa4f5b2ecc66a8ad3bfb671"/></dir><dir name="Purchase"><file name="Reminder.php" hash="c03f3b15c7a67528059d6803083c8785"/></dir><file name="Shop.php" hash="b23d54688fc733ea672d427072a675af"/><dir name="System"><dir name="Config"><dir name="Backend"><file name="Apikey.php" hash="53385393e0e6c6320878f06929424581"/><file name="Module.php" hash="1e72a92489834742460f9f97cc5f82aa"/></dir><dir name="Source"><file name="Active.php" hash="c60478c02a6c1a8bc54bd4682d694843"/><file name="Locale.php" hash="6cb71dca2b2e76a756fc794a136cc9c5"/><dir name="Order"><dir name="Status"><file name="Abstract.php" hash="cf141cb1baae94f3214af72196418773"/><file name="Reminder.php" hash="9a48a5d055ad5bff4d0bd2b9d0346b74"/><file name="Reminders.php" hash="7b3fc04193f846838a58d0148d9def23"/></dir></dir><file name="Pricerule.php" hash="5204f6c341f8adc8a6b8c77888e40396"/><dir name="Productattr"><file name="Brand.php" hash="fc166f0faa7304b4bc861d50e7b9a8e7"/></dir><file name="Reminderperiod.php" hash="1c6a9df19b5507ab2d706af46c96f4d5"/></dir></dir></dir><dir name="Tracker"><file name="Action.php" hash="94a353059f272207491baa05dd7686f5"/><file name="Installation.php" hash="15a0823b0fd346fba58a313c711c4103"/></dir></dir><dir name="controllers"><dir name="Purchases"><file name="RemindersController.php" hash="29856cfcba2ce85e53b7200f5559df72"/></dir></dir><dir name="data"><dir name="lipscore_ratingsreviews_setup"><file name="data-install-1.2.21.0.php" hash="0ebbbd1f815ef325cee95311bc4023f8"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="c3a5ed358f97a2119bcaf3a6c1d6c026"/><file name="config.xml" hash="f99e8400745ff876263ad0e8eed1c244"/><dir name="environments"><file name="production.xml" hash="a519f9130a42c2bc04a30c23eeb3adaf"/></dir><file name="system.xml" hash="57a826b3ab33ab373dcb042d89f3598b"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="lipscore"><file name="init.phtml" hash="32270173123e557595129252d6e20db5"/><dir name="rating"><file name="view.phtml" hash="91139825141bf5ce3f7c5d13d72c13dc"/></dir><dir name="reviews"><file name="tab_title.phtml" hash="716d399499e80fa1cb61dd83295be1f7"/><file name="view.phtml" hash="37b2a4de52536e0632bad412a80a21fc"/><file name="view_single.phtml" hash="3675bcf396c750b63e01dd56b576a676"/></dir></dir></dir><dir name="layout"><file name="lipscore_ratingsreviews.xml" hash="c41ae9b0c0add978cbec4b9ea07b293a"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="lipscore_ratingsreviews.xml" hash="3e6353dfc81756e37494941ef6eb8bee"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Lipscore_RatingsReviews.xml" hash="9422ff014d7fcbd68274ffd97182de1d"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="lipscore.css" hash="550a3270e8fd600f032b4e3f39cfe431"/></dir><dir name="js"><file name="lipscore.js" hash="0ac6084e3d815ef75855fe2c2ebcae06"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><file name="lipscore.css" hash="334ed799b7c5dcdf6752cbbd0baf45c7"/><dir name="js"><file name="lipscore.js" hash="2e02504dc2065d9915b4717908d28f69"/></dir></dir></dir></dir></target></contents>
21
  <compatible/>
22
  <dependencies><required><php><min>5.2.13</min><max>6.0.0</max></php></required></dependencies>
23
  </package>