protected function _getOrdersItemsCollection($ordersIds, $excludeChildren = true, $event = null) { $items = Mage::getModel('sales/order_item')->getCollection()->addFieldToFilter('order_id', array('in' => array_unique($ordersIds))); if ($excludeChildren) { $items->filterByParent(); } if (!empty($event)) { $response = new Varien_Object(array('items_collection' => $items)); Mage::dispatchEvent($event, array('response' => $response)); $items = $response->getItemsCollection(); } return $items->load(); }