Public Member Functions | |
subscribeCustomer ($observer) | |
customerDeleted ($observer) | |
scheduledSend ($schedule) |
Definition at line 32 of file Observer.php.
customerDeleted | ( | $ | observer | ) |
Customer delete handler
Varien_Object | $observer |
Definition at line 49 of file Observer.php.
00050 { 00051 $subscriber = Mage::getModel('newsletter/subscriber') 00052 ->loadByEmail($observer->getEvent()->getCustomer()->getEmail()); 00053 if($subscriber->getId()) { 00054 $subscriber->delete(); 00055 } 00056 return $this; 00057 }
scheduledSend | ( | $ | schedule | ) |
Definition at line 59 of file Observer.php.
00060 { 00061 $countOfQueue = 3; 00062 $countOfSubscritions = 20; 00063 00064 $collection = Mage::getModel('newsletter/queue')->getCollection() 00065 ->setPageSize($countOfQueue) 00066 ->setCurPage(1) 00067 ->addOnlyForSendingFilter() 00068 ->load(); 00069 00070 $collection->walk('sendPerSubscriber', array($countOfSubscritions)); 00071 }
subscribeCustomer | ( | $ | observer | ) |
Definition at line 34 of file Observer.php.
00035 { 00036 $customer = $observer->getEvent()->getCustomer(); 00037 if (($customer instanceof Mage_Customer_Model_Customer)) { 00038 Mage::getModel('newsletter/subscriber')->subscribeCustomer($customer); 00039 } 00040 return $this; 00041 }