SlideShare a Scribd company logo
hans2103 30 augustus 2013hans2103 30 augustus 2013
hans2103 30 augustus 2013
hans2103 30 augustus 2013
hans2103 30 augustus 2013
hans2103 30 augustus 2013
hans2103 30 augustus 2013
hans2103 30 augustus 2013
hans2103 30 augustus 2013
hans2103 30 augustus 2013
hans2103 30 augustus 2013
hans2103 30 augustus 2013
hans2103 30 augustus 2013
hans2103 30 augustus 2013
hans2103 30 augustus 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 augustus 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 augustus 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 augustus 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 augustus 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 augustus 2013
hopsakee... aan de slag!
hans2103 30 augustus 2013
hans2103 30 augustus 2013
hans2103 30 augustus 2013
hans2103 30 augustus 2013
hans2103 30 augustus 2013
add ?ath=1 to url
hans2103 30 augustus 2013
hans2103 30 augustus 2013
file to edit
hans2103 30 augustus 2013
• itemtype = http://schema.org/Product
• itemscope
add scope Product
hans2103 30 augustus 2013
hans2103 30 augustus 2013
open
template/catalog/product/view.phtml
find
replace with
save&close
<div class="product-view" itemscope
itemtype="http://schema.org/Product">
<div class="product-view">
hans2103 30 augustus 2013
• itemprop = name
• is part of itemtype = Product
name
hans2103 30 augustus 2013
<div class="product-name">
<h1><?php echo $_helper-
>productAttribute($_product, $_product-
>getName(), 'name') ?></h1>
</div>
open
template/catalog/product/view.phtml
find
replace with
save&close
<div class="product-name">
<h1 itemprop="name"><?php echo $_helper-
>productAttribute($_product, $_product-
>getName(), 'name') ?></h1>
</div>
hans2103 30 augustus 2013
• itemprop = description
• is part of itemtype = Product
description
hans2103 30 augustus 2013
<div class="std"><?php echo $_helper-
>productAttribute($_product, nl2br($_product-
>getShortDescription()),
'short_description') ?></div>
open
template/catalog/product/view.phtml
find
replace with
save&close
<div class="std" itemprop="description"><?php
echo $_helper->productAttribute($_product,
nl2br($_product->getShortDescription()),
'short_description') ?></div>
hans2103 30 augustus 2013
• itemprop = image
• is part of itemtype = Product
image
hans2103 30 augustus 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
replace with
save&close
hans2103 30 augustus 2013
• itemprop = url
• is part of itemtype = Product
url
hans2103 30 augustus 2013
open
template/catalog/product/view.phtml
find
replace with
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 augustus 2013
• itemtype = http://schema.org/Offer
• itemscope
add scope Offer
hans2103 30 augustus 2013
hans2103 30 augustus 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
replace with
save&close
<?php echo $this-
>getChildHtml('product_type_data') ?>
<?php echo $this->getTierPriceHtml() ?>
hans2103 30 augustus 2013
• itemprop = priceCurrency
• is part of itemtype = Offer
•
priceCurrency
<meta itemprop="priceCurrency"
content="<?php echo $currency_code
= Mage::app()->getStore()-
>getCurrentCurrencyCode(); ?>"/>
hans2103 30 augustus 2013
hans2103 30 augustus 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 augustus 2013
• itemprop = availability
• is part of itemtype = Offer
itemAvailability
hans2103 30 augustus 2013
hans2103 30 augustus 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
replace with
save&close
hans2103 30 augustus 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
replace with
save&close
hans2103 30 augustus 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 augustus 2013
hans2103 30 augustus 2013
hans2103 30 augustus 2013
hans2103 30 augustus 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 augustus 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 augustus 2013
open
template/catalog/product/view/type/default.phtml
find
replace with
save&close
<?php echo $this->getPriceHtml($_product,
false, '-aggregate') ?>
<?php echo $this->getPriceHtml($_product) ?>
hans2103 30 augustus 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 augustus 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 augustus 2013
hans2103 30 augustus 2013
<?php echo $this-
>getReviewsSummaryHtml($_product, false,
true)?>
open
template/catalog/product/view.phtml
find
replace with
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 augustus 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 augustus 2013
hans2103 30 augustus 2013
open
template/page/html/breadcrumb.phtml
find
replace with
save&leave_open
<li class="<?php echo $_crumbName ?>">
<li class="<?php echo $_crumbName ?>"
itemscope itemtype="http://data-
vocabulary.org/Breadcrumb">
hans2103 30 augustus 2013
still open
template/page/html/breadcrumb.phtml
find
replace with
save&leave_open
<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']) ?>"><?php
echo $this-
>htmlEscape($_crumbInfo['label']) ?></a>
hans2103 30 augustus 2013
hopsakee... testen!
hans2103 30 augustus 2013
hans2103 30 augustus 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

