SlideShare a Scribd company logo
hans2103 30 May 201330 May 2013hans2103
hans2103 30 May 2013
hans2103 30 May 2013
hans2103 30 May 2013
hans2103 30 May 2013
hans2103 30 May 2013
hans2103 30 May 2013
hans2103 30 May 2013
hans2103 30 May 2013
hans2103 30 May 2013
hans2103 30 May 2013
hans2103 30 May 2013
hans2103 30 May 2013
hans2103 30 May 2013
markup
<div>
<h1>Avatar</h1>
<span>Director: James Cameron (born August
16, 1954)</span>
<span>Science fiction</span>
<a href="../movies/avatar-theatrical-
trailer.html">Trailer</a>
</div>
hans2103 30 May 2013
itemscope
<div itemscope>
<h1>Avatar</h1>
<span>Director: James Cameron (born August
16, 1954) </span>
<span>Science fiction</span>
<a href="../movies/avatar-theatrical-
trailer.html">Trailer</a>
</div>
hans2103 30 May 2013
<div itemscope itemtype="http://schema.org/
Movie">
<h1>Avatar</h1>
<span>Director: James Cameron (born August
16, 1954)</span>
<span>Science fiction</span>
<a href="../movies/avatar-theatrical-
trailer.html">Trailer</a>
</div>
itemtype
hans2103 30 May 2013
itemprop
<div itemscope itemtype ="http://schema.org/
Movie">
<h1 itemprop="name">Avatar</h1>
<span>Director: <span
itemprop="director">James Cameron</span>
(born August 16, 1954)</span>
<span itemprop="genre">Science fiction</
span>
<a href="../movies/avatar-theatrical-
trailer.html" itemprop="trailer">Trailer</a>
</div>
hans2103 30 May 2013
embedded items
<div itemscope itemtype ="http://schema.org/
Movie">
<h1 itemprop="name">Avatar</h1>
<div itemprop="director" itemscope
itemtype="http://schema.org/Person">
Director: <span itemprop="name">James
Cameron</span> (born <span
itemprop="birthDate">August 16, 1954)</span>
</div>
<span itemprop="genre">Science fiction</
span>
<a href="../movies/avatar-theatrical-
trailer.html" itemprop="trailer">Trailer</a>
hans2103 30 May 2013
hopsakee... aan de slag!
hans2103 30 May 2013
hans2103 30 May 2013
hans2103 30 May 2013
hans2103 30 May 2013
hans2103 30 May 2013
add ?ath=1 to url
hans2103 30 May 2013
hans2103 30 May 2013
file to edit
hans2103 30 May 2013
• itemtype = http://schema.org/Product
• itemscope
add scope Product
hans2103 30 May 2013
hans2103 30 May 2013
open
template/catalog/product/view.phtml
find
change by
save&close
<div class="product-view" itemscope
itemtype="http://schema.org/Product">
<div class="product-view">
hans2103 30 May 2013
• itemprop = name
• is part of itemtype = Product
name
hans2103 30 May 2013
<div class="product-name">
<h1><?php echo $_helper-
>productAttribute($_product, $_product-
>getName(), 'name') ?></h1>
</div>
open
template/catalog/product/view.phtml
find
change by
save&close
<div class="product-name">
<h1 itemprop="name"><?php echo $_helper-
>productAttribute($_product, $_product-
>getName(), 'name') ?></h1>
</div>
hans2103 30 May 2013
• itemprop = description
• is part of itemtype = Product
description
hans2103 30 May 2013
<div class="std"><?php echo $_helper-
>productAttribute($_product, nl2br($_product-
>getShortDescription()),
'short_description') ?></div>
open
template/catalog/product/view.phtml
find
change by
save&close
<div class="std" itemprop="description"><?php
echo $_helper->productAttribute($_product,
nl2br($_product->getShortDescription()),
'short_description') ?></div>
hans2103 30 May 2013
• itemprop = image
• is part of itemtype = Product
image
hans2103 30 May 2013
repeat
<?php
$_img = '<img id="image" itemprop="image"
src="'.$this->helper('catalog/image')-
>init($_product, 'image')
<?php
$_img = '<img id="image" src="'.$this-
>helper('catalog/image')->init($_product,
'image')
open
template/catalog/product/view/media.phtml
find
change by
save&close
hans2103 30 May 2013
• itemprop = url
• is part of itemtype = Product
url
hans2103 30 May 2013
open
template/catalog/product/view.phtml
find
change by
save&close
<div class="product-view" itemscope
itemtype="http://schema.org/Product">
<div class="product-view" itemscope
itemtype="http://schema.org/Product">
<meta itemprop="url" content="<?php echo
$_product->getProductUrl() ?>"/>
hans2103 30 May 2013
• itemtype = http://schema.org/Offer
• itemscope
add scope Offer
hans2103 30 May 2013
hans2103 30 May 2013
<div itemprop="offers" itemscope
itemtype="http://schema.org/Offer">
<?php echo $this-
>getChildHtml('product_type_data') ?>
<?php echo $this->getTierPriceHtml() ?>
</div>
open
template/catalog/product/view.phtml
find
change by
save&close
<?php echo $this-
>getChildHtml('product_type_data') ?>
<?php echo $this->getTierPriceHtml() ?>
hans2103 30 May 2013
• itemprop = priceCurrency
• is part of itemtype = Offer
•
priceCurrency
<meta itemprop="priceCurrency"
content="<?php echo $currency_code
= Mage::app()->getStore()-
>getCurrentCurrencyCode(); ?>"/>
hans2103 30 May 2013
hans2103 30 May 2013
<?php echo $this-
>getChildHtml('alert_urls') ?>
<div itemprop="offers" itemscope
itemtype="http://schema.org/Offer">
open
template/catalog/product/view.phtml
find
<meta itemprop="priceCurrency" content="<?php
echo $currency_code = Mage::app()-
>getStore()->getCurrentCurrencyCode(); ?>"/>
add after
save&close
hans2103 30 May 2013
• itemprop = availability
• is part of itemtype = Offer
itemAvailability
hans2103 30 May 2013
hans2103 30 May 2013
<p class="availability in-stock"><link
itemprop="availability" href="http://
schema.org/InStock"><?php echo $this-
>__('Availability:') ?> <span><?php echo
$this->__('In stock') ?></span></p>
<p class="availability in-stock"><?php echo
$this->__('Availability:') ?> <span><?php
echo $this->__('In stock') ?></span></p>
open
template/catalog/product/view/type/default.phtml
find
change by
save&close
hans2103 30 May 2013
<p class="availability out-of-stock"><link
itemprop="availability" href="http://
schema.org/OutOfStock"><?php echo $this-
>__('Availability:') ?> <span><?php echo
$this->__('Out of stock') ?></span></p>
<p class="availability out-of-stock"><?php
echo $this->__('Availability:') ?> <span><?
php echo $this->__('Out of stock') ?></
span></p>
template/catalog/product/view/type/default.phtml
open
find
change by
save&close
hans2103 30 May 2013
• itemprop = ItemCondition
• is part of itemtype = Offer
• create new attribute first
•
itemCondition
<link itemprop="itemCondition"
href="http://schema.org/
<echo_attribute>Condition" />
hans2103 30 May 2013
hans2103 30 May 2013
hans2103 30 May 2013
hans2103 30 May 2013
<?php echo $this-
>getChildHtml('alert_urls') ?>
<div itemprop="offers" itemscope
itemtype="http://schema.org/Offer">
open
template/catalog/product/view.phtml
find
<link itemprop="itemCondition"
href="http://schema.org/<?php echo $_product-
>getResource()-
>getAttribute('offeritemcondition')-
>getFrontend()->getValue($_product) ?
>Condition" />
add after
save&close
hans2103 30 May 2013
• itemprop = price
• is part of itemtype = Offer
• download https://gist.github.com/
hans2103/5635901
• Adding a itemprop to price in upsell is not
wanted.
price
hans2103 30 May 2013
open
template/catalog/product/view/type/default.phtml
find
add after
save&close
<?php echo $this->getPriceHtml($_product,
false, '-aggregate') ?>
<?php echo $this->getPriceHtml($_product) ?>
hans2103 30 May 2013
• itemtype = http://schema.org/
AggregateRating
• itemscope
• rating from Upsell is not wanted
• install https://github.com/hans2103/
Hans2103_ReviewSummaryTemplates
add scope AggregateRating
hans2103 30 May 2013
Hans2103_Review
SummaryTemplates
• Provides ability to add more review summary
templates.
• First written in blogpost by Fontis.com
• Later converted in a module by Arjen Miedema
• Now added to Github by Hans2103
hans2103 30 May 2013
hans2103 30 May 2013
<?php echo $this-
>getReviewsSummaryHtml($_product, false,
true)?>
open
template/catalog/product/view.phtml
find
change by
save&close
<?php echo $this-
>getReviewsSummaryHtml($_product,
'aggregate', true)?>
hans2103 30 augustus 2013
<div class="ratings"
itemprop="aggregateRating" itemscope
itemtype="http://schema.org/AggregateRating">
<?php if ($this->getRatingSummary()):?>
<div class="ratings">
<?php if ($this->getRatingSummary()):?>
open
template/review/helper/summary_aggregate.phtml
find
replace with
save&leave_open
hans2103 30 augustus 2013
<meta itemprop="ratingValue" content="<?php
echo $this->getRatingSummary(); ?>">
<meta itemprop="reviewCount" content="<?php
echo $this->getReviewsCount(); ?>">
<meta itemprop="bestRating" content="100">
<meta itemprop="worstRating" content="0">
<?php if ($this->getRatingSummary()):?>
open
template/review/helper/summary_aggregate.phtml
find
add after
save&close
hans2103 30 May 2013
• using other method
• http://data-vocabulary.org/Breadcrumb
• Schema.org can be used too, but the result
in Rich Snippets is not as good as this
method.
add Breadcrumbs
hans2103 30 May 2013
hans2103 30 May 2013
open
template/page/html/breadcrumb.phtml
find
change by
save&leave_open
<li class="<?php echo $_crumbName ?>">
<li class="<?php echo $_crumbName ?>"
itemscope itemtype="http://data-
vocabulary.org/Breadcrumb">
hans2103 30 May 2013
still open
template/page/html/breadcrumb.phtml
find
change by
save&close
<a href="<?php echo $_crumbInfo['link'] ?>"
title="<?php echo $this-
>htmlEscape($_crumbInfo['title']) ?>"
itemprop="url"><span itemprop="title"><?php
echo $this->htmlEscape($_crumbInfo['label']) ?
></span></a>
<a href="<?php echo $_crumbInfo['link'] ?>"
title="<?php echo $this-
>htmlEscape($_crumbInfo['title']) ?>"
itemprop="url"><?php echo $this-
>htmlEscape($_crumbInfo['label']) ?></a>
hans2103 30 May 2013
hopsakee... testen!
hans2103 30 May 2013
hans2103 30 May 2013
nu jij!
have fun
http://www.flickr.com/photos/trasimac/1217071176
thank your for your time
http://slideshare.net/hans2103
hans2103
http://about.me/hans2103

