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
Minor changes - move ISearchTermService to catalog project
support92d50c325a0d
diff --git a/src/Business/Grand.Business.Common/Interfaces/Directory/ISearchTermService.cs b/src/Business/Grand.Business.Catalog/Interfaces/Directory/ISearchTermService.cssimilarity index 94%rename from src/Business/Grand.Business.Common/Interfaces/Directory/ISearchTermService.csrename to src/Business/Grand.Business.Catalog/Interfaces/Directory/ISearchTermService.csindex 9a8ec3eb3..a02099f9d 100644--- a/src/Business/Grand.Business.Common/Interfaces/Directory/ISearchTermService.cs+++ b/src/Business/Grand.Business.Catalog/Interfaces/Directory/ISearchTermService.cs@@ -1,8 +1,8 @@-using Grand.Business.Common.Utilities;+using Grand.Business.Catalog.Utilities;using Grand.Domain;using Grand.Domain.Common;-namespace Grand.Business.Common.Interfaces.Directory+namespace Grand.Business.Catalog.Interfaces.Directory{/// <summary>/// Search term service interafcediff --git a/src/Business/Grand.Business.Common/Services/Directory/SearchTermService.cs b/src/Business/Grand.Business.Catalog/Services/Directory/SearchTermService.cssimilarity index 94%rename from src/Business/Grand.Business.Common/Services/Directory/SearchTermService.csrename to src/Business/Grand.Business.Catalog/Services/Directory/SearchTermService.csindex 775d6c4b1..a88937258 100644--- a/src/Business/Grand.Business.Common/Services/Directory/SearchTermService.cs+++ b/src/Business/Grand.Business.Catalog/Services/Directory/SearchTermService.cs@@ -1,12 +1,12 @@-using Grand.Business.Common.Interfaces.Directory;-using Grand.Business.Common.Utilities;+using Grand.Business.Catalog.Interfaces.Directory;+using Grand.Business.Catalog.Utilities;using Grand.Domain;using Grand.Domain.Common;using Grand.Domain.Data;using Grand.Infrastructure.Extensions;using MediatR;-namespace Grand.Business.Common.Services.Directory+namespace Grand.Business.Catalog.Services.Directory{/// <summary>/// Search term service@@ -91,8 +91,7 @@ namespace Grand.Business.Common.Services.DirectoryCount = groupedResult.Sum(o => o.Count)}).OrderByDescending(m => m.Count)- .Select(r => new SearchTermReportLine- {+ .Select(r => new SearchTermReportLine {Keyword = r.Keyword,Count = r.Count});diff --git a/src/Business/Grand.Business.Catalog/Startup/StartupApplication.cs b/src/Business/Grand.Business.Catalog/Startup/StartupApplication.csindex 6e546cffd..093119068 100644--- a/src/Business/Grand.Business.Catalog/Startup/StartupApplication.cs+++ b/src/Business/Grand.Business.Catalog/Startup/StartupApplication.cs@@ -17,6 +17,8 @@ using Microsoft.Extensions.Configuration;using Microsoft.Extensions.DependencyInjection;using Grand.Business.Catalog.Services.Brands;using Grand.Business.Catalog.Interfaces.Brands;+using Grand.Business.Catalog.Services.Directory;+using Grand.Business.Catalog.Interfaces.Directory;namespace Grand.Business.Catalog.Startup{@@ -66,6 +68,7 @@ namespace Grand.Business.Catalog.StartupserviceCollection.AddScoped<IInventoryManageService, InventoryManageService>();serviceCollection.AddScoped<IStockQuantityService, StockQuantityService>();serviceCollection.AddScoped<IPricingService, PricingService>();+ serviceCollection.AddScoped<ISearchTermService, SearchTermService>();}private void RegisterDiscountsService(IServiceCollection serviceCollection)diff --git a/src/Business/Grand.Business.Common/Utilities/SearchTermReportLine.cs b/src/Business/Grand.Business.Catalog/Utilities/SearchTermReportLine.cssimilarity index 89%rename from src/Business/Grand.Business.Common/Utilities/SearchTermReportLine.csrename to src/Business/Grand.Business.Catalog/Utilities/SearchTermReportLine.csindex 3efd66652..0bad4a405 100644--- a/src/Business/Grand.Business.Common/Utilities/SearchTermReportLine.cs+++ b/src/Business/Grand.Business.Catalog/Utilities/SearchTermReportLine.cs@@ -1,4 +1,4 @@-namespace Grand.Business.Common.Utilities+namespace Grand.Business.Catalog.Utilities{/// <summary>/// Search term (for statistics)diff --git a/src/Business/Grand.Business.Common/Startup/StartupApplication.cs b/src/Business/Grand.Business.Common/Startup/StartupApplication.csindex 8ed5d2d91..946ec2898 100644--- a/src/Business/Grand.Business.Common/Startup/StartupApplication.cs+++ b/src/Business/Grand.Business.Common/Startup/StartupApplication.cs@@ -57,7 +57,6 @@ namespace Grand.Business.Common.Startup}private void RegisterDirectoryService(IServiceCollection serviceCollection){- serviceCollection.AddScoped<ISearchTermService, SearchTermService>();serviceCollection.AddScoped<IDateTimeService, DateTimeService>();serviceCollection.AddScoped<ICookiePreference, CookiePreference>();serviceCollection.AddScoped<IGeoLookupService, GeoLookupService>();diff --git a/src/Tests/Grand.Business.Common.Tests/Services/Directory/SearchTermServiceTests.cs b/src/Tests/Grand.Business.Catalog.Tests/Service/Directory/SearchTermServiceTests.cssimilarity index 93%rename from src/Tests/Grand.Business.Common.Tests/Services/Directory/SearchTermServiceTests.csrename to src/Tests/Grand.Business.Catalog.Tests/Service/Directory/SearchTermServiceTests.csindex deefab6b4..ca8718680 100644--- a/src/Tests/Grand.Business.Common.Tests/Services/Directory/SearchTermServiceTests.cs+++ b/src/Tests/Grand.Business.Catalog.Tests/Service/Directory/SearchTermServiceTests.cs@@ -1,4 +1,5 @@-using Grand.Business.Common.Services.Directory;+using Grand.Business.Catalog.Services.Directory;+using Grand.Business.Common.Services.Directory;using Grand.Domain.Common;using Grand.Domain.Data;using Grand.Infrastructure.Events;@@ -6,7 +7,7 @@ using MediatR;using Microsoft.VisualStudio.TestTools.UnitTesting;using Moq;-namespace Grand.Business.Common.Tests.Services.Directory+namespace Grand.Business.Catalog.Tests.Services.Directory{[TestClass()]public class SearchTermServiceTestsdiff --git a/src/Tests/Grand.Business.Common.Tests/Grand.Business.Common.Tests.csproj b/src/Tests/Grand.Business.Common.Tests/Grand.Business.Common.Tests.csprojindex 9aa4150a7..4bb0f396d 100644--- a/src/Tests/Grand.Business.Common.Tests/Grand.Business.Common.Tests.csproj+++ b/src/Tests/Grand.Business.Common.Tests/Grand.Business.Common.Tests.csproj@@ -25,6 +25,7 @@</ItemGroup><ItemGroup>+ <ProjectReference Include="..\..\Business\Grand.Business.Catalog\Grand.Business.Catalog.csproj" /><ProjectReference Include="..\..\Business\Grand.Business.Common\Grand.Business.Common.csproj" /></ItemGroup>diff --git a/src/Web/Grand.Web.Admin/Controllers/ReportsController.cs b/src/Web/Grand.Web.Admin/Controllers/ReportsController.csindex 080285161..94f385a73 100644--- a/src/Web/Grand.Web.Admin/Controllers/ReportsController.cs+++ b/src/Web/Grand.Web.Admin/Controllers/ReportsController.cs@@ -1,4 +1,5 @@-using Grand.Business.Catalog.Interfaces.Prices;+using Grand.Business.Catalog.Interfaces.Directory;+using Grand.Business.Catalog.Interfaces.Prices;using Grand.Business.Catalog.Interfaces.Products;using Grand.Business.Checkout.Interfaces.Orders;using Grand.Business.Common.Extensions;@@ -115,8 +116,7 @@ namespace Grand.Web.Admin.Controllersvar result = new List<BestsellersReportLineModel>();foreach (var x in items){- var m = new BestsellersReportLineModel- {+ var m = new BestsellersReportLineModel {ProductId = x.ProductId,TotalAmount = _priceFormatter.FormatPrice(x.TotalAmount, false),TotalQuantity = x.TotalQuantity,@@ -127,8 +127,7 @@ namespace Grand.Web.Admin.Controllersresult.Add(m);}- var gridModel = new DataSourceResult- {+ var gridModel = new DataSourceResult {Data = result,Total = items.TotalCount};@@ -140,32 +139,28 @@ namespace Grand.Web.Admin.Controllers{var report = new List<OrderPeriodReportLineModel>();var reportperiod7days = await _orderReportService.GetOrderPeriodReport(7, _workContext.CurrentCustomer.StaffStoreId);- report.Add(new OrderPeriodReportLineModel- {+ report.Add(new OrderPeriodReportLineModel {Period = _translationService.GetResource("Admin.Reports.Period.7days"),Count = reportperiod7days.Count,Amount = reportperiod7days.Amount});var reportperiod14days = await _orderReportService.GetOrderPeriodReport(14, _workContext.CurrentCustomer.StaffStoreId);- report.Add(new OrderPeriodReportLineModel- {+ report.Add(new OrderPeriodReportLineModel {Period = _translationService.GetResource("Admin.Reports.Period.14days"),Count = reportperiod14days.Count,Amount = reportperiod14days.Amount});var reportperiodmonth = await _orderReportService.GetOrderPeriodReport(30, _workContext.CurrentCustomer.StaffStoreId);- report.Add(new OrderPeriodReportLineModel- {+ report.Add(new OrderPeriodReportLineModel {Period = _translationService.GetResource("Admin.Reports.Period.month"),Count = reportperiodmonth.Count,Amount = reportperiodmonth.Amount});var reportperiodyear = await _orderReportService.GetOrderPeriodReport(365, _workContext.CurrentCustomer.StaffStoreId);- report.Add(new OrderPeriodReportLineModel- {+ report.Add(new OrderPeriodReportLineModel {Period = _translationService.GetResource("Admin.Reports.Period.year"),Count = reportperiodyear.Count,Amount = reportperiodyear.Amount@@ -201,8 +196,7 @@ namespace Grand.Web.Admin.Controllerspublic async Task<IActionResult> BestsellersReport(){- var model = new BestsellersReportModel- {+ var model = new BestsellersReportModel {//vendorIsLoggedInAsVendor = _workContext.CurrentVendor != null && !await _groupService.IsStaff(_workContext.CurrentCustomer)};@@ -278,8 +272,7 @@ namespace Grand.Web.Admin.Controllersvar result = new List<BestsellersReportLineModel>();foreach (var x in items){- var m = new BestsellersReportLineModel- {+ var m = new BestsellersReportLineModel {ProductId = x.ProductId,TotalAmount = _priceFormatter.FormatPrice(x.TotalAmount, false),TotalQuantity = x.TotalQuantity,@@ -295,8 +288,7 @@ namespace Grand.Web.Admin.Controllerselseresult.Add(m);}- var gridModel = new DataSourceResult- {+ var gridModel = new DataSourceResult {Data = result,Total = items.TotalCount};@@ -311,8 +303,7 @@ namespace Grand.Web.Admin.Controllersreturn Content("");var model = await GetReportOrderPeriodModel();- var gridModel = new DataSourceResult- {+ var gridModel = new DataSourceResult {Data = model,Total = model.Count};@@ -331,8 +322,7 @@ namespace Grand.Web.Admin.ControllersstoreId = _workContext.CurrentCustomer.StaffStoreId;var model = await _orderReportService.GetOrderByTimeReport(storeId, startDate, endDate);- var gridModel = new DataSourceResult- {+ var gridModel = new DataSourceResult {Data = model};return Json(gridModel);@@ -365,11 +355,9 @@ namespace Grand.Web.Admin.Controllersvar items = await _orderReportService.ProductsNeverSold(storeId, vendorId,startDateValue, endDateValue,command.Page - 1, command.PageSize, true);- var gridModel = new DataSourceResult- {+ var gridModel = new DataSourceResult {Data = items.Select(x =>- new NeverSoldReportLineModel- {+ new NeverSoldReportLineModel {ProductId = x.Id,ProductName = x.Name,}),@@ -403,8 +391,7 @@ namespace Grand.Web.Admin.Controllersvar statuses = await _orderStatusService.GetAll();- var model = report.Select(x => new OrderAverageReportLineSummaryModel- {+ var model = report.Select(x => new OrderAverageReportLineSummaryModel {OrderStatus = statuses.FirstOrDefault(y => y.StatusId == x.OrderStatus)?.Name,SumTodayOrders = _priceFormatter.FormatPrice(x.SumTodayOrders, false),SumThisWeekOrders = _priceFormatter.FormatPrice(x.SumThisWeekOrders, false),@@ -413,8 +400,7 @@ namespace Grand.Web.Admin.ControllersSumAllTimeOrders = _priceFormatter.FormatPrice(x.SumAllTimeOrders, false),}).ToList();- var gridModel = new DataSourceResult- {+ var gridModel = new DataSourceResult {Data = model,Total = model.Count};@@ -450,8 +436,7 @@ namespace Grand.Web.Admin.Controllersforeach (var x in orders){var store = await _storeService.GetStoreById(x.StoreId);- items.Add(new OrderModel- {+ items.Add(new OrderModel {Id = x.Id,OrderNumber = x.OrderNumber,StoreName = store != null ? store.Shortcut : "Unknown",@@ -464,8 +449,7 @@ namespace Grand.Web.Admin.ControllersCreatedOn = _dateTimeService.ConvertToUserTime(x.CreatedOnUtc, DateTimeKind.Utc)});}- var gridModel = new DataSourceResult- {+ var gridModel = new DataSourceResult {Data = items,Total = orders.TotalCount};@@ -490,8 +474,7 @@ namespace Grand.Web.Admin.Controllersvar model = new List<OrderIncompleteReportLineModel>();//not paidvar psPending = await _orderReportService.GetOrderAverageReportLine(storeId: storeId, ps: PaymentStatus.Pending, ignoreCancelledOrders: true);- model.Add(new OrderIncompleteReportLineModel- {+ model.Add(new OrderIncompleteReportLineModel {Item = _translationService.GetResource("Admin.Reports.Incomplete.TotalUnpaidOrders"),Count = psPending.CountOrders,Total = _priceFormatter.FormatPrice(psPending.SumOrders, false),@@ -499,8 +482,7 @@ namespace Grand.Web.Admin.Controllers});//not shippedvar ssPending = await _orderReportService.GetOrderAverageReportLine(storeId: storeId, ss: ShippingStatus.Pending, ignoreCancelledOrders: true);- model.Add(new OrderIncompleteReportLineModel- {+ model.Add(new OrderIncompleteReportLineModel {Item = _translationService.GetResource("Admin.Reports.Incomplete.TotalNotShippedOrders"),Count = ssPending.CountOrders,Total = _priceFormatter.FormatPrice(ssPending.SumOrders, false),@@ -508,16 +490,14 @@ namespace Grand.Web.Admin.Controllers});//pendingvar osPending = await _orderReportService.GetOrderAverageReportLine(storeId: storeId, os: (int)OrderStatusSystem.Pending, ignoreCancelledOrders: true);- model.Add(new OrderIncompleteReportLineModel- {+ model.Add(new OrderIncompleteReportLineModel {Item = _translationService.GetResource("Admin.Reports.Incomplete.TotalIncompleteOrders"),Count = osPending.CountOrders,Total = _priceFormatter.FormatPrice(osPending.SumOrders, false),ViewLink = Url.Action("List", "Order", new { orderStatusId = ((int)OrderStatusSystem.Pending).ToString(), area = Constants.AreaAdmin })});- var gridModel = new DataSourceResult- {+ var gridModel = new DataSourceResult {Data = model,Total = model.Count};@@ -531,8 +511,7 @@ namespace Grand.Web.Admin.Controllersreturn AccessDeniedView();var status = await _orderStatusService.GetAll();- var model = new CountryReportModel- {+ var model = new CountryReportModel {//order statusesAvailableOrderStatuses = status.Select(x => new SelectListItem() { Value = x.StatusId.ToString(), Text = x.Name }).ToList()};@@ -572,16 +551,14 @@ namespace Grand.Web.Admin.Controllersforeach (var x in items){var country = await _countryService.GetCountryById(!String.IsNullOrEmpty(x.CountryId) ? x.CountryId : "");- var m = new CountryReportLineModel- {+ var m = new CountryReportLineModel {CountryName = country != null ? country.Name : "Unknown",SumOrders = _priceFormatter.FormatPrice(x.SumOrders, false),TotalOrders = x.TotalOrders,};result.Add(m);}- var gridModel = new DataSourceResult- {+ var gridModel = new DataSourceResult {Data = result,Total = items.Count};@@ -614,8 +591,7 @@ namespace Grand.Web.Admin.Controllers//productsforeach (var product in lowStockProducts.products){- var lowStockModel = new LowStockProductModel- {+ var lowStockModel = new LowStockProductModel {Id = product.Id,Name = product.Name,ManageInventoryMethod = product.ManageInventoryMethodId.GetTranslationEnum(_translationService, _workContext.WorkingLanguage.Id),@@ -628,8 +604,7 @@ namespace Grand.Web.Admin.Controllersforeach (var combination in lowStockProducts.combinations){var product = await _productService.GetProductById(combination.ProductId);- var lowStockModel = new LowStockProductModel- {+ var lowStockModel = new LowStockProductModel {Id = product.Id,Name = product.Name,Attributes = await _productAttributeFormatter.FormatAttributes(product, combination.Attributes, _workContext.CurrentCustomer, "<br />", true, true, true, false),@@ -639,8 +614,7 @@ namespace Grand.Web.Admin.Controllers};models.Add(lowStockModel);}- var gridModel = new DataSourceResult- {+ var gridModel = new DataSourceResult {Data = models.PagedForCommand(command),Total = models.Count};@@ -656,10 +630,8 @@ namespace Grand.Web.Admin.Controllersreturn AccessDeniedView();var searchTermRecordLines = await _searchTermService.GetStats(command.Page - 1, command.PageSize);- var gridModel = new DataSourceResult- {- Data = searchTermRecordLines.Select(x => new SearchTermReportLineModel- {+ var gridModel = new DataSourceResult {+ Data = searchTermRecordLines.Select(x => new SearchTermReportLineModel {Keyword = x.Keyword,Count = x.Count,}),@@ -686,8 +658,7 @@ namespace Grand.Web.Admin.Controllersmodel.StoreId = _workContext.CurrentCustomer.StaffStoreId;var (bestCustomerReportLineModels, totalCount) = await _customerReportViewModelService.PrepareBestCustomerReportLineModel(model, 1, command.Page, command.PageSize);- var gridModel = new DataSourceResult- {+ var gridModel = new DataSourceResult {Data = bestCustomerReportLineModels.ToList(),Total = totalCount};@@ -701,8 +672,7 @@ namespace Grand.Web.Admin.Controllersmodel.StoreId = _workContext.CurrentCustomer.StaffStoreId;var (bestCustomerReportLineModels, totalCount) = await _customerReportViewModelService.PrepareBestCustomerReportLineModel(model, 2, command.Page, command.PageSize);- var gridModel = new DataSourceResult- {+ var gridModel = new DataSourceResult {Data = bestCustomerReportLineModels.ToList(),Total = totalCount};@@ -717,8 +687,7 @@ namespace Grand.Web.Admin.ControllersstoreId = _workContext.CurrentCustomer.StaffStoreId;var model = await _customerReportViewModelService.GetReportRegisteredCustomersModel(storeId);- var gridModel = new DataSourceResult- {+ var gridModel = new DataSourceResult {Data = model,Total = model.Count};@@ -734,8 +703,7 @@ namespace Grand.Web.Admin.ControllersstoreId = _workContext.CurrentCustomer.StaffStoreId;var model = await _customerReportService.GetCustomerByTimeReport(storeId, startDate, endDate);- var gridModel = new DataSourceResult- {+ var gridModel = new DataSourceResult {Data = model};return Json(gridModel);diff --git a/src/Web/Grand.Web/Features/Handlers/Catalog/GetSearchAutoCompleteHandler.cs b/src/Web/Grand.Web/Features/Handlers/Catalog/GetSearchAutoCompleteHandler.csindex ab295e825..da86bb9b4 100644--- a/src/Web/Grand.Web/Features/Handlers/Catalog/GetSearchAutoCompleteHandler.cs+++ b/src/Web/Grand.Web/Features/Handlers/Catalog/GetSearchAutoCompleteHandler.cs@@ -1,11 +1,11 @@using Grand.Business.Catalog.Interfaces.Brands;using Grand.Business.Catalog.Interfaces.Categories;+using Grand.Business.Catalog.Interfaces.Directory;using Grand.Business.Catalog.Interfaces.Prices;using Grand.Business.Catalog.Interfaces.Tax;using Grand.Business.Catalog.Queries.Handlers;using Grand.Business.Cms.Interfaces;using Grand.Business.Common.Extensions;-using Grand.Business.Common.Interfaces.Directory;using Grand.Business.Common.Interfaces.Security;using Grand.Business.Common.Services.Security;using Grand.Business.Storage.Interfaces;@@ -91,8 +91,7 @@ namespace Grand.Web.Features.Handlers.Catalog}}- var products = (await _mediator.Send(new GetSearchProductsQuery()- {+ var products = (await _mediator.Send(new GetSearchProductsQuery() {Customer = request.Customer,StoreId = storeId,Keywords = request.Term,@@ -120,8 +119,7 @@ namespace Grand.Web.Features.Handlers.Catalogif (picture != null)pictureUrl = await _pictureService.GetPictureUrl(picture.PictureId, _mediaSettings.AutoCompleteSearchThumbPictureSize);}- var rating = await _mediator.Send(new GetProductReviewOverview()- {+ var rating = await _mediator.Send(new GetProductReviewOverview() {Language = request.Language,Product = item,Store = request.Store@@ -129,8 +127,7 @@ namespace Grand.Web.Features.Handlers.Catalogvar price = displayPrices ? await PreparePrice(item, request) : (Price: string.Empty, PriceWithDiscount: string.Empty);- model.Add(new SearchAutoCompleteModel()- {+ model.Add(new SearchAutoCompleteModel() {SearchType = "Product",Label = item.GetTranslation(x => x.Name, request.Language.Id) ?? "",Desc = item.GetTranslation(x => x.ShortDescription, request.Language.Id) ?? "",@@ -165,8 +162,7 @@ namespace Grand.Web.Features.Handlers.Catalogvar desc = "";if (_catalogSettings.SearchByDescription)desc = "&sid=true";- model.Add(new SearchAutoCompleteModel()- {+ model.Add(new SearchAutoCompleteModel() {SearchType = "Brand",Label = brand.GetTranslation(x => x.Name, request.Language.Id),Desc = "",@@ -193,8 +189,7 @@ namespace Grand.Web.Features.Handlers.Catalogvar desc = "";if (_catalogSettings.SearchByDescription)desc = "&sid=true";- model.Add(new SearchAutoCompleteModel()- {+ model.Add(new SearchAutoCompleteModel() {SearchType = "Category",Label = category.GetTranslation(x => x.Name, request.Language.Id),Desc = "",@@ -210,8 +205,7 @@ namespace Grand.Web.Features.Handlers.Catalogvar posts = await _blogService.GetAllBlogPosts(storeId: storeId, pageSize: productNumber, blogPostName: request.Term);foreach (var item in posts){- model.Add(new SearchAutoCompleteModel()- {+ model.Add(new SearchAutoCompleteModel() {SearchType = "Blog",Label = item.GetTranslation(x => x.Title, request.Language.Id),Desc = "",@@ -231,8 +225,7 @@ namespace Grand.Web.Features.Handlers.Catalog}else{- searchTerm = new SearchTerm- {+ searchTerm = new SearchTerm {Keyword = request.Term,StoreId = storeId,Count = 1diff --git a/src/Web/Grand.Web/Features/Handlers/Catalog/GetSearchHandler.cs b/src/Web/Grand.Web/Features/Handlers/Catalog/GetSearchHandler.csindex 26f232e1f..3be796ed8 100644--- a/src/Web/Grand.Web/Features/Handlers/Catalog/GetSearchHandler.cs+++ b/src/Web/Grand.Web/Features/Handlers/Catalog/GetSearchHandler.cs@@ -1,5 +1,6 @@using Grand.Business.Catalog.Interfaces.Categories;using Grand.Business.Catalog.Interfaces.Collections;+using Grand.Business.Catalog.Interfaces.Directory;using Grand.Business.Catalog.Interfaces.Products;using Grand.Business.Catalog.Queries.Handlers;using Grand.Business.Common.Extensions;