What's hot (20)

PDF
U.S. News | National News
unarmedhorse5807
 
PDF
Politics News and U.S. Elections Coverage
coldmiscellany992
 
PDF
Politics News and U.S. Elections Coverage
talloration5719
 
PDF
Material Design and Backwards Compatibility
Angelo Rüggeberg
 
PDF
Technology and Science News - ABC News
mae2savage7
 
PDF
Technology and Science News - ABC News
alertchair8725
 
PDF
Technology and Science News - ABC News
wonderfulshuttl70
 
PDF
Implement rich snippets in your webshop
Arjen Miedema
 
PDF
前端MVC 豆瓣说
Ting Lv
 
PDF
Perrée &amp; Partners, Collectief Pensioen
henk0610
 
PDF
International News | World News
joblessbeach6696
 
PDF
U.S. News | National News
rhetoricalmosai86
 
PDF
International News | World News
boringterminolo30
 
PDF
Is HTML5 Ready? (workshop)
Remy Sharp
 
PDF
Technology and Science News - ABC News
lethalsummary6309
 
PDF
U.S. News | National News
coldmiscellany992
 
PDF
International News | World News
greencontract5911
 
PDF
International News | World News
classysaga1549
 
PDF
Health News & Articles | Healthy Living
toothsomehardwa00
 
PDF
Politics News and U.S. Elections Coverage
unarmedhorse5807
 
U.S. News | National News
unarmedhorse5807
 
Politics News and U.S. Elections Coverage
coldmiscellany992
 
Politics News and U.S. Elections Coverage
talloration5719
 
Material Design and Backwards Compatibility
Angelo Rüggeberg
 
Technology and Science News - ABC News
mae2savage7
 
Technology and Science News - ABC News
alertchair8725
 
Technology and Science News - ABC News
wonderfulshuttl70
 
Implement rich snippets in your webshop
Arjen Miedema
 
前端MVC 豆瓣说
Ting Lv
 
Perrée &amp; Partners, Collectief Pensioen
henk0610
 
International News | World News
joblessbeach6696
 
U.S. News | National News
rhetoricalmosai86
 
International News | World News
boringterminolo30
 
Is HTML5 Ready? (workshop)
Remy Sharp
 
Technology and Science News - ABC News
lethalsummary6309
 
U.S. News | National News
coldmiscellany992
 
International News | World News
greencontract5911
 
International News | World News
classysaga1549
 
Health News & Articles | Healthy Living
toothsomehardwa00
 
Politics News and U.S. Elections Coverage
unarmedhorse5807
 

More from Hans Kuijpers (20)

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

Recently uploaded (20)

PPTX
How to Handle Salesperson Commision in Odoo 18 Sales
Celine George
 
PPTX
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
PPTX
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
PDF
Stokey: A Jewish Village by Rachel Kolsky
History of Stoke Newington
 
PDF
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
PPTX
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
PDF
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
PPT
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
PDF
The dynastic history of the Chahmana.pdf
PrachiSontakke5
 
PPTX
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
PPTX
Stereochemistry-Optical Isomerism in organic compoundsptx
Tarannum Nadaf-Mansuri
 
PDF
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
PDF
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
PPTX
How to Manage Large Scrollbar in Odoo 18 POS
Celine George
 
PPTX
How to Set Maximum Difference Odoo 18 POS
Celine George
 
PDF
Lesson 2 - WATER,pH, BUFFERS, AND ACID-BASE.pdf
marvinnbustamante1
 
PPTX
I AM MALALA The Girl Who Stood Up for Education and was Shot by the Taliban...
Beena E S
 
PPTX
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
PDF
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
PPTX
Neurodivergent Friendly Schools - Slides from training session
Pooky Knightsmith
 
How to Handle Salesperson Commision in Odoo 18 Sales
Celine George
 
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
Stokey: A Jewish Village by Rachel Kolsky
History of Stoke Newington
 
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
The dynastic history of the Chahmana.pdf
PrachiSontakke5
 
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
Stereochemistry-Optical Isomerism in organic compoundsptx
Tarannum Nadaf-Mansuri
 
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
How to Manage Large Scrollbar in Odoo 18 POS
Celine George
 