More Related Content

PDF
Hey, I just met AngularJS, and this is crazy, so here’s my JavaScript, let’s ...
KEY
Sherlock Markup and Sammy Semantic - drupal theming forensic analysis
PDF
Technology and Science News - ABC News
PDF
Technology and Science News - ABC News
PDF
The Settings API
PDF
International News | World News
PPT
Beginning iphone 4_devlopement_chpter7_tab_b
PDF
Technology and Science News - ABC News
Hey, I just met AngularJS, and this is crazy, so here’s my JavaScript, let’s ...
Sherlock Markup and Sammy Semantic - drupal theming forensic analysis
Technology and Science News - ABC News
Technology and Science News - ABC News
The Settings API
International News | World News
Beginning iphone 4_devlopement_chpter7_tab_b
Technology and Science News - ABC News

What's hot (20)

PDF
U.S. News | National News
PDF
Politics News and U.S. Elections Coverage
PDF
Politics News and U.S. Elections Coverage
PDF
Implement rich snippets in your webshop
PDF
Technology and Science News - ABC News
PDF
Technology and Science News - ABC News
PDF
Material Design and Backwards Compatibility
PDF
Perrée &amp; Partners, Collectief Pensioen
PDF
Technology and Science News - ABC News
PDF
前端MVC 豆瓣说
PDF
International News | World News
PDF
International News | World News
PDF
U.S. News | National News
PDF
Is HTML5 Ready? (workshop)
PDF
Technology and Science News - ABC News
PDF
U.S. News | National News
PDF
International News | World News
PDF
International News | World News
DOCX
Borrador del blog
PDF
Health News & Articles | Healthy Living
U.S. News | National News
Politics News and U.S. Elections Coverage
Politics News and U.S. Elections Coverage
Implement rich snippets in your webshop
Technology and Science News - ABC News
Technology and Science News - ABC News
Material Design and Backwards Compatibility
Perrée &amp; Partners, Collectief Pensioen
Technology and Science News - ABC News
前端MVC 豆瓣说
International News | World News
International News | World News
U.S. News | National News
Is HTML5 Ready? (workshop)
Technology and Science News - ABC News
U.S. News | National News
International News | World News
International News | World News
Borrador del blog
Health News & Articles | Healthy Living
Ad

