Version Notes
* Aggregate rating markup is added to products without any review
Download this release
Release Info
Developer | MagPleasure Ltd. |
Extension | rich_snippets |
Version | 1.2.1 |
Comparing to | |
See all releases |
Code changes from version 1.2.0 to 1.2.1
app/code/local/Magpleasure/Richsnippets/etc/config.xml
CHANGED
@@ -19,7 +19,7 @@
|
|
19 |
<config>
|
20 |
<modules>
|
21 |
<Magpleasure_Richsnippets>
|
22 |
-
<version>1.2</version>
|
23 |
</Magpleasure_Richsnippets>
|
24 |
</modules>
|
25 |
<frontend>
|
19 |
<config>
|
20 |
<modules>
|
21 |
<Magpleasure_Richsnippets>
|
22 |
+
<version>1.2.1</version>
|
23 |
</Magpleasure_Richsnippets>
|
24 |
</modules>
|
25 |
<frontend>
|
app/design/frontend/base/default/template/richsnippets/catalog/product/view/markup.phtml
CHANGED
@@ -70,24 +70,27 @@
|
|
70 |
<meta itemprop="priceCurrency"
|
71 |
content="<?php echo Mage::app()->getStore()->getCurrentCurrencyCode(); ?>">
|
72 |
</div>
|
73 |
-
|
74 |
-
|
75 |
-
<
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
<
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
<meta itemprop="
|
|
|
|
|
|
|
88 |
</div>
|
89 |
-
|
90 |
-
<?php
|
91 |
-
|
92 |
-
|
93 |
<?php endif; ?>
|
70 |
<meta itemprop="priceCurrency"
|
71 |
content="<?php echo Mage::app()->getStore()->getCurrentCurrencyCode(); ?>">
|
72 |
</div>
|
73 |
+
<?php $_reviews = $this->getReviews()->addRateVotes(); ?>
|
74 |
+
<?php if ($_reviews && count($_reviews)): ?>
|
75 |
+
<div style="display: none !important" itemscope itemprop="aggregateRating" itemtype="http://schema.org/AggregateRating">
|
76 |
+
<meta itemprop="ratingValue" content="<?php echo round($this->getAverageRating() * 5 / 100, 1); ?>">
|
77 |
+
<meta itemprop="ratingCount" content="<?php echo $this->getReviewsCount(); ?>">
|
78 |
+
</div>
|
79 |
+
<div style="display: none !important">
|
80 |
+
<?php foreach ($_reviews as $_review): ?>
|
81 |
+
<?php if ($_rating = $this->getReviewRating($_review)): ?>
|
82 |
+
<div itemscope itemprop="review" itemtype="http://schema.org/Review">
|
83 |
+
<meta itemprop="about" content="<?php echo $this->getProduct()->getName(); ?>">
|
84 |
+
<meta itemprop="description" content="<?php echo $this->escapeHtml($_review->getTitle()) ?>">
|
85 |
+
<meta itemprop="reviewBody" content="<?php echo $this->escapeHtml($_review->getDetail()); ?>">
|
86 |
+
<meta itemprop="author" content="<?php echo $this->escapeHtml($_review->getNickname()); ?>">
|
87 |
+
<meta itemprop="datePublished" content="<?php echo date('Y-m-d', strtotime($_review->getCreatedAt())) ?>">
|
88 |
+
<div style="display: none !important" itemscope itemprop="reviewRating" itemtype="http://schema.org/Rating">
|
89 |
+
<meta itemprop="ratingValue" content="<?php echo round($_rating * 5 / 100, 1); ?>">
|
90 |
+
</div>
|
91 |
</div>
|
92 |
+
<?php endif; ?>
|
93 |
+
<?php endforeach ?>
|
94 |
+
</div>
|
95 |
+
<?php endif; ?>
|
96 |
<?php endif; ?>
|
package.xml
CHANGED
@@ -1,20 +1,19 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>rich_snippets</name>
|
4 |
-
<version>1.2.
|
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>Display rich snippets in Google search results to expand product description and increase conversion rate.</summary>
|
10 |
<description>The extension is very easy-to use as there is only two options in the backend. You don't need to create markups for Google by yourself: the extension will make them and breadcrumbs automatically.</description>
|
11 |
-
<notes
|
12 |
-
+ Markup for aggregate product rating and each product review
|
13 |
</notes>
|
14 |
<authors><author><name>MagPleasure Ltd.</name><user>Magpleasure</user><email>support@magpleasure.com</email></author></authors>
|
15 |
-
<date>2015-07-
|
16 |
-
<time>14:
|
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="16e2d498ce537abd230637e24db387b0"/></dir><file name="View.php" hash="5499b89d294c9a7b9566360c6f9d4dae"/></dir></dir><dir name="Page"><dir name="Html"><file name="Breadcrumbs.php" hash="88c090195a08e64f5d2eb7bbb3684ca6"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="0d0393d3fda0d4454267f761cee97838"/></dir><dir name="Model"><file name="Observer.php" hash="9baaff9e362b178ae5d2d93bccc6e008"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Breadcrumbs.php" hash="06b1e35032442a98ace94449c20cd52e"/></dir></dir></dir></dir><dir name="etc"><file name="config.xml" hash="
|
18 |
<compatible/>
|
19 |
-
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php><package><name
|
20 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>rich_snippets</name>
|
4 |
+
<version>1.2.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>Display rich snippets in Google search results to expand product description and increase conversion rate.</summary>
|
10 |
<description>The extension is very easy-to use as there is only two options in the backend. You don't need to create markups for Google by yourself: the extension will make them and breadcrumbs automatically.</description>
|
11 |
+
<notes>* Aggregate rating markup is added to products without any review
|
|
|
12 |
</notes>
|
13 |
<authors><author><name>MagPleasure Ltd.</name><user>Magpleasure</user><email>support@magpleasure.com</email></author></authors>
|
14 |
+
<date>2015-07-06</date>
|
15 |
+
<time>14:54:29</time>
|
16 |
+
<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="16e2d498ce537abd230637e24db387b0"/></dir><file name="View.php" hash="5499b89d294c9a7b9566360c6f9d4dae"/></dir></dir><dir name="Page"><dir name="Html"><file name="Breadcrumbs.php" hash="88c090195a08e64f5d2eb7bbb3684ca6"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="0d0393d3fda0d4454267f761cee97838"/></dir><dir name="Model"><file name="Observer.php" hash="9baaff9e362b178ae5d2d93bccc6e008"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Breadcrumbs.php" hash="06b1e35032442a98ace94449c20cd52e"/></dir></dir></dir></dir><dir name="etc"><file name="config.xml" hash="cc7651bf53007b06da04fd7093c82d24"/><file name="system.xml" hash="c6a8f67bbc7bdda3c9620128eb768865"/></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="ecc7cee99e160a78343234c771aa236a"/></dir><dir name="template"><dir name="richsnippets"><dir><dir name="catalog"><dir name="product"><dir name="view"><file name="markup.phtml" hash="ac3faab67e8f931b7e7fbc3c5c38c54a"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Magpleasure_Richsnippets.xml" hash="78027bb5afff660ebcebe13df2391faa"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Magpleasure_Richsnippets.csv" hash="c9177f76dbd5825e4ce1f4050282cd9b"/></dir></target></contents>
|
17 |
<compatible/>
|
18 |
+
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php><package><name/><channel>connect.magentocommerce.com/core</channel><min/><max/></package></required></dependencies>
|
19 |
</package>
|