I'm trying to modify items in a collection on page load (catalog) and using the event:
and the code for the event is :
$observer->getCollection() ->addFieldToFilter('entity_id', array('nin' => array_keys($_excludeProducts))) ->clear() ->load();
this does exclude product(s) but the count is wrong. like there're 5 products in the collection and on the grid as well but the count is 6 items. How can i correct this?