markup <div> <h1>Avatar</h1> <span>Director: James Cameron (born August 16, 1954)</span> <span>Science fiction</span> <a href=”../movies/avatar-theatricaltrailer.html”>Trailer</a> </div>
hans2103
30 May 2013
Slide 15
itemscope <div itemscope> <h1>Avatar</h1> <span>Director: James Cameron (born August 16, 1954) </span> <span>Science fiction</span> <a href=”../movies/avatar-theatricaltrailer.html”>Trailer</a> </div>
hans2103
30 May 2013
Slide 16
itemtype <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-theatricaltrailer.html”>Trailer</a> </div>
hans2103
30 May 2013
Slide 17
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-theatricaltrailer.html” itemprop=”trailer”>Trailer</a> </div>
hans2103
30 May 2013
open template/catalog/product/view/type/default.phtml find <p class=”availability out-of-stock”><?php echo $this->__(‘Availability:’) ?> <span><? php echo $this->__(‘Out of stock’) ?></ span></p>
change by <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>
save&close
hans2103
30 May 2013
Slide 48
itemCondition • itemprop = ItemCondition • is part of itemtype = Offer • create new attribute first itemprop=”itemCondition” • <link href=”http://schema.org/ <echo_attribute>Condition” />
hans2103
30 May 2013
Slide 49
hans2103
30 May 2013
Slide 50
hans2103
30 May 2013
Slide 51
hans2103
30 May 2013
Slide 52
open template/catalog/product/view.phtml find <?php echo $this>getChildHtml(‘alert_urls’) ?> <div itemprop=”offers” itemscope itemtype=”http://schema.org/Offer”>
add after
price • itemprop = price • is part of itemtype = Offer • download https://gist.github.com/ hans2103/5635901
• Adding a itemprop to price in upsell is not wanted.
hans2103
30 May 2013
Slide 54
open template/catalog/product/view/type/default.phtml find
add scope AggregateRating • itemtype = http://schema.org/ AggregateRating
• itemscope • rating from Upsell is not wanted • install https://github.com/hans2103/
Hans2103_ReviewSummaryTemplates
hans2103
30 May 2013
Slide 56
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
open template/review/helper/summary_aggregate.phtml find
<div class=”ratings”> <?php if ($this->getRatingSummary()):?>
replace with
<div class=”ratings” itemprop=”aggregateRating” itemscope itemtype=”http://schema.org/AggregateRating”> <?php if ($this->getRatingSummary()):?>
save&leave_open
hans2103
30 augustus 2013
Slide 60
open template/review/helper/summary_aggregate.phtml find <?php if ($this->getRatingSummary()):?>
add after
add Breadcrumbs • 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.
hans2103
30 May 2013
Slide 62
hans2103
30 May 2013
Slide 63
open template/page/html/breadcrumb.phtml find <li class=”<?php echo $_crumbName ?>”>
change by <li class=”<?php echo $_crumbName ?>” itemscope itemtype=”http://datavocabulary.org/Breadcrumb”>
save&leave_open
hans2103
30 May 2013
Slide 64
still open template/page/html/breadcrumb.phtml find <a href=”<?php echo $_crumbInfo[‘link’] ?>” title=”<?php echo $this>htmlEscape($_crumbInfo[‘title’]) ?>” itemprop=”url”><?php echo $this>htmlEscape($_crumbInfo[‘label’]) ?></a>
change by
<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>
save&close hans2103
30 May 2013
Slide 65
hopsakee… testen!
hans2103
30 May 2013
Slide 66
hans2103
30 May 2013
Slide 67
nu jij! have fun
hans2103
30 May 2013
Slide 68
thank your for your time http://about.me/hans2103
hans2103
http://slideshare.net/hans2103
http://www.flickr.com/photos/trasimac/1217071176