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

Featured Image

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.

10
Top

Care to rate this post?

Author

Toni Anicic

E-commerce Consultant

SEO. Professional gaming. Home-brewed beer. Billiard.

Other posts from this author

Discussion 10 Comments

Add Comment
  1. 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.

  2. Toni Anicic

    @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.

  3. good since Magento base support will be a while before it appears.

  4. Is there a way to include my company’s Google Reviews?

  5. WOW! Very nice examples. Thank you guys :-)

  6. Rob

    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.

  7. Matthijs

    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!!

  8. Exact same problem here. Did you ever find a solution for this Matthijs?

  9. i didnt use snippet, but now i am excited about it.
    thank

  10. Luiz Santos

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

Add Your Comment

Please wrap all source codes with [code][/code] tags.
Top
  • More Traffic? More Sales? We can help!

    More Traffic? More Sales? We can help!

    We analyze your store and research the best marketing approach to increase traffic and achieve your goals.

    Learn more Get a quote
  • Hire Magento Developers

    Magento Certified Developers

    Teams of certified Magento developers are available to work on your next big thing!

    Hire Magento Developers Get a quote
  • Our Latest Project

    Wholesale Boutique

    Wholesale Boutique

    Wholesale Boutique supplies their customers with the best embroidery blanks perfect for personalisation.

    See our work
  • The Inchooers

    Meet The Inchooers, the funny bunch of magento developers.

    Archive