Skip to content

Commit

Permalink
ENGCOM-2316: hidden product attributes not intended for storefront #103
Browse files Browse the repository at this point in the history
 - Merge Pull Request magento/graphql-ce#103 from magento/graphql-ce:25_hide_product_attributes
 - Merged commits:
   1. 7f9d1bc
   2. 8f92ef4
  • Loading branch information
magento-engcom-team committed Jul 13, 2018
2 parents ce5eacd + 8f92ef4 commit de106e2
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,24 @@ public function getAttributes() : AttributeCollection
$this->collection = $this->collectionFactory->create();
$this->collection->addFieldToFilter('is_user_defined', '1');
$this->collection->addFieldToFilter('attribute_code', ['neq' => 'cost']);
$this->collection->addFieldToFilter(
[
'is_comparable',
'is_filterable',
'is_filterable_in_search',
'is_visible_on_front',
'used_in_product_listing',
'used_for_sort_by'
],
[
['eq' => '1'],
['eq' => '1'],
['eq' => '1'],
['eq' => '1'],
['eq' => '1'],
['eq' => '1']
]
);
}

return $this->collection->load();
Expand Down

0 comments on commit de106e2

Please sign in to comment.