We have been trying to make a query when a user apply some filters on front end. We are trying to make OR query in products collection: tried the following but none of them work
$collection->addAttributeToFilter(['web_mobile_filter','offer_group_name_value'],
[
['in' => '1122'],
['in' => '72']
]);
and
$collection->addAttributeToFilter(
[
[
'attribute' => 'web_mobile_filter',
'in' => '1122'
],
[
'attribute' => 'offer_group_name_value',
'in' => '72,73'
],
]
);
Can someone help me, find me what i am doing wrong here please?
2
Answers
You can write like this :-