Webiant Logo Webiant Logo
  1. No results found.

    Try your search with a different keyword or use * as a wildcard.

_ProductReviews.cshtml

@model ProductReviewsModel

@inject Nop.Services.Html.IHtmlFormatter htmlFormatter

@await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.ProductReviewsPageTop, additionalData = Model }) @if (Model.Items.Count > 0) {
@T("Reviews.ExistingReviews")
@foreach (var review in Model.Items) { var ratingPercent = review.Rating * 20;
@review.Title
@review.Rating
@if (!string.IsNullOrEmpty(review.CustomerAvatarUrl)) {
@if (review.AllowViewingProfiles) { Avatar } else { Avatar }
}
@Html.Raw(htmlFormatter.FormatText(review.ReviewText, false, true, false, false, false, false))
@foreach (var reviewType in review.AdditionalProductReviewList.Where(x => x.Rating > 0 && x.VisibleToAllCustomers)) { var ratingExtPercent = reviewType.Rating * 20;
@reviewType.Name
@reviewType.Rating
}
@if (review.AllowViewingProfiles) { @(review.CustomerName) } else { @review.CustomerName } | @review.WrittenOnStr
@await Html.PartialAsync("_ProductReviewHelpfulness", review.Helpfulness) @await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.ProductReviewsPageInsideReview, additionalData = review }) @if (!string.IsNullOrEmpty(review.ReplyText)) {
@T("Reviews.Reply")
@Html.Raw(htmlFormatter.FormatText(review.ReplyText, false, true, false, false, false, false))
}
}
} @if (!Model.AddProductReview.CanCurrentCustomerLeaveReview) {
@T("Reviews.OnlyRegisteredUsersCanWriteReviews")
} else if (!Model.AddProductReview.CanAddNewReview) {
@T("Reviews.AlreadyAddedProductReviews")
} else {
@T("Reviews.Write")
@T("Reviews.Fields.Rating.Bad")
@T("Reviews.Fields.Rating.Excellent")
@if (Model.ReviewTypeList.Count > 0) { foreach (var additionalReview in Model.AddAdditionalProductReviewList.OrderBy(ob => ob.DisplayOrder).ToList()) { var curAdditionalReview = Model.AddAdditionalProductReviewList.IndexOf(additionalReview);
@Html.Raw(additionalReview.Description)
@T("Reviews.Fields.Rating.Bad")
@T("Reviews.Fields.Rating.Excellent")
} } @if (Model.AddProductReview.DisplayCaptcha) { }
} @await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.ProductReviewsPageBottom, additionalData = Model })