Skip to content

Instantly share code, notes, and snippets.

@tessguefen
Last active August 29, 2015 14:07
Show Gist options
  • Save tessguefen/7eeaf048339a681085d8 to your computer and use it in GitHub Desktop.
Save tessguefen/7eeaf048339a681085d8 to your computer and use it in GitHub Desktop.
Sebenza Reviews with Schema
<div id="review-average">
<mvt:if expr="g.Total_Reviews">
<div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
<meta itemprop="ratingValue" content="&mvt:productrating:rating;" />
Average Review for <strong>&mvt:product:name;</strong><br />
<span class="review-stars">&mvt:productrating:stars;</span> | <span itemprop="reviewCount">&mvt:global:Total_Reviews;</span> Reviews<br />
<a href="&mvt:global:sessionurl;Screen=WREVIEWS&Product_Code=&mvt:global:product_code;&Store_Code=&mvt:global:Store_Code;">Write an online review</a> and share your thoughts with others.<br />
</div>
<mvt:else>
&mvt:product:name; has not been rated yet. <a href="&mvt:global:sessionurl;Screen=WREVIEWS&Product_Code=&mvt:global:product_code;&Store_Code=&mvt:global:Store_Code;">Write an online review</a> and share your thoughts with others.<br />
</mvt:if>
</div>
<mvt:if expr="l.settings:productreviews">
<mvt:foreach iterator="reviews" array="productreviews">
<div class="product-review" itemprop="review" itemscope itemtype="http://schema.org/Review">
<span class="review-stars">&mvt:reviews:stars;</span> | <strong itemprop="name">&mvt:reviews:title;</strong><br />
Reviewed by <span itemprop="author">&mvt:reviews:name;</span> | <meta itemprop="datePublished" content="&mvt:reviews:year;-&mvt:reviews:month;-&mvt:reviews:day;" />&mvt:reviews:month;/&mvt:reviews:day;/&mvt:reviews:year;<br />
<div itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating">
<meta itemprop="worstRating" content="1" />
<meta itemprop="ratingValue" content="&mvt:reviews:rating;" />
<meta itemprop="bestRating" content="5" />
</div>
<p itemprop="description">&mvt:reviews:review;</p>
</div>
</mvt:foreach>
</mvt:if>
<mvt:if expr="g.ReviewCount GE g.ReviewPagination">
<p align="right"><a href="&mvt:global:sessionurl;Screen=REVIEWS&Product_Code=&mvt:global:product_code;&Store_Code=&mvt:global:Store_Code;">View all &mvt:global:Total_Reviews; reviews</a></p>
</mvt:if>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment