Skip to content

Commit

Permalink
Update GetSearch handler - add limit to categories/collections/vendors
Browse files Browse the repository at this point in the history
  • Loading branch information
KrzysztofPajak committed Oct 25, 2021
1 parent d11a42a commit 0d7b6ec
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public async Task<SearchModel> Handle(GetSearch request, CancellationToken cance
{
var categoriesModel = new List<SearchModel.CategoryModel>();
//all categories
var allCategories = await _categoryService.GetAllCategories(parentId: "", storeId: request.Store.Id);
var allCategories = await _categoryService.GetAllCategories(storeId: request.Store.Id, pageSize: 100);
foreach (var c in allCategories)
{
//generate full category name (breadcrumb)
Expand Down Expand Up @@ -144,7 +144,7 @@ public async Task<SearchModel> Handle(GetSearch request, CancellationToken cance
}
}

var collections = await _collectionService.GetAllCollections();
var collections = await _collectionService.GetAllCollections(pageSize: 100);
if (collections.Any())
{
request.Model.AvailableCollections.Add(new SelectListItem {
Expand All @@ -162,7 +162,7 @@ public async Task<SearchModel> Handle(GetSearch request, CancellationToken cance
request.Model.asv = _vendorSettings.AllowSearchByVendor;
if (request.Model.asv)
{
var vendors = await _vendorService.GetAllVendors();
var vendors = await _vendorService.GetAllVendors(pageSize: 100);
if (vendors.Any())
{
request.Model.AvailableVendors.Add(new SelectListItem {
Expand Down

0 comments on commit 0d7b6ec

Please sign in to comment.