Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.
C# aspnet-corecsharpdockerdotnetecommerceecommerce-platformmongodbmulti-storemulti-vendornosqlonline-shopshoppingcart
Add ProductReviewOverview to ProductReviewsModel
KrzysztofPajaka0da6309c74e
diff --git a/src/Web/Grand.Web/Controllers/ProductController.cs b/src/Web/Grand.Web/Controllers/ProductController.csindex dbd9e75b4..0f48f4eb3 100644--- a/src/Web/Grand.Web/Controllers/ProductController.cs+++ b/src/Web/Grand.Web/Controllers/ProductController.cs@@ -569,8 +569,14 @@ namespace Grand.Web.Controllersif (!productReview.IsApproved)model.AddProductReview.Result = _translationService.GetResource("Reviews.SeeAfterApproving");else+ {model.AddProductReview.Result = _translationService.GetResource("Reviews.SuccessfullyAdded");-+ model.ProductReviewOverviewModel = await _mediator.Send(new GetProductReviewOverview() {+ Product = product,+ Language = _workContext.WorkingLanguage,+ Store = _workContext.CurrentStore+ });+ }return View(model);}diff --git a/src/Web/Grand.Web/Models/Catalog/ProductReviewModel.cs b/src/Web/Grand.Web/Models/Catalog/ProductReviewModel.csindex 177398c2a..88f4e641f 100644--- a/src/Web/Grand.Web/Models/Catalog/ProductReviewModel.cs+++ b/src/Web/Grand.Web/Models/Catalog/ProductReviewModel.cs@@ -30,6 +30,7 @@ namespace Grand.Web.Models.Catalogpublic IList<ProductReviewModel> Items { get; set; }public AddProductReviewModel AddProductReview { get; set; }+ public ProductReviewOverviewModel ProductReviewOverviewModel { get; set; }}public partial class ProductReviewModel : BaseEntityModel