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 +1 -1
- app/code/local/Magpleasure/Richsnippets/Block/Catalog/Product/View/Markup.php +1 -1
- app/code/local/Magpleasure/Richsnippets/Helper/Data.php +1 -1
- app/code/local/Magpleasure/Richsnippets/Model/Observer.php +1 -1
- app/code/local/Magpleasure/Richsnippets/etc/config.xml +2 -2
- app/code/local/Magpleasure/Richsnippets/etc/system.xml +1 -1
- app/design/frontend/base/default/layout/richsnippets.xml +4 -2
- app/design/frontend/base/default/template/richsnippets/catalog/product/view/markup.phtml +63 -18
- app/etc/modules/Magpleasure_Richsnippets.xml +1 -1
- package.xml +8 -11
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"
|
|
|
|
|
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
|
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"
|
|
|
|
|
|
|
|
|
32 |
<?php if (Mage_Catalog_Model_Product_Type::TYPE_GROUPED == $_product->getTypeId()): ?>
|
33 |
-
<meta itemprop="price"
|
34 |
-
|
35 |
-
|
|
|
|
|
|
|
|
|
|
|
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 =
|
41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
<div style="display:none!important" itemscope itemprop="priceSpecification" itemtype="http://schema.org/PriceSpecification">
|
43 |
-
<meta
|
44 |
-
|
45 |
-
|
46 |
-
<meta
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
</div>
|
48 |
-
<?php elseif (
|
49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
<?php else: ?>
|
51 |
-
<meta
|
|
|
|
|
52 |
<?php endif; ?>
|
53 |
-
<meta
|
|
|
|
|
|
|
|
|
54 |
<?php endif; ?>
|
55 |
-
<meta itemprop="priceCurrency"
|
|
|
56 |
</div>
|
57 |
<?php if (!Mage::helper('core')->isModuleEnabled('Magpleasure_Ajaxreviews')): ?>
|
58 |
-
<div style="display: none!important"
|
|
|
|
|
|
|
|
|
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.
|
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
|
11 |
Without Rich Snippets, the AJAX Reviews extension will not display product rating in Google search results.</description>
|
12 |
-
<notes
|
13 |
-
|
14 |
-
+ Intuitive interface;
|
15 |
-
+ Easy 2-minutes installation;
|
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>
|
19 |
-
<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="
|
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.
|
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.
|
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>
|