I am trying to filter product, I having a list of product ids in an array and i want to filter product base on this ids.
I want to fetch all the product which does not have this ids (Not In) How can i write it. Here is my code.
$ruleCreateArr = [10,15,21]; $collection = $this->productCollectionFactory->create(); $collection->addAttributeToSelect(array('name','id')) ->addAttributeToFilter('entity_id', array('nin', $ruleCreateArr));
It seems the "nin" filter not working.