How to Set Maximum Difference Odoo 18 POS
Celine George
 
Lesson 2 - WATER,pH, BUFFERS, AND ACID-BASE.pdf
marvinnbustamante1
 
I AM MALALA The Girl Who Stood Up for Education and was Shot by the Taliban...
Beena E S
 
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
Neurodivergent Friendly Schools - Slides from training session
Pooky Knightsmith
 
Ad

Rich Snippets in Magento product page - #MUG020

  • 1. hans2103 30 augustus 2013hans2103 30 augustus 2013
  • 14. hans2103 30 augustus 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 augustus 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 augustus 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 augustus 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 augustus 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 augustus 2013 hopsakee... aan de slag!
  • 24. hans2103 30 augustus 2013 add ?ath=1 to url
  • 26. hans2103 30 augustus 2013 file to edit
  • 27. hans2103 30 augustus 2013 • itemtype = http://schema.org/Product • itemscope add scope Product
  • 29. hans2103 30 augustus 2013 open template/catalog/product/view.phtml find replace with save&close <div class="product-view" itemscope itemtype="http://schema.org/Product"> <div class="product-view">
  • 30. hans2103 30 augustus 2013 • itemprop = name • is part of itemtype = Product name
  • 31. hans2103 30 augustus 2013 <div class="product-name"> <h1><?php echo $_helper- >productAttribute($_product, $_product- >getName(), 'name') ?></h1> </div> open template/catalog/product/view.phtml find replace with save&close <div class="product-name"> <h1 itemprop="name"><?php echo $_helper- >productAttribute($_product, $_product- >getName(), 'name') ?></h1> </div>
  • 32. hans2103 30 augustus 2013 • itemprop = description • is part of itemtype = Product description
  • 33. hans2103 30 augustus 2013 <div class="std"><?php echo $_helper- >productAttribute($_product, nl2br($_product- >getShortDescription()), 'short_description') ?></div> open template/catalog/product/view.phtml find replace with save&close <div class="std" itemprop="description"><?php echo $_helper->productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?></div>
  • 34. hans2103 30 augustus 2013 • itemprop = image • is part of itemtype = Product image
  • 35. hans2103 30 augustus 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 replace with save&close
  • 36. hans2103 30 augustus 2013 • itemprop = url • is part of itemtype = Product url
  • 37. hans2103 30 augustus 2013 open template/catalog/product/view.phtml find replace with 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 augustus 2013 • itemtype = http://schema.org/Offer • itemscope add scope Offer
  • 40. hans2103 30 augustus 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 replace with save&close <?php echo $this- >getChildHtml('product_type_data') ?> <?php echo $this->getTierPriceHtml() ?>
  • 41. hans2103 30 augustus 2013 • itemprop = priceCurrency • is part of itemtype = Offer • priceCurrency <meta itemprop="priceCurrency" content="<?php echo $currency_code = Mage::app()->getStore()- >getCurrentCurrencyCode(); ?>"/>
  • 43. hans2103 30 augustus 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 augustus 2013 • itemprop = availability • is part of itemtype = Offer itemAvailability
  • 46. hans2103 30 augustus 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 replace with save&close
  • 47. hans2103 30 augustus 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 replace with save&close
  • 48. hans2103 30 augustus 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 augustus 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 augustus 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 augustus 2013 open template/catalog/product/view/type/default.phtml find replace with save&close <?php echo $this->getPriceHtml($_product, false, '-aggregate') ?> <?php echo $this->getPriceHtml($_product) ?>
  • 55. hans2103 30 augustus 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 augustus 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 augustus 2013 <?php echo $this- >getReviewsSummaryHtml($_product, false, true)?> open template/catalog/product/view.phtml find replace with 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 augustus 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 augustus 2013 open template/page/html/breadcrumb.phtml find replace with save&leave_open <li class="<?php echo $_crumbName ?>"> <li class="<?php echo $_crumbName ?>" itemscope itemtype="http://data- vocabulary.org/Breadcrumb">
  • 64. hans2103 30 augustus 2013 still open template/page/html/breadcrumb.phtml find replace with save&leave_open <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']) ?>"><?php echo $this- >htmlEscape($_crumbInfo['label']) ?></a>
  • 65. hans2103 30 augustus 2013 hopsakee... testen!
  • 67. hans2103 30 augustus 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