Beispiel #1
0
 static function _sendAutoPointCouponEmail($controller, $member, $coupon)
 {
     $viewPageName = 'email/member_point_coupon';
     $couponArr = Helper_Objects::translateObjectToArr($controller, $coupon, 'couponToArr');
     $body = $controller->_getMemberEmailBodyFromViewPage($viewPageName, $member, array('coupon' => $couponArr));
     $smsBody = $controller->_getMemberEmailBodyFromViewPage('sms/member_point_coupon', $member, array('coupon' => $couponArr));
     $from = $controller->getNoReplyFrom();
     $to = $member->getEmail();
     $couponCode = $coupon->getCouponCode();
     $subject = "Bonus Coupon (Coupon Code: {$couponCode})";
     $autoPointConfig = $controller->getKrcoConfigValue('cart', 'auto_point_coupon');
     if ($customSubject = Helper_Structure::getArrayValue($autoPointConfig, 'email_subject')) {
         $subject = $customSubject;
     }
     Helper_Mail::sendEmail($controller, $from, $to, NULL, NULL, $subject, $body);
     Helper_Mail::sendSms($controller, $member->getPhoneNumber(), $smsBody);
 }
Beispiel #2
0
 static function _sendMemberInvitationAccepted($controller, $member, $inv)
 {
     $viewPageName = 'email/member_invitation_accepted';
     $invArr = Helper_Objects::translateObjectToArr($controller, $inv, 'invitationToArr');
     $body = $controller->_getMemberEmailBodyFromViewPage($viewPageName, $member, array('invitation' => $invArr));
     $smsBody = $controller->_getMemberEmailBodyFromViewPage('sms/member_invitation_accepted', $member, array('invitation' => $invArr));
     $from = $controller->getNoReplyFrom();
     $to = $member->getEmail();
     $siteName = $controller->getSiteName();
     $refereeEmail = $inv->getEmail();
     Helper_Mail::sendEmailWithFooter($controller, $from, $to, NULL, NULL, "{$refereeEmail} joined {$siteName}", $body);
     Helper_Mail::sendSms($controller, $member->getPhoneNumber(), $smsBody);
 }
Beispiel #3
0
 static function translateOrderToArr($controller, $orderObj)
 {
     $order = Helper_Objects::translateObjectToArr($controller, $orderObj, 'orderToOrderArr', 'orders');
     return $order;
 }