Skip to content

Commit a0da630

Browse files
Add ProductReviewOverview to ProductReviewsModel
1 parent 2a3eca0 commit a0da630

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/Web/Grand.Web/Controllers/ProductController.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,8 +569,14 @@ public virtual async Task<IActionResult> ProductReviews(string productId, Produc
569569
if (!productReview.IsApproved)
570570
model.AddProductReview.Result = _translationService.GetResource("Reviews.SeeAfterApproving");
571571
else
572+
{
572573
model.AddProductReview.Result = _translationService.GetResource("Reviews.SuccessfullyAdded");
573-
574+
model.ProductReviewOverviewModel = await _mediator.Send(new GetProductReviewOverview() {
575+
Product = product,
576+
Language = _workContext.WorkingLanguage,
577+
Store = _workContext.CurrentStore
578+
});
579+
}
574580
return View(model);
575581
}
576582

src/Web/Grand.Web/Models/Catalog/ProductReviewModel.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public ProductReviewsModel()
3030

3131
public IList<ProductReviewModel> Items { get; set; }
3232
public AddProductReviewModel AddProductReview { get; set; }
33+
public ProductReviewOverviewModel ProductReviewOverviewModel { get; set; }
3334
}
3435

3536
public partial class ProductReviewModel : BaseEntityModel

0 commit comments

Comments
 (0)