Viewers also liked (16)

PDF
Google Rich Snippets: Magento Extension by Amasty
PDF
Magento SEO
PDF
SEO Toolkit: Magento Extension by Amasty. User Guide.
PDF
Corporate Portofolio
PPTX
How to Get Your First Child Theme Off The Ground
PPTX
Rich snippets - Sjoerd Jongmans
PDF
How can a data layer help my seo
PDF
Front End Development in Magento
PPTX
Microdata for Dummies
PPT
medicine.Age and aging lecture 1.(dr.aso)
PDF
How To Create Theme in Magento 2 - Part 1
PPTX
Mga suliraning pangkapaligiran at kalagayang ekolohikal ng asya
PPTX
Mga suliraning pangkapaligiran ng asya
PPTX
Geriatric anesthesia physiological changes and preoperative preparation
PDF
Caches et indexes : optimisez (vraiment) vos performances Magento
PDF
Design in Tech Report 2017
Google Rich Snippets: Magento Extension by Amasty
Magento SEO
SEO Toolkit: Magento Extension by Amasty. User Guide.
Corporate Portofolio
How to Get Your First Child Theme Off The Ground
Rich snippets - Sjoerd Jongmans
How can a data layer help my seo
Front End Development in Magento
Microdata for Dummies
medicine.Age and aging lecture 1.(dr.aso)
How To Create Theme in Magento 2 - Part 1
Mga suliraning pangkapaligiran at kalagayang ekolohikal ng asya
Mga suliraning pangkapaligiran ng asya
Geriatric anesthesia physiological changes and preoperative preparation
Caches et indexes : optimisez (vraiment) vos performances Magento
Design in Tech Report 2017
Ad

