Skip to content

Commit

Permalink
Removed collection processors which were not working properly.
Browse files Browse the repository at this point in the history
  • Loading branch information
alfredsgenkins committed Aug 24, 2020
1 parent 988e01e commit dc402a4
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 611 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use Magento\Catalog\Model\ResourceModel\Product\Collection;
use Magento\CatalogGraphQl\Model\Resolver\Products\DataProvider\Product\CollectionProcessorInterface;
use Magento\Framework\Api\SearchCriteriaInterface;
use ScandiPWA\CatalogGraphQl\Model\Resolver\Products\SearchCriteria\CollectionProcessor\FilterProcessor\CustomerGroupFilter;

/**
* Adds price data to product collection
*
Expand All @@ -19,6 +19,7 @@
class PriceProcessor implements CollectionProcessorInterface
{
const PRICE_FIELD = 'price_range';
const FLAG_CUSTOMER_GROUP_PRICE_ADDED = 'customer_group_price_data_added';

/**
* {@inheritdoc}
Expand All @@ -28,7 +29,7 @@ public function process(
SearchCriteriaInterface $searchCriteria,
array $attributeNames
): Collection {
$isPriceDataAdded = $collection->getFlag(CustomerGroupFilter::FLAG_CUSTOMER_GROUP_PRICE_ADDED);
$isPriceDataAdded = $collection->getFlag(self::FLAG_CUSTOMER_GROUP_PRICE_ADDED);

// add tax percent, no-matter what
$collection->addTaxPercents();
Expand All @@ -44,4 +45,4 @@ public function process(

return $collection;
}
}
}

This file was deleted.

This file was deleted.

Loading

0 comments on commit dc402a4

Please sign in to comment.