/** * prepare collection * * @return Varien_Object */ protected function getPreparedCollection() { //all active subscribers $collection = $this->_getCollection(); $totalSubscribers = $collection->getSize(); //all active subscribers who are also customers $customerSubscribers = $collection->addFieldToFilter('customer_id', array('neq' => '0')); $customerSubscriberCount = $customerSubscribers->getSize(); $days = $this->calculateOperationalDaysFromOrder(); if ($days) { $subscribersPerDay = number_format($totalSubscribers / $days, 2); } else { $subscribersPerDay = $totalSubscribers; } $resultObject = new Varien_Object(); $resultObject->setTotalSubscriber($totalSubscribers)->setTotalSubscriberCustomer($customerSubscriberCount)->setSubscribersPerDay($subscribersPerDay); return $resultObject; }