Similar to Rich Snippets in Magento product page (19)

PDF
Rich Snippets in Magento product page - #MUG020
PPTX
Schemas >> Schema.org >> Take Your Website to a New Level with Schema Markup
PDF
Adding a simple product in magento 2
PDF
Shop by Brand User Manual (Aitoc)
PPTX
Uso di Schema.org per il tuo sito web
PPTX
Smx Milano 2014 Semantic SEO with Schema.org
PDF
How to Add Products in Magento
PDF
Magento 2 Import Export Product Attributes Extension
PDF
Selling essentials_Cataloging
PPTX
How to implement Schemas using schema.org on your website >> SMX London 2015
DOCX
Magento ajax search autocomplete and suggest
PDF
Storefront product guide
PPTX
New SEO features in MAGENTO 2.0
PDF
Magento 2 Seminar - Arjen Miedema - Search Engine Optimisation
PDF
Magento 2 - Search Engine Optimisation
PPTX
APIs for catalogs
DOCX
Magento ajax search autocomplete and suggest mage.club
PDF
eCommerce Primer - Part 1
PPT
Magento jsr
Rich Snippets in Magento product page - #MUG020
Schemas >> Schema.org >> Take Your Website to a New Level with Schema Markup
Adding a simple product in magento 2
Shop by Brand User Manual (Aitoc)
Uso di Schema.org per il tuo sito web
Smx Milano 2014 Semantic SEO with Schema.org
How to Add Products in Magento
Magento 2 Import Export Product Attributes Extension
Selling essentials_Cataloging
How to implement Schemas using schema.org on your website >> SMX London 2015
Magento ajax search autocomplete and suggest
Storefront product guide
New SEO features in MAGENTO 2.0
Magento 2 Seminar - Arjen Miedema - Search Engine Optimisation
Magento 2 - Search Engine Optimisation
APIs for catalogs
Magento ajax search autocomplete and suggest mage.club
eCommerce Primer - Part 1
Magento jsr

More from Hans Kuijpers (20)

