Skip to content
This repository has been archived by the owner on Apr 10, 2019. It is now read-only.

Commit

Permalink
adding microdata from schema.org to product page, #138
Browse files Browse the repository at this point in the history
  • Loading branch information
giggio committed Oct 27, 2013
1 parent 0748bb8 commit ecd4b94
Showing 1 changed file with 21 additions and 9 deletions.
30 changes: 21 additions & 9 deletions public/javascripts/areas/store/views/templates/product.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,31 @@
<div id="productInfo">
<div id="product" data-id="{{product._id}}">
<img id="picture" src="{{product.picture}}" alt="{{product.name}}" />
<div id="product" data-id="{{product._id}}" itemscope itemtype="http://schema.org/Product">
<img id="picture" src="{{product.picture}}" alt="{{product.name}}" itemprop="image"/>
<div class="nameHolder">
<h2><span id="name">{{product.name}}</span>
<h2><span id="name" itemprop="name">{{product.name}}</span>
</h2>
</div>
<div id="description">{{{description}}}</div>
<h3>R$ <span id="price">{{product.price}}</span></h3>
<div id="description" itemprop="description">{{{description}}}</div>
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<h3>R$ <span id="price" itemprop="price">{{product.price}}</span></h3>
<meta itemprop="priceCurrency" content="BRL" />
{{#if product.hasInventory}}
{{#gt product.inventory 0}}
<link itemprop="availability" href="http://schema.org/InStock" />
{{else}}
<link itemprop="availability" href="http://schema.org/OutOfStock" />
{{/gt}}
{{else}}
<link itemprop="availability" href="http://schema.org/OutOfStock" />
{{/if}}
</div>
<button class="btn btn-primary btn-large" id="purchaseItem" name="purchaseItem" {{#unless canPurchase}}disabled{{/unless}}><i class="icon-shopping-cart icon-white"></i> Adicionar ao carrinho</button>
<div id="dimensions">
<div>Altura: <span id="height">{{product.height}}</span>cms</div>
<div>Largura: <span id="width">{{product.width}}</span>cms</div>
<div>Profundidade: <span id="depth">{{product.depth}}</span>cms</div>
<div>Altura: <span id="height" itemprop="height">{{product.height}}</span>cms</div>
<div>Largura: <span id="width" itemprop="width">{{product.width}}</span>cms</div>
<div>Profundidade: <span id="depth" itemprop="depth">{{product.depth}}</span>cms</div>
</div>
<div>Peso: <span id="weight">{{product.weight}}</span>kgs</div>
<div>Peso: <span id="weight" itemprop="weight">{{product.weight}}</span>kgs</div>
<div id="inventoryInfo">
{{#if product.hasInventory}}
<div>Estoque: <span id="inventory">{{product.inventory}} itens</span></div>
Expand Down

0 comments on commit ecd4b94

Please sign in to comment.