protected function _construct() { parent::_construct(); /** * Allow to use analytic function */ $this->_useAnalyticFunction = true; }
public function getSize() { if (count($this->getSelect()->getPart(Zend_Db_Select::GROUP)) > 0) { // Create a new collection from ids because we need a fresh select $ids = $this->getAllIds(); $new_coll = Mage::getModel('request4quote/quote')->getCollection()->addFieldToFilter('entity_id', array('in' => $ids)); // return the collection size return $new_coll->getSize(); } return parent::getSize(); }