PDF
JD19NL - Joomla Template Overrides, Alternate Layouts en JLayouts
PDF
RSForm!pro jug073 maart 2019
PDF
Template overrides in joomla jug073 februari 2019
PDF
Joomla Website optimaliseren - jug073 augustus 2018
PDF
Joomla Custom Fields - the next level
PDF
Best Practice: Joomla! templating
PDF
JD17NL Joomla! Overrides and alternate layouts
PDF
Maak je website geschikt voor mobiel
PDF
Bootstrap 3 in Joomla!
PDF
Google Webmasters Tools
PDF
Google Tag Manager #jd14nl
PDF
Social Share Buttons - #jd14nl
PDF
Site Performance Optimization for Joomla #jwc13
PDF
Rich Snippets in Joomla - #JUG073
PDF
CSS with LESS for #jd13nl
PDF
Site Speed Optimisation for JWC2012
PDF
Form2content case for #JUG073
PDF
Magento Theme - set the basics right - mm12nl
PDF
Google analytics - jd12nl met Byte Internet
PDF
Joomla extensies kiezen-jd12nl
JD19NL - Joomla Template Overrides, Alternate Layouts en JLayouts
RSForm!pro jug073 maart 2019
Template overrides in joomla jug073 februari 2019
Joomla Website optimaliseren - jug073 augustus 2018
Joomla Custom Fields - the next level
Best Practice: Joomla! templating
JD17NL Joomla! Overrides and alternate layouts
Maak je website geschikt voor mobiel
Bootstrap 3 in Joomla!
Google Webmasters Tools
Google Tag Manager #jd14nl
Social Share Buttons - #jd14nl
Site Performance Optimization for Joomla #jwc13
Rich Snippets in Joomla - #JUG073
CSS with LESS for #jd13nl
Site Speed Optimisation for JWC2012
Form2content case for #JUG073
Magento Theme - set the basics right - mm12nl
Google analytics - jd12nl met Byte Internet
Joomla extensies kiezen-jd12nl

Recently uploaded (20)

PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Empathic Computing: Creating Shared Understanding
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
Big Data Technologies - Introduction.pptx
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
sap open course for s4hana steps from ECC to s4
PPT
Teaching material agriculture food technology
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Spectroscopy.pptx food analysis technology
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Encapsulation theory and applications.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
Dropbox Q2 2025 Financial Results & Investor Presentation
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Empathic Computing: Creating Shared Understanding
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
“AI and Expert System Decision Support & Business Intelligence Systems”
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Big Data Technologies - Introduction.pptx
The AUB Centre for AI in Media Proposal.docx
Encapsulation_ Review paper, used for researhc scholars
Programs and apps: productivity, graphics, security and other tools
NewMind AI Weekly Chronicles - August'25 Week I
The Rise and Fall of 3GPP – Time for a Sabbatical?
sap open course for s4hana steps from ECC to s4
Teaching material agriculture food technology
Unlocking AI with Model Context Protocol (MCP)
Spectroscopy.pptx food analysis technology
Mobile App Security Testing_ A Comprehensive Guide.pdf
Encapsulation theory and applications.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing

