protected function _loadMagentoItems() { $this->_totalCount = $this->_result->getNumFound(); $ids = array(); foreach ($this->_result->getHits() as $prod) { $ids[] = $this->getMagentoParentId($prod); } $collection = Mage::getResourceModel('catalog/product_collection'); $collection->addFieldToFilter('entity_id', array('in' => $ids)); if (count($ids)) { $collection->getSelect()->order(new Zend_Db_Expr('FIELD(e.entity_id, ' . implode(',', $ids) . ')')); } $collection->addAttributeToSelect('*'); $this->_select = $collection->getSelect(); }