/// <summary> /// This method returns child categories for this category /// </summary> /// <param name="searchOptions">The options to perform the search with</param> /// <param name="categoryItem">The category item whose children to retrieve</param> /// <returns>A list of child categories</returns> protected CategorySearchResults GetChildCategories(CommerceSearchOptions searchOptions, Item categoryItem) { var returnList = new List <Item>(); var totalPageCount = 0; var totalCategoryCount = 0; if (Item != null) { return(SearchNavigation.GetCategoryChildCategories(categoryItem.ID, searchOptions)); } return(new CategorySearchResults(returnList, totalCategoryCount, totalPageCount, searchOptions.StartPageIndex, new List <FacetCategory>())); }
/// <summary> /// This method returns child categories for this category /// </summary> /// <param name="searchOptions">The options to perform the search with</param> /// <param name="categoryItem">The category item whose children to retrieve</param> /// <returns>A list of child categories</returns> protected CategorySearchResults GetChildCategories(CommerceSearchOptions searchOptions, Item categoryItem) { var returnList = new List <Item>(); var totalPageCount = 0; var totalCategoryCount = 0; if (Item != null) { var searchResponse = SearchNavigation.GetCategoryChildCategories(categoryItem.ID, searchOptions); returnList.AddRange(searchResponse.ResponseItems); totalCategoryCount = searchResponse.TotalItemCount; totalPageCount = searchResponse.TotalPageCount; } var results = new CategorySearchResults(returnList, totalCategoryCount, totalPageCount, searchOptions.StartPageIndex, new List <FacetCategory>()); return(results); }