Skip to content

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.

Allow to filtering by rating on search page

supportf34df6077a6c
diff --git a/src/Web/Grand.Web/Features/Handlers/Catalog/GetSearchHandler.cs b/src/Web/Grand.Web/Features/Handlers/Catalog/GetSearchHandler.cs
index 999260c9f..1340f6308 100644
--- a/src/Web/Grand.Web/Features/Handlers/Catalog/GetSearchHandler.cs
+++ b/src/Web/Grand.Web/Features/Handlers/Catalog/GetSearchHandler.cs
@@ -237,6 +237,7 @@ namespace Grand.Web.Features.Handlers.Catalog
FilteredSpecs = alreadyFilteredSpecOptionIds,
LanguageId = request.Language.Id,
OrderBy = (ProductSortingEnum)request.Command.OrderBy,
+ Rating = request.Command.Rating,
PageIndex = request.Command.PageNumber - 1,
PageSize = request.Command.PageSize,
VendorId = vendorId
diff --git a/src/Web/Grand.Web/Views/Catalog/Search.cshtml b/src/Web/Grand.Web/Views/Catalog/Search.cshtml
index ce36b0800..6b9581998 100644
--- a/src/Web/Grand.Web/Views/Catalog/Search.cshtml
+++ b/src/Web/Grand.Web/Views/Catalog/Search.cshtml
@@ -153,9 +153,6 @@
@section filters
{
@*Rendering filtering section*@
- @if (Model.PagingFilteringContext.SpecificationFilter.Enabled)
- {
- <partial name="Partials/Filtering" model="Model.PagingFilteringContext.SpecificationFilter" />
- }
+ <partial name="Partials/Filtering" model="Model.PagingFilteringContext.SpecificationFilter" />
}
<partial name="Partials/ModelScript" model="@Json.Serialize(Model)" />
\ No newline at end of file