示例#1
0
 public function prepareRecipient(Mzax_Emarketing_Model_Recipient $recipient)
 {
     $customer = Mage::getModel('customer/customer')->load($recipient->getObjectId());
     $recipient->setCustomer($customer);
     $recipient->setEmail($customer->getEmail());
     $recipient->setName($customer->getName());
 }
示例#2
0
 public function prepareRecipient(Mzax_Emarketing_Model_Recipient $recipient)
 {
     /* @var $order Mage_Sales_Model_Order */
     $order = Mage::getModel('sales/order')->load($recipient->getObjectId());
     $recipient->setOrder($order);
     $recipient->setCustomer($order->getCustomer());
     $recipient->setEmail($order->getCustomerEmail());
     $recipient->setName($order->getCustomerName());
 }
示例#3
0
 public function prepareRecipient(Mzax_Emarketing_Model_Recipient $recipient)
 {
     /* @var $quote Mage_Sales_Model_Quote */
     $quote = Mage::getModel('sales/quote')->load($recipient->getObjectId());
     $recipient->setQuote($quote);
     $recipient->setCustomer($quote->getCustomer());
     $recipient->setEmail($quote->getCustomerEmail());
     $recipient->setName($quote->getCustomerName());
 }
示例#4
0
 /**
  * Prepare recipient for sending
  * this should at least set email and name to the recipient
  * but can also set any other data that later can be used
  * inside the templates
  *
  * @param Mzax_Emarketing_Model_Recipient $recipient
  */
 public function prepareRecipient(Mzax_Emarketing_Model_Recipient $recipient)
 {
     $object = Mage::getModel($this->_entityId);
     $object->load($recipient->getObjectId());
     $recipient->setObject($object);
 }