What is schema.org and what about my rich snippets?

What is schema.org and what about my rich snippets?

Schema.org has recently been announced by Google. It’s an innitiative by Google, Bing and Yahoo to create one microdata standard for structuring web content. Basically it’s the good old Google Rich Snippets, but followed by all three major search engines and it also brought a lot of new markup.

eCommerce related microdata markup

Schema.org brings several interesting opportunities to structure eCommerce data. Here are some that would be very useful in a Magento store:

Schema.org Product markup – example:

<div itemscope itemtype="http://schema.org/Product">
<span itemprop="name">Kenmore White 17" Microwave</span>
<img src="kenmore-microwave-17in.jpg" />
<div itemprop="aggregateRating"
itemscope itemprop="http://schema.org/AggregateRating">
Rated <span itemprop="ratingValue">3.5</span>/5
based on <span itemprop="reviewCount">11</span> customer reviews
</div>
 
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<span itemprop="price">$55.00</span>
<link itemprop="availability" href="http://schema.org/InStock" />In stock
</div>
 
Product description:
<span itemprop="description">0.7 cubic feet countertop microwave.
Has six preset cooking categories and convenience features like
Add-A-Minute and Child Lock.</span>
 
Customer reviews:
 
<div itemprop="reviews" itemscope itemtype="http://schema.org/Review">
<span itemprop="name">Not a happy camper</span> -
by <span itemprop="author">Ellie</span>,
<time itemprop="publishDate" datetime="2011-04-01">April 1, 2011</time>
<div itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating">
<meta itemprop="worstRating" content = "1">
<span itemprop="ratingValue">1</span>/
<span itemprop="bestRating">5</span>stars
</meta></div>
<span itemprop="description">The lamp burned out and now I have to replace it.
<div itemprop="reviews" itemscope itemtype="http://schema.org/Review">
<span itemprop="name">Value purchase</span> -
by <span itemprop="author">Lucas</span>,
<time itemprop="publishDate" datetime="2011-03-25">March 25, 2011</time>
<div itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating">
<meta itemprop="worstRating" content = "1"/>
<span itemprop="ratingValue">4</span>/
<span itemprop="bestRating">5</span>stars
</div>
<span itemprop="description">Great microwave for the price. It is
small and fits in my apartment.</span>
</div>
...
</span></div></div>

Schema.org Review markup – example:

<div itemscope itemtype="http://schema.org/Product">
<span itemprop="name">Kenmore White 17" Microwave</span>
<img src="kenmore-microwave-17in.jpg" />
<div itemprop="aggregateRating"
itemscope itemprop="http://schema.org/AggregateRating">
Rated <span itemprop="ratingValue">3.5</span>/5
based on <span itemprop="reviewCount">11</span> customer reviews
</div>
 
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<span itemprop="price">$55.00</span>
<link itemprop="availability" href="http://schema.org/InStock" />In stock
</div>
 
Product description:
<span itemprop="description">0.7 cubic feet countertop microwave.
Has six preset cooking categories and convenience features like
Add-A-Minute and Child Lock.</span>
 
Customer reviews:
 
<div itemprop="reviews" itemscope itemtype="http://schema.org/Review">
<span itemprop="name">Not a happy camper</span> -
by <span itemprop="author">Ellie</span>,
<time itemprop="publishDate" datetime="2011-04-01">April 1, 2011</time>
<div itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating">
<meta itemprop="worstRating" content = "1">
<span itemprop="ratingValue">1</span>/
<span itemprop="bestRating">5</span>stars
</div>
<span itemprop="description">The lamp burned out and now I have to replace it.
<div itemprop="reviews" itemscope itemtype="http://schema.org/Review">
<span itemprop="name">Value purchase</span> -
by <span itemprop="author">Lucas</span>,
<time itemprop="publishDate" datetime="2011-03-25">March 25, 2011</time>
<div itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating">
<meta itemprop="worstRating" content = "1"/>
<span itemprop="ratingValue">4</span>/
<span itemprop="bestRating">5</span>stars
</div>
<span itemprop="description">Great microwave for the price. It is
small and fits in my apartment.</span>
</div>
...
</div>

Schema.org Aggregate Rating markup – example:

<div itemscope itemtype="http://schema.org/Restaurant">
<span itemprop="name">GreatFood</span>
 
<div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
<span itemprop="ratingValue">4</span> stars -
based on <span itemprop="reviewCount">250</span> reviews
</div>
 
