version : Magento 2.4 safira I want my website show every products related to filters I choose. If I choose multi filters, I only got products fulfilled all conditions. Is there any way I can edit this?
1 Answer
You need to overwrite the filter functionality OR condition like this:
$collection->addAttributeToFilter(
array(
array('attribute' => 'someattribute', 'like' => 'value'),
array('attribute' => 'otherattribute', 'like' => 'value'),
array('attribute' => 'anotherattribute', 'like' => 'value'),
)
);
Hope, it will help you.