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

PDF
Hey, I just met AngularJS, and this is crazy, so here’s my JavaScript, let’s ...
PDF
Technology and Science News - ABC News
KEY
Sherlock Markup and Sammy Semantic - drupal theming forensic analysis
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 ...
Technology and Science News - ABC News
Sherlock Markup and Sammy Semantic - drupal theming forensic analysis
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
Material Design and Backwards Compatibility
PDF
Technology and Science News - ABC News
PDF
Technology and Science News - ABC News
PDF
Technology and Science News - ABC News
PDF
Implement rich snippets in your webshop
PDF
前端MVC 豆瓣说
PDF
Perrée &amp; Partners, Collectief Pensioen
PDF
International News | World News
PDF
U.S. News | National News
PDF
International News | World 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
PDF
Health News & Articles | Healthy Living
PDF
Politics News and U.S. Elections Coverage
U.S. News | National News
Politics News and U.S. Elections Coverage
Politics News and U.S. Elections Coverage
Material Design and Backwards Compatibility
Technology and Science News - ABC News
Technology and Science News - ABC News
Technology and Science News - ABC News
Implement rich snippets in your webshop
前端MVC 豆瓣说
Perrée &amp; Partners, Collectief Pensioen
International News | World News
U.S. News | National News
International News | World News
Is HTML5 Ready? (workshop)
Technology and Science News - ABC News
U.S. News | National News
International News | World News
International News | World News
Health News & Articles | Healthy Living
Politics News and U.S. Elections Coverage
Ad

Similar to Rich Snippets in Magento product page - #MUG020 (20)

PDF
Rich Snippets in Magento product page
PDF
Rich Snippets in Joomla - #JUG073
PDF
Caching strategies in rails 4
PDF
Caching strategies in Rails 4
PDF
Rapid HTML Prototyping with Bootstrap - Chris Griffith
PDF
Django Templates
PDF
Desbravando Web Components
PPTX
Get Structured, Get Sexy... Get Schema!
PDF
Practica n° 7
PDF
iWebkit
PDF
Angular js is the future. maybe. @ ConFoo 2014 in Montreal (CA)
PDF
Movable Type 5 : テーマの作成方法
PDF
Make More Money With Advanced Custom Fields - WordCampYYC 2015
KEY
jQuery プラグイン1 - イメージギャラリーを作成する
KEY
jQueryプラグイン フォトギャラリーを作成する - 芸大Webデザイン演習B
TXT
New social media
TXT
Copy of-a-walk-around-westfall-plaza
PDF
HTML5 Essentials
PPTX
Schema for Bloggers: Structured Content, Demystified
PPTX
NMX 2014 - Blogging - Schema for Bloggers: Structured Data, Demystified
Rich Snippets in Magento product page
Rich Snippets in Joomla - #JUG073
Caching strategies in rails 4
Caching strategies in Rails 4
Rapid HTML Prototyping with Bootstrap - Chris Griffith
Django Templates
Desbravando Web Components
Get Structured, Get Sexy... Get Schema!
Practica n° 7
iWebkit
Angular js is the future. maybe. @ ConFoo 2014 in Montreal (CA)
Movable Type 5 : テーマの作成方法
Make More Money With Advanced Custom Fields - WordCampYYC 2015
jQuery プラグイン1 - イメージギャラリーを作成する
jQueryプラグイン フォトギャラリーを作成する - 芸大Webデザイン演習B
New social media
Copy of-a-walk-around-westfall-plaza
HTML5 Essentials
Schema for Bloggers: Structured Content, Demystified
NMX 2014 - Blogging - Schema for Bloggers: Structured Data, Demystified
Ad

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
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
PDF
Meet magento 2011-templating
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
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
Meet magento 2011-templating

Recently uploaded (20)

PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPTX
Cell Types and Its function , kingdom of life
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
Cell Structure & Organelles in detailed.
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
RMMM.pdf make it easy to upload and study
PPTX
Institutional Correction lecture only . . .
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
01-Introduction-to-Information-Management.pdf
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PPTX
Final Presentation General Medicine 03-08-2024.pptx
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Cell Types and Its function , kingdom of life
PPH.pptx obstetrics and gynecology in nursing
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
2.FourierTransform-ShortQuestionswithAnswers.pdf
Cell Structure & Organelles in detailed.
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Module 4: Burden of Disease Tutorial Slides S2 2025
RMMM.pdf make it easy to upload and study
Institutional Correction lecture only . . .
TR - Agricultural Crops Production NC III.pdf
O5-L3 Freight Transport Ops (International) V1.pdf
Supply Chain Operations Speaking Notes -ICLT Program
VCE English Exam - Section C Student Revision Booklet
01-Introduction-to-Information-Management.pdf
Microbial diseases, their pathogenesis and prophylaxis
Final Presentation General Medicine 03-08-2024.pptx

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