<div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
<span itemprop="streetAddress">1901 Lemur Ave</span>
<span itemprop="addressLocality">Sunnyvale</span>,
<span itemprop="addressRegion">CA</span> <span itemprop="postalCode">94086</span>
</div>
<span itemprop="telephone">(408) 714-1489</span>
<a itemprop="url" href="http://www.dishdash.com">www.greatfood.com</a>
 
Hours:
<time itemprop="openingHours" datetime="Mo-Sa 11:00-14:30">Mon-Sat 11am - 2:30pm</time>
<time itemprop="openingHours" datetime="Mo-Th 17:00-21:30">Mon-Thu 5pm - 9:30pm</time>
<time itemprop="openingHours" datetime="Fr-Sa 17:00-22:00">Fri-Sat 5pm - 10:00pm</time>
 
Categories:
<span itemprop="servesCuisine">
Middle Eastern
</span>,
<span itemprop="servesCuisine">
Mediterranean
</span>
 
Price Range: <span itemprop="priceRange">$$</span>
Takes Reservations: Yes
</div>

What if I already implemented Google Rich Snippets?

We have a tutorial on how to do that. For now, we’re sure Google will support the good old GRS format in the foreseeable future, but if you’re doing some major upgrade on your website or you’re starting out from the scratch, I’d switch to schema.org markup.

Related Inchoo Services

You made it all the way down here so you must have enjoyed this post! You may also like:

How To Connect Google Analytics 4 To Magento 2 Bojan Mareljic
Bojan Mareljic, | 36

How To Connect Google Analytics 4 To Magento 2

Build your 2017 Magento SEO strategy with these tips Ivona Namjesnik
Ivona Namjesnik, | 10

Build your 2017 Magento SEO strategy with these tips

Google manually punishes bloggers with paid product reviews Toni Anicic
Toni Anicic, | 4

Google manually punishes bloggers with paid product reviews

14 comments

  1. With the extension Rich Snippets you can add all these structured data either in microdata format (as in this tutorial) or in the new JSON-LD format, wich is recommended by Google. And you don’t need to edit any template. Just install the extension and enable the data you need.

  2. @ Matthijs one of the thing u could do is using Yotpo Reviews, it is compatible with Google out of the box.

  3. Okay, managed to get the “price” and “In Stock/Out of Stock” working in the Rich Snippets Testing Tool… But I still not have figured out how to get the Magento “ratings” displayed.

    I want to get the average rating of a product to show up in Google SERP. I have edited the file app/design/frontend/MYTHEME/default/template/review/helper/summary.phtml

    It now looks like this:

    <div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
    <?php if ($this->getReviewsCount()): ?>
        <div class="ratings">
            <?php if ($this->getRatingSummary()):?>
                <div class="rating-box">
                    <div class="rating" itemprop="ratingValue" style="width:<?php echo $this->getRatingSummary() ?>%"></div>
                </div>
            <?php endif;?>
            <p class="rating-links">
                <a href="#customer-reviews"><span itemprop="reviewCount"><?php echo $this->__('%d', $this->getReviewsCount()) ?></span><?php echo $this->__(' Review(s)') ?></a>
                <span class="separator">|</span>
                <a href="#review-form"><?php echo $this->__('Add Your Review') ?></a>
            </p>
        </div>
    <?php elseif ($this->getDisplayIfEmpty()): ?>
        <p class="no-rating"><a href="#review-form"><?php echo $this->__('Be the first to review this product') ?></a></p>
    <?php endif; ?>
    </div>

    The Rich Snippets Testing Tool is picking up on the Schema.org microdata itemprop=”ratingValue” and itemprop=”reviewCount”. It actually shows the correct number of reviews, but the rating field is empty (no stars).

    I think it has something to do with the way Magento presents the getRatingSummary. It’s a percentage and I believe Schema.org wants it to be presented like a number…

    Anyone got this rating issue to work for Magento?

    Please help!!

  4. Great stuff! love your work Toni!

    What doc type do you use once you implement schema.org snippets?

    I can’t get my store to validate now with w3c. itemprop and itemscope attributes.

  5. @Martijn Dijksterhuis

    The precursor, Google Rich Snippets was never included into Magento by default so I don’t think they’ll include scheme.org’s marcup soon either.

  6. After reading about the new Google scheme my first question was really: do I modify my theme files to support this, or is it better to wait for Magento to include this as part of the base code?

    Probably both, since Magento base support will be a while before it appears.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <blockquote cite=""> <code> <del datetime=""> <em> <s> <strike> <strong>. You may use following syntax for source code: <pre><code>$current = "Inchoo";</code></pre>.

Tell us about your project

Drop us a line. We'd love to know more about your project.