New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add "http://schema.org/Review" for comment product #1582
Milestone
Comments
Product.Reviews.cshtml <div class="review-list text-body" id="review-list">
@for (var i = 0; i < Model.Items.Count; i++)
{
var review = Model.Items[i];
int ratingPercent = review.Rating * 20;
var helpfulness = review.Helpfulness;
<div class="review-item" id="review-item-@(i + 1)" itemprop="review" itemscope itemtype="http://schema.org/Review">
<div class="review-title">
<div class="rating" itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating">
@* Hidden microdata info *@
@{decimal ratingValue = ratingPercent / (decimal)20;}
<div itemprop="ratingValue" content='@ratingValue.ToString("0.0", new CultureInfo("en-US"))' style="width: @(ratingPercent)%"></div>
</div>
<h4 itemprop="name">@review.Title</h4>
</div>
<div class="review-meta">
<span itemprop="author" itemscope itemtype="http://schema.org/Person" class="review-meta-label pr-1">@T("Reviews.From"):</span>
@if (review.AllowViewingProfiles)
{
<a class="review-meta-value" itemprop="name" href="@Url.RouteUrl("CustomerProfile", new { id = review.CustomerId })" rel="nofollow" dir="auto">@(review.CustomerName)</a>
}
else
{
<span class="review-meta-value" itemprop="name">@review.CustomerName</span>
}
<span class="review-meta-label pr-1">@T("Common.Date"):</span>
<span class="review-meta-value" itemprop="datePublished" content="@review.WrittenOnStr">@review.WrittenOnStr</span>
</div>
<p class="review-text" dir="auto" itemprop="reviewBody">
@Html.Raw(SmartStore.Core.Html.HtmlUtils.FormatText(review.ReviewText, false, true, false, false, false, false))
</p>
<div class="review-vote d-flex" data-review-id="@(helpfulness.ProductReviewId)" data-href='@(Url.Action("SetReviewHelpfulness"))'>
<span class="review-vote-label pr-2">@T("Reviews.Helpfulness.WasHelpful?")</span>
<a class="review-vote-link review-vote-link-yes mr-1" href="#" title="@T("Common.Yes")" data-toggle="tooltip" rel="nofollow">
<i class="fa fa-thumbs-up"></i>
<span class="review-vote-count" data-bind-to="TotalYes"><strong style="font-size:12px">@(helpfulness.HelpfulYesTotal)</strong></span>
</a>
<a class="review-vote-link review-vote-link-no mr-1" href="#" title="@T("Common.No")" data-toggle="tooltip" rel="nofollow">
<i class="fa fa-thumbs-down"></i>
<span class="review-vote-count" data-bind-to="TotalNo"><strong style="font-size:12px">@(helpfulness.HelpfulNoTotal)</strong></span>
</a>
</div>
@{ Html.RenderWidget("productreviews_page_inside_review"); }
</div>
}
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: