6 Nov 2013

Magento: Using Or And And Query Condition To Collection

Please check the below details how we can use AND and OR query condition in magento collection.
Product collection :




AND query condition :
Getting collection to select only those products whose sku is like ‘nokia126’ AND status is equal to 1 (i.e. enabled status).





OR query condition :
Getting collection to select only those products whose sku is like ‘nokia126’ OR status is equal to 1 (i.e. enabled status).



For checking the query statement :


No comments:

Post a Comment