i need to change the layered navigation feature a little bit, currently it filter product attributes on "OR" condition like Product 1 Red, blue, pink
Product 2 Red
Product 3 Blue
On selecting filter options “red” and “blue” in the layered nav, the product collection includes Product 1, Product 2 and Product 3. I just want it to return Product 1. I tried to it by modifying
->where($alias.'.value IN (?)', $ids);
to
foreach ($ids as $key => $value) {
$collection->getSelect()->where($alias.'.value = ?', $value);
}
but with this when i select two option, it doesn't return a value.
where color = red and color = green
no product will match your query. – Marius♦ Aug 31 '15 at 7:02