Skip to content

Commit

Permalink
Started passing isSingleProduce where it was needed.
Browse files Browse the repository at this point in the history
  • Loading branch information
alfredsgenkins committed Aug 24, 2020
1 parent dc402a4 commit 8017539
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/Model/Resolver/Products/Query/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

use Magento\CatalogGraphQl\Model\Resolver\Products\Query\FieldSelection;
use Magento\CatalogGraphQl\Model\Resolver\Products\Query\Search as CoreSearch;
use ScandiPWA\CatalogGraphQl\Model\Resolver\Products\DataProvider\Product\CriteriaCheck;
use ScandiPWA\Performance\Model\Resolver\Products\DataPostProcessor;

/**
Expand Down Expand Up @@ -152,7 +153,8 @@ public function getResult(
$productArray = $this->productPostProcessor->process(
$searchResults->getItems(),
'products/items',
$info
$info,
['isSingleProduct' => CriteriaCheck::isSingleProductFilter($searchCriteria)]
);
} else {
$productArray = array_map(function ($product) {
Expand Down
3 changes: 2 additions & 1 deletion src/Model/Variant/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,8 @@ protected function fetch($info) : array {
$productsData = $this->dataPostProcessor->process(
$productsToProcess,
'variants/product',
$info
$info,
['isSingleProduct' => CriteriaCheck::isSingleProductFilter($this->searchCriteria)]
);

foreach ($this->parentProducts as $product) {
Expand Down

0 comments on commit 8017539

Please sign in to comment.