I am trying to get all product ids of multi-select attribute "filter_type" ids($optionData) are assigned.
But I am unable to get them as its only works first time. In second and other loop I am not getting any products. However its working fine when I pass id manually in place of (int)$optionValues. e.g. 441 etc.
$optionData = array('435','436','437','438','441','439');
$productIds = array();
foreach ($optionData as $optionValues) {
$productIds[] = $_productCollection->addAttributeToFilter(
array(
array('attribute' => "filter_type", 'finset' => (int)$optionValues)
)
)->getAllIds();
}
echo "<pre>"; print_r($productIds);
`