I have a collection and I want to filter like this: WHERE field1 >= '2020-01-01' OR (field2 == 'open' && $field3 == 1).
How can I achieve that?
Please try this below way
$collection->addFieldToFilter(
array('field1',array(
array('attribute'=>'field2', 'eq' => 'open'),
array('attribute'=>'field3', 'eq'=>'1')
)
),
array(
array('gteq' => '2020-01-01'),
)
);