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.

Fix - filtering by the store in the back office doesn't work #52

KrzysztofPajaka3ffbc3acfc6
diff --git a/src/Web/Grand.Web.Admin/Services/ProductViewModelService.cs b/src/Web/Grand.Web.Admin/Services/ProductViewModelService.cs
index 2dd4f2d2f..54460f523 100644
--- a/src/Web/Grand.Web.Admin/Services/ProductViewModelService.cs
+++ b/src/Web/Grand.Web.Admin/Services/ProductViewModelService.cs
@@ -776,8 +776,10 @@ namespace Grand.Web.Admin.Services
{
model.SearchVendorId = _workContext.CurrentVendor.Id;
}
+
//limit for store manager
- model.SearchStoreId = _workContext.CurrentCustomer.StaffStoreId;
+ if(!string.IsNullOrEmpty(_workContext.CurrentCustomer.StaffStoreId))
+ model.SearchStoreId = _workContext.CurrentCustomer.StaffStoreId;
var categoryIds = new List<string>();
if (!string.IsNullOrEmpty(model.SearchCategoryId))