Magento uses keywords in for IN and nin for NOT IN … $productIds = array(1251,1253,1256); if ($column->getFilter()->getValue()) { $this->getCollection()->addFieldToFilter(’entity_id’, array(’in’=>$productIds)); } else { $this->getCollection()->addFieldToFilter(’entity_id’, array(’nin’=>$productIds)); } …
Posted on July 6, 2017, 10:12 am, by admin, under
Tips.
addAttributeToFilter() is used to filter EAV collections. addFieldToFilter() is used to filter Non-EAV collections.
tag is used for re-usage of existing layout <vendorname_modulename_constrollername_indexaction> <reference name="myreferencename"> <block type="vendorname/blockname" name="modulename_blockname" template="storelocator/template.phtml"> </block> </reference> </vendorname_modulename_constrollername_indexaction> <vendorname_modulename_constrollername_listaction> <update handle="vendorname_modulename_constrollername_indexaction"/> </vendorname_modulename_constrollername_listaction>