Jump to content


Photo

How to Apply OR Conditions To Collection In Magento 2

#magento #magento2 #magento2ecommerce

  • Please log in to reply
No replies to this topic

#1 Meetanshi.inc

Meetanshi.inc

    Advanced Member

  • Members
  • PipPipPip
  • 321 posts

Posted 25 May 2022 - 05:11 AM

The default Magento 2 allows applying AND collections in your Magento 2 store. 

 

However, Magento 2 even facilitates applying AND & OR collections in Magento 2. 

 

You can get a better idea by understanding the example of AND & Or condition for your Magento 2 store. 

 

It is possible to add OR conditions in Magento 2 using the addFieldToFilter () method. In such a manner, you can apply OR conditions to collection in Magento 2
 

For more information, you can refer to the article at: https://meetanshi.com/blog/apply-or-conditions-to-collection-in-magento-2/



looking for the best presta addons with outstanding support? check this: PrestaShop Modules