0

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?

enter image description here

1 Answer 1

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.