From 7a5b2a19560776bb3b0dce6659e7d9e8f8e0fbbc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Mar 2026 09:58:10 +0000 Subject: [PATCH 1/3] Initial plan From 8f6cc2d7f7d345dc63bc5993ba7880d38dfa7a0d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Mar 2026 10:01:54 +0000 Subject: [PATCH 2/3] Fix store filtering in add product popup not working for admin users Co-authored-by: KrzysztofPajak <16772986+KrzysztofPajak@users.noreply.github.com> --- .../Grand.Web.AdminShared/Services/BlogViewModelService.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Web/Grand.Web.AdminShared/Services/BlogViewModelService.cs b/src/Web/Grand.Web.AdminShared/Services/BlogViewModelService.cs index e59b6644d..aefa56d9c 100644 --- a/src/Web/Grand.Web.AdminShared/Services/BlogViewModelService.cs +++ b/src/Web/Grand.Web.AdminShared/Services/BlogViewModelService.cs @@ -209,7 +209,9 @@ public virtual async Task UpdateBlogPostModel(BlogPostModel model, Blo public virtual async Task<(IList products, int totalCount)> PrepareProductModel( BlogProductModel.AddProductModel model, int pageIndex, int pageSize) { - model.SearchStoreId = _contextAccessor.WorkContext.CurrentCustomer.StaffStoreId; + //limit for store manager + if (!string.IsNullOrEmpty(_contextAccessor.WorkContext.CurrentCustomer.StaffStoreId)) + model.SearchStoreId = _contextAccessor.WorkContext.CurrentCustomer.StaffStoreId; var products = await _productService.PrepareProductList(model.SearchCategoryId, model.SearchBrandId, model.SearchCollectionId, model.SearchStoreId, model.SearchVendorId, model.SearchProductTypeId, model.SearchProductName, pageIndex, pageSize); From 1ed2c6d7b3f5499e4ce36444e06d1e578e7fe545 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Mar 2026 17:19:39 +0000 Subject: [PATCH 3/3] Remove store context filtering from Admin BlogViewModelService.PrepareProductModel Co-authored-by: KrzysztofPajak <16772986+KrzysztofPajak@users.noreply.github.com> --- src/Web/Grand.Web.AdminShared/Services/BlogViewModelService.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Web/Grand.Web.AdminShared/Services/BlogViewModelService.cs b/src/Web/Grand.Web.AdminShared/Services/BlogViewModelService.cs index aefa56d9c..cfd7cd178 100644 --- a/src/Web/Grand.Web.AdminShared/Services/BlogViewModelService.cs +++ b/src/Web/Grand.Web.AdminShared/Services/BlogViewModelService.cs @@ -209,9 +209,6 @@ public virtual async Task UpdateBlogPostModel(BlogPostModel model, Blo public virtual async Task<(IList products, int totalCount)> PrepareProductModel( BlogProductModel.AddProductModel model, int pageIndex, int pageSize) { - //limit for store manager - if (!string.IsNullOrEmpty(_contextAccessor.WorkContext.CurrentCustomer.StaffStoreId)) - model.SearchStoreId = _contextAccessor.WorkContext.CurrentCustomer.StaffStoreId; var products = await _productService.PrepareProductList(model.SearchCategoryId, model.SearchBrandId, model.SearchCollectionId, model.SearchStoreId, model.SearchVendorId, model.SearchProductTypeId, model.SearchProductName, pageIndex, pageSize);