Пример #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 $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());
 }
Пример #3
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());
 }