reviewscouk_reviews - Version 0.5.0

Version Notes

Rich Snippets Upgrade

Download this release

Release Info

Developer Reviews.co.uk
Extension reviewscouk_reviews
Version 0.5.0
Comparing to
See all releases


Code changes from version 0.4.2 to 0.5.0

app/design/frontend/base/default/template/reviews/product_reviews_widget.phtml CHANGED
@@ -3,24 +3,11 @@ $enabled = Mage::getStoreConfig('reviewscouk_reviews_settings/widget/product_wi
3
  $colour = Mage::getStoreConfig('reviewscouk_reviews_settings/widget/product_widget_colour', Mage::app()->getStore());
4
  $store_id = Mage::getStoreConfig('reviewscouk_reviews_settings/api/reviews_store_id', Mage::app()->getStore());
5
  $region = Mage::getStoreConfig('reviewscouk_reviews_settings/api/reviews_region', Mage::app()->getStore());
6
- $product = Mage::registry('current_product');
7
- $sku = $product->getSku();
8
- $type = $product->getTypeID();
9
 
10
- $productSkus = array($sku);
11
-
12
- if($type == 'configurable'){
13
- $usedProducts = $product->getTypeInstance() ->getUsedProducts();
14
- foreach($usedProducts as $usedProduct){
15
- $productSkus[] = $usedProduct->getSku();
16
- }
17
- }
18
-
19
- if($type == 'grouped'){
20
- $usedProducts = $product->getTypeInstance()->getAssociatedProducts();
21
- foreach($usedProducts as $usedProduct){
22
- $productSkus[] = $usedProduct->getSku();
23
- }
24
  }
25
 
26
  $api_url = 'widget.reviews.co.uk';
3
  $colour = Mage::getStoreConfig('reviewscouk_reviews_settings/widget/product_widget_colour', Mage::app()->getStore());
4
  $store_id = Mage::getStoreConfig('reviewscouk_reviews_settings/api/reviews_store_id', Mage::app()->getStore());
5
  $region = Mage::getStoreConfig('reviewscouk_reviews_settings/api/reviews_region', Mage::app()->getStore());
 
 
 
6
 
7
+ $productSkus = array();
8
+ if(Mage::registry('current_product'))
9
+ {
10
+ $productSkus = Mage::helper('reviewshelper')->getProductSkus(Mage::registry('current_product'));
 
 
 
 
 
 
 
 
 
 
11
  }
12
 
13
  $api_url = 'widget.reviews.co.uk';
app/design/frontend/base/default/template/reviews/rich_snippet.phtml CHANGED
@@ -1,23 +1,16 @@
1
  <?php
2
  $enabled = Mage::getStoreConfig('reviewscouk_reviews_settings/rich_snippet/rich_snippet_enabled', Mage::app()->getStore());
3
- $store_id = Mage::getStoreConfig('reviewscouk_reviews_settings/api/reviews_store_id', Mage::app()->getStore());
4
- $region = Mage::getStoreConfig('reviewscouk_reviews_settings/api/reviews_region', Mage::app()->getStore());
5
 
 
6
  if(Mage::registry('current_product'))
7
  {
8
- $sku = Mage::registry('current_product')->getSku();
9
  }
10
- else
11
- {
12
- $sku = '';
 
 
13
  }
14
  ?>
15
- <?php if($enabled) : ?>
16
- <script src="http://widget.reviews.co.uk/rich-snippet/dist.js"></script>
17
- <script>
18
- richSnippet({
19
- store: '<?php echo $store_id; ?>',
20
- sku: '<?php echo $sku ?>'
21
- });
22
- </script>
23
- <?php endif ?>
1
  <?php
2
  $enabled = Mage::getStoreConfig('reviewscouk_reviews_settings/rich_snippet/rich_snippet_enabled', Mage::app()->getStore());
 
 
3
 
4
+ $sku = '';
5
  if(Mage::registry('current_product'))
6
  {
7
+ $sku = Mage::helper('reviewshelper')->getProductSkus(Mage::registry('current_product'));
8
  }
9
+ ?>
10
+
11
+ <?php
12
+ if($enabled){
13
+ echo Mage::helper('reviewshelper')->getRichSnippet($sku);
14
  }
15
  ?>
16
+
 
 
 
 
 
 
 
 
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>reviewscouk_reviews</name>
4
- <version>0.4.2</version>
5
  <stability>stable</stability>
6
  <license>GPL</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Reviews.co.uk Integration Plugin</summary>
10
  <description>Reviews.co.uk Integration Plugin</description>
11
- <notes>Product Feed Bug Fix</notes>
12
  <authors><author><name>Reviews.co.uk</name><user>Reviews</user><email>support@reviews.co.uk</email></author></authors>
13
- <date>2015-12-07</date>
14
- <time>13:10:19</time>
15
- <contents><target name="magecommunity"><dir name="Reviewscouk"><dir name="Reviews"><dir name="Adminhtml"><dir name="Model"><dir name="System"><dir name="Config"><dir name="Source"><file name="Region.php" hash="65d7d2f061114099282e40a5353dc6a9"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="b799266bdb83494aaf103f5a308bd3ee"/></dir><dir name="Model"><file name="Observer.php" hash="6d03f143367bf29478a79e5fd3987e85"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="ReviewsController.php" hash="32986fa07e24b272d1ab6864d5ab7027"/></dir><file name="IndexController.php" hash="d6512ab7645eab3c191763ee217bfc61"/></dir><dir name="etc"><file name="adminhtml.xml" hash="c34c86777be121695f3a73726c51a64a"/><file name="config.xml" hash="4433c04293b6ee55f74e086c978aa71b"/><file name="system.xml" hash="5062c2b34061dacf47e14e467dd6a36b"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Reviewscouk_Reviews.xml" hash="347761ff6c475622697073d62f52e014"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="reviews"><file name="dashboard.phtml" hash="925eeb5ee6bee1c7bf973f60008c1f3f"/><file name="export.phtml" hash="ab1225207cd4631941735c9a99594b65"/></dir></dir><dir name="layout"><file name="reviews_admin.xml" hash="3cdd4facfeb240634d81843cae1a5325"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="reviews_layout.xml" hash="ade6f7c127b8bca792bbfd75540f4673"/></dir><dir name="template"><dir name="reviews"><file name="product_reviews_widget.phtml" hash="6c6dfecd7c43548b5f39e4f94548dac0"/><file name="rich_snippet.phtml" hash="2206c517987b97153cd903049ac31e4f"/><file name=".DS_Store" hash="4fe84b7db7aa067d7fd4b3ee082e4b2f"/></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.0.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>reviewscouk_reviews</name>
4
+ <version>0.5.0</version>
5
  <stability>stable</stability>
6
  <license>GPL</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Reviews.co.uk Integration Plugin</summary>
10
  <description>Reviews.co.uk Integration Plugin</description>
11
+ <notes>Rich Snippets Upgrade</notes>
12
  <authors><author><name>Reviews.co.uk</name><user>Reviews</user><email>support@reviews.co.uk</email></author></authors>
13
+ <date>2016-01-14</date>
14
+ <time>11:32:13</time>
15
+ <contents><target name="magecommunity"><dir name="Reviewscouk"><dir name="Reviews"><dir name="Adminhtml"><dir name="Model"><dir name="System"><dir name="Config"><dir name="Source"><file name="Region.php" hash="65d7d2f061114099282e40a5353dc6a9"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="51e852d3f4cfce17c04cde8a43f6f59a"/></dir><dir name="Model"><file name="Observer.php" hash="6d03f143367bf29478a79e5fd3987e85"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="ReviewsController.php" hash="32986fa07e24b272d1ab6864d5ab7027"/></dir><file name="IndexController.php" hash="d6512ab7645eab3c191763ee217bfc61"/></dir><dir name="etc"><file name="adminhtml.xml" hash="c34c86777be121695f3a73726c51a64a"/><file name="config.xml" hash="4433c04293b6ee55f74e086c978aa71b"/><file name="system.xml" hash="5062c2b34061dacf47e14e467dd6a36b"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Reviewscouk_Reviews.xml" hash="347761ff6c475622697073d62f52e014"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="reviews"><file name="dashboard.phtml" hash="925eeb5ee6bee1c7bf973f60008c1f3f"/><file name="export.phtml" hash="ab1225207cd4631941735c9a99594b65"/></dir></dir><dir name="layout"><file name="reviews_admin.xml" hash="3cdd4facfeb240634d81843cae1a5325"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="reviews_layout.xml" hash="ade6f7c127b8bca792bbfd75540f4673"/></dir><dir name="template"><dir name="reviews"><file name="product_reviews_widget.phtml" hash="07463b05d3542ea9b86bd48cb2765a7f"/><file name="rich_snippet.phtml" hash="a025c0fb68e737aae8bf0c09b55946a0"/><file name=".DS_Store" hash="4fe84b7db7aa067d7fd4b3ee082e4b2f"/></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.0.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>