Rich Snippets in Magento product page

  • 1. hans2103 30 May 201330 May 2013hans2103
  • 14. hans2103 30 May 2013 markup <div> <h1>Avatar</h1> <span>Director: James Cameron (born August 16, 1954)</span> <span>Science fiction</span> <a href="../movies/avatar-theatrical- trailer.html">Trailer</a> </div>
  • 15. hans2103 30 May 2013 itemscope <div itemscope> <h1>Avatar</h1> <span>Director: James Cameron (born August 16, 1954) </span> <span>Science fiction</span> <a href="../movies/avatar-theatrical- trailer.html">Trailer</a> </div>
  • 16. hans2103 30 May 2013 <div itemscope itemtype="http://schema.org/ Movie"> <h1>Avatar</h1> <span>Director: James Cameron (born August 16, 1954)</span> <span>Science fiction</span> <a href="../movies/avatar-theatrical- trailer.html">Trailer</a> </div> itemtype
  • 17. hans2103 30 May 2013 itemprop <div itemscope itemtype ="http://schema.org/ Movie"> <h1 itemprop="name">Avatar</h1> <span>Director: <span itemprop="director">James Cameron</span> (born August 16, 1954)</span> <span itemprop="genre">Science fiction</ span> <a href="../movies/avatar-theatrical- trailer.html" itemprop="trailer">Trailer</a> </div>
  • 18. hans2103 30 May 2013 embedded items <div itemscope itemtype ="http://schema.org/ Movie"> <h1 itemprop="name">Avatar</h1> <div itemprop="director" itemscope itemtype="http://schema.org/Person"> Director: <span itemprop="name">James Cameron</span> (born <span itemprop="birthDate">August 16, 1954)</span> </div> <span itemprop="genre">Science fiction</ span> <a href="../movies/avatar-theatrical- trailer.html" itemprop="trailer">Trailer</a>
  • 19. hans2103 30 May 2013 hopsakee... aan de slag!
  • 24. hans2103 30 May 2013 add ?ath=1 to url
  • 26. hans2103 30 May 2013 file to edit
  • 27. hans2103 30 May 2013 • itemtype = http://schema.org/Product • itemscope add scope Product
  • 29. hans2103 30 May 2013 open template/catalog/product/view.phtml find change by save&close <div class="product-view" itemscope itemtype="http://schema.org/Product"> <div class="product-view">
  • 30. hans2103 30 May 2013 • itemprop = name • is part of itemtype = Product name
  • 31. hans2103 30 May 2013 <div class="product-name"> <h1><?php echo $_helper- >productAttribute($_product, $_product- >getName(), 'name') ?></h1> </div> open template/catalog/product/view.phtml find change by save&close <div class="product-name"> <h1 itemprop="name"><?php echo $_helper- >productAttribute($_product, $_product- >getName(), 'name') ?></h1> </div>
  • 32. hans2103 30 May 2013 • itemprop = description • is part of itemtype = Product description
  • 33. hans2103 30 May 2013 <div class="std"><?php echo $_helper- >productAttribute($_product, nl2br($_product- >getShortDescription()), 'short_description') ?></div> open template/catalog/product/view.phtml find change by save&close <div class="std" itemprop="description"><?php echo $_helper->productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?></div>
  • 34. hans2103 30 May 2013 • itemprop = image • is part of itemtype = Product image
  • 35. hans2103 30 May 2013 repeat <?php $_img = '<img id="image" itemprop="image" src="'.$this->helper('catalog/image')- >init($_product, 'image') <?php $_img = '<img id="image" src="'.$this- >helper('catalog/image')->init($_product, 'image') open template/catalog/product/view/media.phtml find change by save&close
  • 36. hans2103 30 May 2013 • itemprop = url • is part of itemtype = Product url
  • 37. hans2103 30 May 2013 open template/catalog/product/view.phtml find change by save&close <div class="product-view" itemscope itemtype="http://schema.org/Product"> <div class="product-view" itemscope itemtype="http://schema.org/Product"> <meta itemprop="url" content="<?php echo $_product->getProductUrl() ?>"/>
  • 38. hans2103 30 May 2013 • itemtype = http://schema.org/Offer • itemscope add scope Offer
  • 40. hans2103 30 May 2013 <div itemprop="offers" itemscope itemtype="http://schema.org/Offer"> <?php echo $this- >getChildHtml('product_type_data') ?> <?php echo $this->getTierPriceHtml() ?> </div> open template/catalog/product/view.phtml find change by save&close <?php echo $this- >getChildHtml('product_type_data') ?> <?php echo $this->getTierPriceHtml() ?>
  • 41. hans2103 30 May 2013 • itemprop = priceCurrency • is part of itemtype = Offer • priceCurrency <meta itemprop="priceCurrency" content="<?php echo $currency_code = Mage::app()->getStore()- >getCurrentCurrencyCode(); ?>"/>
  • 43. hans2103 30 May 2013 <?php echo $this- >getChildHtml('alert_urls') ?> <div itemprop="offers" itemscope itemtype="http://schema.org/Offer"> open template/catalog/product/view.phtml find <meta itemprop="priceCurrency" content="<?php echo $currency_code = Mage::app()- >getStore()->getCurrentCurrencyCode(); ?>"/> add after save&close
  • 44. hans2103 30 May 2013 • itemprop = availability • is part of itemtype = Offer itemAvailability
  • 46. hans2103 30 May 2013 <p class="availability in-stock"><link itemprop="availability" href="http:// schema.org/InStock"><?php echo $this- >__('Availability:') ?> <span><?php echo $this->__('In stock') ?></span></p> <p class="availability in-stock"><?php echo $this->__('Availability:') ?> <span><?php echo $this->__('In stock') ?></span></p> open template/catalog/product/view/type/default.phtml find change by save&close
  • 47. hans2103 30 May 2013 <p class="availability out-of-stock"><link itemprop="availability" href="http:// schema.org/OutOfStock"><?php echo $this- >__('Availability:') ?> <span><?php echo $this->__('Out of stock') ?></span></p> <p class="availability out-of-stock"><?php echo $this->__('Availability:') ?> <span><? php echo $this->__('Out of stock') ?></ span></p> template/catalog/product/view/type/default.phtml open find change by save&close
  • 48. hans2103 30 May 2013 • itemprop = ItemCondition • is part of itemtype = Offer • create new attribute first • itemCondition <link itemprop="itemCondition" href="http://schema.org/ <echo_attribute>Condition" />
  • 52. hans2103 30 May 2013 <?php echo $this- >getChildHtml('alert_urls') ?> <div itemprop="offers" itemscope itemtype="http://schema.org/Offer"> open template/catalog/product/view.phtml find <link itemprop="itemCondition" href="http://schema.org/<?php echo $_product- >getResource()- >getAttribute('offeritemcondition')- >getFrontend()->getValue($_product) ? >Condition" /> add after save&close
  • 53. hans2103 30 May 2013 • itemprop = price • is part of itemtype = Offer • download https://gist.github.com/ hans2103/5635901 • Adding a itemprop to price in upsell is not wanted. price
  • 54. hans2103 30 May 2013 open template/catalog/product/view/type/default.phtml find add after save&close <?php echo $this->getPriceHtml($_product, false, '-aggregate') ?> <?php echo $this->getPriceHtml($_product) ?>
  • 55. hans2103 30 May 2013 • itemtype = http://schema.org/ AggregateRating • itemscope • rating from Upsell is not wanted • install https://github.com/hans2103/ Hans2103_ReviewSummaryTemplates add scope AggregateRating
  • 56. hans2103 30 May 2013 Hans2103_Review SummaryTemplates • Provides ability to add more review summary templates. • First written in blogpost by Fontis.com • Later converted in a module by Arjen Miedema • Now added to Github by Hans2103
  • 58. hans2103 30 May 2013 <?php echo $this- >getReviewsSummaryHtml($_product, false, true)?> open template/catalog/product/view.phtml find change by save&close <?php echo $this- >getReviewsSummaryHtml($_product, 'aggregate', true)?>
  • 59. hans2103 30 augustus 2013 <div class="ratings" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"> <?php if ($this->getRatingSummary()):?> <div class="ratings"> <?php if ($this->getRatingSummary()):?> open template/review/helper/summary_aggregate.phtml find replace with save&leave_open
  • 60. hans2103 30 augustus 2013 <meta itemprop="ratingValue" content="<?php echo $this->getRatingSummary(); ?>"> <meta itemprop="reviewCount" content="<?php echo $this->getReviewsCount(); ?>"> <meta itemprop="bestRating" content="100"> <meta itemprop="worstRating" content="0"> <?php if ($this->getRatingSummary()):?> open template/review/helper/summary_aggregate.phtml find add after save&close
  • 61. hans2103 30 May 2013 • using other method • http://data-vocabulary.org/Breadcrumb • Schema.org can be used too, but the result in Rich Snippets is not as good as this method. add Breadcrumbs
  • 63. hans2103 30 May 2013 open template/page/html/breadcrumb.phtml find change by save&leave_open <li class="<?php echo $_crumbName ?>"> <li class="<?php echo $_crumbName ?>" itemscope itemtype="http://data- vocabulary.org/Breadcrumb">
  • 64. hans2103 30 May 2013 still open template/page/html/breadcrumb.phtml find change by save&close <a href="<?php echo $_crumbInfo['link'] ?>" title="<?php echo $this- >htmlEscape($_crumbInfo['title']) ?>" itemprop="url"><span itemprop="title"><?php echo $this->htmlEscape($_crumbInfo['label']) ? ></span></a> <a href="<?php echo $_crumbInfo['link'] ?>" title="<?php echo $this- >htmlEscape($_crumbInfo['title']) ?>" itemprop="url"><?php echo $this- >htmlEscape($_crumbInfo['label']) ?></a>
  • 65. hans2103 30 May 2013 hopsakee... testen!
  • 67. hans2103 30 May 2013 nu jij! have fun
  • 68. http://www.flickr.com/photos/trasimac/1217071176 thank your for your time http://slideshare.net/hans2103 hans2103 http://about.me/hans2103