rich_snippets - Version 1.1.1

Version Notes

* Worst rating isn't defined in markup.

Download this release

Release Info

Developer MagPleasure Ltd.
Extension rich_snippets
Version 1.1.1
Comparing to
See all releases


Code changes from version 1.1.0 to 1.1.1

app/code/local/Magpleasure/Richsnippets/Block/Catalog/Product/View.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @category Magpleasure
14
  * @package Magpleasure_Richsnippets
15
- * @copyright Copyright (c) 2014 Magpleasure Ltd. (http://www.magpleasure.com)
16
  * @license http://www.magpleasure.com/LICENSE.txt
17
  */
18
  class Magpleasure_Richsnippets_Block_Catalog_Product_View extends Mage_Catalog_Block_Product_View
12
  *
13
  * @category Magpleasure
14
  * @package Magpleasure_Richsnippets
15
+ * @copyright Copyright (c) 2014-2015 Magpleasure Ltd. (http://www.magpleasure.com)
16
  * @license http://www.magpleasure.com/LICENSE.txt
17
  */
18
  class Magpleasure_Richsnippets_Block_Catalog_Product_View extends Mage_Catalog_Block_Product_View
app/code/local/Magpleasure/Richsnippets/Block/Catalog/Product/View/Markup.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @category Magpleasure
14
  * @package Magpleasure_Richsnippets
15
- * @copyright Copyright (c) 2014 Magpleasure Ltd. (http://www.magpleasure.com)
16
  * @license http://www.magpleasure.com/LICENSE.txt
17
  */
18
  class Magpleasure_Richsnippets_Block_Catalog_Product_View_Markup extends Mage_Catalog_Block_Product_View
12
  *
13
  * @category Magpleasure
14
  * @package Magpleasure_Richsnippets
15
+ * @copyright Copyright (c) 2014-2015 Magpleasure Ltd. (http://www.magpleasure.com)
16
  * @license http://www.magpleasure.com/LICENSE.txt
17
  */
18
  class Magpleasure_Richsnippets_Block_Catalog_Product_View_Markup extends Mage_Catalog_Block_Product_View
app/code/local/Magpleasure/Richsnippets/Helper/Data.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @category Magpleasure
14
  * @package Magpleasure_Richsnippets
15
- * @copyright Copyright (c) 2014 Magpleasure Ltd. (http://www.magpleasure.com)
16
  * @license http://www.magpleasure.com/LICENSE.txt
17
  */
18
  class Magpleasure_Richsnippets_Helper_Data extends Mage_Core_Helper_Abstract
12
  *
13
  * @category Magpleasure
14
  * @package Magpleasure_Richsnippets
15
+ * @copyright Copyright (c) 2014-2015 Magpleasure Ltd. (http://www.magpleasure.com)
16
  * @license http://www.magpleasure.com/LICENSE.txt
17
  */
18
  class Magpleasure_Richsnippets_Helper_Data extends Mage_Core_Helper_Abstract
app/code/local/Magpleasure/Richsnippets/Model/Observer.php CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @category Magpleasure
14
  * @package Magpleasure_Richsnippets
15
- * @copyright Copyright (c) 2014 Magpleasure Ltd. (http://www.magpleasure.com)
16
  * @license http://www.magpleasure.com/LICENSE.txt
17
  */
18
  class Magpleasure_Richsnippets_Model_Observer extends Mage_Core_Block_Abstract
12
  *
13
  * @category Magpleasure
14
  * @package Magpleasure_Richsnippets
15
+ * @copyright Copyright (c) 2014-2015 Magpleasure Ltd. (http://www.magpleasure.com)
16
  * @license http://www.magpleasure.com/LICENSE.txt
17
  */
18
  class Magpleasure_Richsnippets_Model_Observer extends Mage_Core_Block_Abstract
app/code/local/Magpleasure/Richsnippets/etc/config.xml CHANGED
@@ -12,14 +12,14 @@
12
  *
13
  * @category Magpleasure
14
  * @package Magpleasure_Richsnippets
15
- * @copyright Copyright (c) 2014 Magpleasure Ltd. (http://www.magpleasure.com)
16
  * @license http://www.magpleasure.com/LICENSE.txt
17
  */
18
  -->
19
  <config>
20
  <modules>
21
  <Magpleasure_Richsnippets>
22
- <version>1.1</version>
23
  </Magpleasure_Richsnippets>
24
  </modules>
25
  <frontend>
12
  *
13
  * @category Magpleasure
14
  * @package Magpleasure_Richsnippets
15
+ * @copyright Copyright (c) 2014-2015 Magpleasure Ltd. (http://www.magpleasure.com)
16
  * @license http://www.magpleasure.com/LICENSE.txt
17
  */
18
  -->
19
  <config>
20
  <modules>
21
  <Magpleasure_Richsnippets>
22
+ <version>1.1.1</version>
23
  </Magpleasure_Richsnippets>
24
  </modules>
25
  <frontend>
app/code/local/Magpleasure/Richsnippets/etc/system.xml CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @category Magpleasure
14
  * @package Magpleasure_Richsnippets
15
- * @copyright Copyright (c) 2014 Magpleasure Ltd. (http://www.magpleasure.com)
16
  * @license http://www.magpleasure.com/LICENSE.txt
17
  */
18
  -->
12
  *
13
  * @category Magpleasure
14
  * @package Magpleasure_Richsnippets
15
+ * @copyright Copyright (c) 2014-2015 Magpleasure Ltd. (http://www.magpleasure.com)
16
  * @license http://www.magpleasure.com/LICENSE.txt
17
  */
18
  -->
app/design/frontend/base/default/layout/richsnippets.xml CHANGED
@@ -12,14 +12,16 @@
12
  *
13
  * @category Magpleasure
14
  * @package Magpleasure_Richsnippets
15
- * @copyright Copyright (c) 2014 Magpleasure Ltd. (http://www.magpleasure.com)
16
  * @license http://www.magpleasure.com/LICENSE.txt
17
  */
18
  -->
19
  <layout version="0.1.0">
20
  <catalog_product_view>
21
  <reference name="product.info">
22
- <block type="richsnippets/catalog_product_view_markup" template="richsnippets/catalog/product/view/markup.phtml" name="mp.richsnippets"/>
 
 
23
  </reference>
24
  </catalog_product_view>
25
  </layout>
12
  *
13
  * @category Magpleasure
14
  * @package Magpleasure_Richsnippets
15
+ * @copyright Copyright (c) 2014-2015 Magpleasure Ltd. (http://www.magpleasure.com)
16
  * @license http://www.magpleasure.com/LICENSE.txt
17
  */
18
  -->
19
  <layout version="0.1.0">
20
  <catalog_product_view>
21
  <reference name="product.info">
22
+ <block type="richsnippets/catalog_product_view_markup"
23
+ template="richsnippets/catalog/product/view/markup.phtml"
24
+ name="mp.richsnippets"/>
25
  </reference>
26
  </catalog_product_view>
27
  </layout>
app/design/frontend/base/default/template/richsnippets/catalog/product/view/markup.phtml CHANGED
@@ -11,7 +11,7 @@
11
  *
12
  * @category Magpleasure
13
  * @package Magpleasure_Richsnippets
14
- * @copyright Copyright (c) 2014 MagPleasure Ltd. (http://www.magpleasure.com)
15
  * @license http://www.magpleasure.com/LICENSE.txt
16
  */
17
 
@@ -21,43 +21,88 @@
21
  ?>
22
  <?php if ($this->_helper()->getConfigValue('general', 'enabled')): ?>
23
  <?php $_product = $this->getProduct() ?>
24
- <div style="display:none!important">
25
  <?php $_image = Mage::helper('catalog/image')->init($_product, 'small_image')->resize(125, 125); ?>
26
  <meta itemprop="image" content="<?php echo $_image; ?>">
27
  <meta itemprop="name" content="<?php echo $this->escapeHtml($_product->getName()); ?>">
28
  <meta itemprop="description" content="<?php echo $this->escapeHtml($_product->getDescription()); ?>">
29
  <meta itemprop="productID" content="<?php echo $_product->getSku(); ?>">
30
  </div>
31
- <div style="display:none!important" itemscope itemprop="offers" itemtype="http://schema.org/Offer">
 
 
 
 
32
  <?php if (Mage_Catalog_Model_Product_Type::TYPE_GROUPED == $_product->getTypeId()): ?>
33
- <meta itemprop="price" content="<?php echo $this->_helper()->getGroupedProductPrice($_product); ?>">
34
- <?php $_available = $_product->isAvailable() && count($_product->getTypeInstance()->getAssociatedProducts()) > 0; ?>
35
- <meta itemprop="availability" content="<?php echo $_available ? 'http://schema.org/InStock' : 'http://schema.org/OutOfStock'; ?>">
 
 
 
 
 
36
  <?php else: ?>
37
  <?php if (Mage_Catalog_Model_Product_Type::TYPE_BUNDLE == $_product->getTypeId()): ?>
38
  <?php $_priceModel = Mage::getModel('bundle/product_price'); ?>
39
  <?php $_configuredPrice = $this->_helper()->getConfiguredPrice($_product); ?>
40
- <?php $_minPrice = method_exists($_priceModel, 'getTotalPrices') ? $_priceModel->getTotalPrices($_product, 'min', 1) : $_priceModel->getPrices($_product, 'min'); ?>
41
- <meta itemprop="price" content="<?php echo round($_configuredPrice ? $_configuredPrice : $_minPrice, 2); ?>">
 
 
 
 
 
 
 
42
  <div style="display:none!important" itemscope itemprop="priceSpecification" itemtype="http://schema.org/PriceSpecification">
43
- <meta itemprop="priceCurrency" content="<?php echo Mage::app()->getStore()->getCurrentCurrencyCode(); ?>">
44
- <meta itemprop="minPrice" content="<?php echo round($_minPrice, 2); ?>">
45
- <?php $_maxPrice = method_exists($_priceModel, 'getTotalPrices') ? $_priceModel->getTotalPrices($_product, 'max', 1) : $_priceModel->getPrices($_product, 'max'); ?>
46
- <meta itemprop="maxPrice" content="<?php echo round($_maxPrice, 2); ?>">
 
 
 
 
 
 
 
 
 
 
 
47
  </div>
48
- <?php elseif (method_exists(new Mage(), 'getEdition') && Mage::EDITION_ENTERPRISE == Mage::getEdition() && Enterprise_GiftCard_Model_Catalog_Product_Type_Giftcard::TYPE_GIFTCARD == $_product->getTypeId()): ?>
49
- <meta itemprop="price" content="<?php echo round($_product->getPriceModel()->getMinAmount($_product), 2); ?>">
 
 
 
 
 
 
50
  <?php else: ?>
51
- <meta itemprop="price" content="<?php echo round($_product->getPriceModel()->getFinalPrice(null, $_product), 2); ?>">
 
 
52
  <?php endif; ?>
53
- <meta itemprop="availability" content="<?php echo $_product->isAvailable() ? 'http://schema.org/InStock' : 'http://schema.org/OutOfStock'; ?>">
 
 
 
 
54
  <?php endif; ?>
55
- <meta itemprop="priceCurrency" content="<?php echo Mage::app()->getStore()->getCurrentCurrencyCode(); ?>">
 
56
  </div>
57
  <?php if (!Mage::helper('core')->isModuleEnabled('Magpleasure_Ajaxreviews')): ?>
58
- <div style="display: none!important" itemscope itemprop="aggregateRating" itemtype="http://schema.org/AggregateRating">
 
 
 
 
59
  <meta itemprop="bestRating" content="5">
60
  <meta itemprop="ratingValue" content="<?php echo round($this->getAverageRating() * 5 / 100); ?>">
 
61
  <meta itemprop="reviewCount" content="<?php echo $this->getReviewsCount(); ?>">
62
  </div>
63
  <?php endif; ?>
11
  *
12
  * @category Magpleasure
13
  * @package Magpleasure_Richsnippets
14
+ * @copyright Copyright (c) 2014-2015 Magpleasure Ltd. (http://www.magpleasure.com)
15
  * @license http://www.magpleasure.com/LICENSE.txt
16
  */
17
 
21
  ?>
22
  <?php if ($this->_helper()->getConfigValue('general', 'enabled')): ?>
23
  <?php $_product = $this->getProduct() ?>
24
+ <div style="display:none !important">
25
  <?php $_image = Mage::helper('catalog/image')->init($_product, 'small_image')->resize(125, 125); ?>
26
  <meta itemprop="image" content="<?php echo $_image; ?>">
27
  <meta itemprop="name" content="<?php echo $this->escapeHtml($_product->getName()); ?>">
28
  <meta itemprop="description" content="<?php echo $this->escapeHtml($_product->getDescription()); ?>">
29
  <meta itemprop="productID" content="<?php echo $_product->getSku(); ?>">
30
  </div>
31
+ <div style="display:none !important"
32
+ itemscope
33
+ itemprop="offers"
34
+ itemtype="http://schema.org/Offer">
35
+
36
  <?php if (Mage_Catalog_Model_Product_Type::TYPE_GROUPED == $_product->getTypeId()): ?>
37
+ <meta itemprop="price"
38
+ content="<?php echo $this->_helper()->getGroupedProductPrice($_product); ?>">
39
+ <?php $_available =
40
+ $_product->isAvailable() &&
41
+ count($_product->getTypeInstance()->getAssociatedProducts()) > 0
42
+ ; ?>
43
+ <meta itemprop="availability"
44
+ content="<?php echo $_available ? 'http://schema.org/InStock' : 'http://schema.org/OutOfStock'; ?>">
45
  <?php else: ?>
46
  <?php if (Mage_Catalog_Model_Product_Type::TYPE_BUNDLE == $_product->getTypeId()): ?>
47
  <?php $_priceModel = Mage::getModel('bundle/product_price'); ?>
48
  <?php $_configuredPrice = $this->_helper()->getConfiguredPrice($_product); ?>
49
+ <?php $_minPrice =
50
+ method_exists($_priceModel, 'getTotalPrices') ?
51
+ $_priceModel->getTotalPrices($_product, 'min', 1) :
52
+ $_priceModel->getPrices($_product, 'min')
53
+ ; ?>
54
+ <meta
55
+ itemprop="price"
56
+ content="<?php echo round($_configuredPrice ? $_configuredPrice : $_minPrice, 2); ?>">
57
+
58
  <div style="display:none!important" itemscope itemprop="priceSpecification" itemtype="http://schema.org/PriceSpecification">
59
+ <meta
60
+ itemprop="priceCurrency"
61
+ content="<?php echo Mage::app()->getStore()->getCurrentCurrencyCode(); ?>">
62
+ <meta
63
+ itemprop="minPrice"
64
+ content="<?php echo round($_minPrice, 2); ?>">
65
+
66
+ <?php $_maxPrice =
67
+ method_exists($_priceModel, 'getTotalPrices') ?
68
+ $_priceModel->getTotalPrices($_product, 'max', 1) :
69
+ $_priceModel->getPrices($_product, 'max')
70
+ ; ?>
71
+ <meta
72
+ itemprop="maxPrice"
73
+ content="<?php echo round($_maxPrice, 2); ?>">
74
  </div>
75
+ <?php elseif (
76
+ method_exists(new Mage(), 'getEdition') &&
77
+ Mage::EDITION_ENTERPRISE == Mage::getEdition() &&
78
+ Enterprise_GiftCard_Model_Catalog_Product_Type_Giftcard::TYPE_GIFTCARD == $_product->getTypeId()
79
+ ): ?>
80
+ <meta
81
+ itemprop="price"
82
+ content="<?php echo round($_product->getPriceModel()->getMinAmount($_product), 2); ?>">
83
  <?php else: ?>
84
+ <meta
85
+ itemprop="price"
86
+ content="<?php echo round($_product->getPriceModel()->getFinalPrice(null, $_product), 2); ?>">
87
  <?php endif; ?>
88
+ <meta
89
+ itemprop="availability"
90
+ content="<?php echo $_product->isAvailable() ?
91
+ 'http://schema.org/InStock' :
92
+ 'http://schema.org/OutOfStock'; ?>">
93
  <?php endif; ?>
94
+ <meta itemprop="priceCurrency"
95
+ content="<?php echo Mage::app()->getStore()->getCurrentCurrencyCode(); ?>">
96
  </div>
97
  <?php if (!Mage::helper('core')->isModuleEnabled('Magpleasure_Ajaxreviews')): ?>
98
+ <div style="display: none !important"
99
+ itemscope
100
+ itemprop="aggregateRating"
101
+ itemtype="http://schema.org/AggregateRating">
102
+ <meta itemprop="worstRating" content="0">
103
  <meta itemprop="bestRating" content="5">
104
  <meta itemprop="ratingValue" content="<?php echo round($this->getAverageRating() * 5 / 100); ?>">
105
+ <meta itemprop="ratingCount" content="<?php echo $this->getReviewsCount(); ?>">
106
  <meta itemprop="reviewCount" content="<?php echo $this->getReviewsCount(); ?>">
107
  </div>
108
  <?php endif; ?>
app/etc/modules/Magpleasure_Richsnippets.xml CHANGED
@@ -12,7 +12,7 @@
12
  *
13
  * @category Magpleasure
14
  * @package Magpleasure_Richsnippets
15
- * @copyright Copyright (c) 2014 Magpleasure Ltd. (http://www.magpleasure.com)
16
  * @license http://www.magpleasure.com/LICENSE.txt
17
  */
18
  -->
12
  *
13
  * @category Magpleasure
14
  * @package Magpleasure_Richsnippets
15
+ * @copyright Copyright (c) 2014-2015 Magpleasure Ltd. (http://www.magpleasure.com)
16
  * @license http://www.magpleasure.com/LICENSE.txt
17
  */
18
  -->
package.xml CHANGED
@@ -1,23 +1,20 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>rich_snippets</name>
4
- <version>1.1.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/OSL-3.0">OSL-3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Rich Snippets will allow you to integrate the information about product price, description, availability, currency etc. into search results.</summary>
10
- <description>The extension is very easy-to use as there is only one option in the backend. You don&amp;#x2019;t need to do markups for Google by yourself: the extension will do it automatically.&amp;#xD;&#xD;
11
  Without Rich Snippets, the AJAX Reviews extension will not display product rating in Google search results.</description>
12
- <notes>+ Automatic markup creation;&#xD;
13
- + The extension displays in search results: product name, stock status, price, currency, product description, product ID, product rating;&#xD;
14
- + Intuitive interface;&#xD;
15
- + Easy 2-minutes installation;&#xD;
16
- + Meets Magento programming practices for most versions and customizations compatibility.</notes>
17
  <authors><author><name>MagPleasure Ltd.</name><user>Magpleasure</user><email>support@magpleasure.com</email></author></authors>
18
- <date>2014-11-17</date>
19
- <time>14:48:58</time>
20
- <contents><target name="magelocal"><dir name="Magpleasure"><dir name="Richsnippets"><dir><dir name="Block"><dir name="Catalog"><dir name="Product"><dir name="View"><file name="Markup.php" hash="dffe80ee890e6c1e034c3a8dd83bea7d"/></dir><file name="View.php" hash="fafc74633d2da2e9424c244a4e95fd82"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="a4e5ffdc508b14e3ac7943f9a3826324"/></dir><dir name="Model"><file name="Observer.php" hash="d3dcb140deadb77529a5cdf3e95da462"/></dir><dir name="etc"><file name="config.xml" hash="f7af120fb5ac50ec744fe40a48743e64"/><file name="system.xml" hash="14320c63de223ce8a877a7ef1d3938d2"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="richsnippets.xml" hash="d4d735d9d86674455c90069d0f805fb8"/></dir><dir name="template"><dir name="richsnippets"><dir><dir name="catalog"><dir name="product"><dir name="view"><file name="markup.phtml" hash="75b134588ebc6d15c8d2e4c7659b1607"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Magpleasure_Richsnippets.xml" hash="a4cc0de1ab3b0fb132a1e4a2c22c66be"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Magpleasure_Richsnippets.csv" hash="c356d86fd9d1db251c8df93d5fd27ebc"/></dir></target></contents>
21
  <compatible/>
22
- <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
23
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>rich_snippets</name>
4
+ <version>1.1.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/OSL-3.0">OSL-3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Rich Snippets will allow you to integrate the information about product price, description, availability, currency etc. into search results.</summary>
10
+ <description>The extension is very easy-to use as there is only one option in the backend. You don't need to do markups for Google by yourself: the extension will do it automatically.&#xD;
11
  Without Rich Snippets, the AJAX Reviews extension will not display product rating in Google search results.</description>
12
+ <notes>* Worst rating isn't defined in markup.&#xD;
13
+ </notes>
 
 
 
14
  <authors><author><name>MagPleasure Ltd.</name><user>Magpleasure</user><email>support@magpleasure.com</email></author></authors>
15
+ <date>2015-04-14</date>
16
+ <time>08:22:00</time>
17
+ <contents><target name="magelocal"><dir name="Magpleasure"><dir name="Richsnippets"><dir><dir name="Block"><dir name="Catalog"><dir name="Product"><dir name="View"><file name="Markup.php" hash="2b279af4b23074ec88c0ec2bbafd1b8d"/></dir><file name="View.php" hash="d06b18f25cb36eb63afa162fdf00ae95"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="d019b836cb3f8ee5e3a0b85ab1edc508"/></dir><dir name="Model"><file name="Observer.php" hash="d7dc1c56a095088374ef9db6235d7bcb"/></dir><dir name="etc"><file name="config.xml" hash="70eb5db433bb63887c2cf2d90df5b42b"/><file name="system.xml" hash="465494e974bf92706e64f25a4df99ec5"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="richsnippets.xml" hash="91d53350518069c549a10942b26ba627"/></dir><dir name="template"><dir name="richsnippets"><dir><dir name="catalog"><dir name="product"><dir name="view"><file name="markup.phtml" hash="d157f8898d73cfff270af06fc839fab5"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Magpleasure_Richsnippets.xml" hash="dc5195d4636c51fe9081c44f3a29bb39"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Magpleasure_Richsnippets.csv" hash="c356d86fd9d1db251c8df93d5fd27ebc"/></dir></target></contents>
18
  <compatible/>
19
+ <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php><package><name></name><channel>connect.magentocommerce.com/core</channel><min></min><max></max></package></required></dependencies>
20
  </package>