Skip to content

Commit 28a48e1

Browse files
committed
fix graphql
1 parent dfd96f5 commit 28a48e1

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

Model/Resolver/Products/DataProvider/ProductSearch.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,13 @@ public function getList(
123123
//Create a copy of search criteria without filters to preserve the results from search
124124
$searchCriteriaForCollection = $this->searchCriteriaBuilder->build($searchCriteria);
125125
//Apply CatalogSearch results from search and join table
126-
$this->getSearchResultsApplier(
127-
$searchResult,
128-
$collection,
129-
$this->getSortOrderArray($searchCriteriaForCollection)
130-
)->apply();
126+
// $this->getSearchResultsApplier(
127+
// $searchResult,
128+
// $collection,
129+
// $this->getSortOrderArray($searchCriteriaForCollection)
130+
// )->apply();
131+
132+
$collection->setFlag('search_resut_applied', true);
131133

132134
$this->collectionPreProcessor->process($collection, $searchCriteriaForCollection, $attributes, $context);
133135
$collection->load();

Model/Resolver/Products/DataProvider/Sellers.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,13 @@ public function getListSellers
167167
}
168168
$args['seller_id'] = $val->getData('seller_id');
169169
$sellerRates = $this->sellerFrontendRepository->getSellersRating((int)$data['seller_id']);
170-
$data['seller_rates'] = $sellerRates;
170+
$data['seller_rates'] = [
171+
'total_count' => $sellerRates->getTotalCount(),
172+
'items' => $sellerRates->getItems()
173+
];
171174
$data['group_id'] = $val->getGroupId();
172175
$data['group'] = $val->getSellerGroup();
176+
$data['country'] = !empty($val->getCountry()) ? $val->getCountry() : $val->getCountryId();
173177
$data['products'] = $this->getResult( $args, $info, $context);
174178
$items[] = $data;
175179
}

0 commit comments

Comments
 (0)