I trying to do filter the product collection with my custom attribute(Type
: Multi select
).
It is not working.
Kindly help me
Try to use addAttributeToFilter with or condition
$collection->addAttributeToFilter('attribute_code',
array(
array('finset'=> array('237')),
array('finset'=> array('238')),
array('finset'=> array('239')),
)
);
Try this code :-
$collection = $this->productFactory->create();
$collection->addAttributeToFilter('status', array('eq' => 1));