Browse Source

课程取消,候补转正,新的邮件模板

lizhen_gitee 5 months ago
parent
commit
8c6fd6b7bc

+ 27 - 3
application/admin/controller/Lessonorder.php

@@ -195,11 +195,23 @@ class Lessonorder extends Backend
             if(!empty($user_info['email'])){
 
                 try {
+                    $message =
+                        'Hi,'.$user_info['firstname']. ' ' .$user_info['lastname'].'!<br/>
+                    We regret to inform you that the following class has been cancelled.<br/>
+                    Class:'.$lesson_info['name_en'].'<br/>
+                    Date: '.date('d F Y',$slot_info['starttime']).'<br/>
+                    Time: '.date('H:i a',$slot_info['starttime']).'<br/>
+                    Thank you for your kind understanding and look forward to seeing you in our studio soon!❤<br/>
+                    Best Regards,<br/>
+                    Elin Dance Studio<br/>
+                    <img src="'.config('website_url').'/assets/img/logo3.png" style="width:136px;height:115px">
+                    ';
+
                     $obj = new Email();
                     $result = $obj
                         ->to($user_info['email'])
                         ->subject('Class is Cancelled!')
-                        ->message('Hi,'.$user_info['firstname']. ' ' .$user_info['lastname'].',您预约的'.$lesson_info['name'].'已取消')
+                        ->message($message)
                         ->send();
 
                     $coach_name = Db::name('coach')->where('id',$slot_info['coach_ids'])->value('nickname');
@@ -313,11 +325,23 @@ class Lessonorder extends Backend
                     //额外的通知
                     $obj = new Email();
                     try {
+                        $message =
+                            'Hi,'.$order['firstname']. ' ' .$order['lastname'].'!<br/>
+                            We are excited to inform you that a spot has opened up for the following class. You are now booked into the class!<br/>
+                            Class:'.$order['name_en'].'<br/>
+                            Date: '.date('d F Y',$slot['starttime']).'<br/>
+                            Time: '.date('H:i a',$slot['starttime']).'<br/>
+                            We look forward to seeing you in the studio!❤<br/>
+                            Best Regards,<br/>
+                            Elin Dance Studio<br/>
+                            <img src="'.config('website_url').'/assets/img/logo3.png" style="width:136px;height:115px">
+                            ';
+
                         //给这些用户发邮件
                         $result = $obj
                             ->to($order['email'])
-                            ->subject('Elin Dance Studio 您候补预订的课程已转为正式预约')
-                            ->message('Hi,'.$order['firstname']. ' ' .$order['lastname'].',您候补预定的课程['.$order['name_en'].']即时起已转为正式预约,时间:'.date('Y-m-d H:i',$slot['starttime']).',请及时来上课!')
+                            ->subject('A spot for your waitlisted class is ready and you are now added in!')
+                            ->message($message)
                             ->send();
 
                         //发whatsapp

+ 14 - 2
application/api/controller/Usercenter.php

@@ -485,11 +485,23 @@ class Usercenter extends Api
                     //额外的通知
                     $obj = new Email();
                     try {
+                        $message =
+                            'Hi,'.$order['firstname']. ' ' .$order['lastname'].'!<br/>
+                            We are excited to inform you that a spot has opened up for the following class. You are now booked into the class!<br/>
+                            Class:'.$order['name_en'].'<br/>
+                            Date: '.date('d F Y',$slot['starttime']).'<br/>
+                            Time: '.date('H:i a',$slot['starttime']).'<br/>
+                            We look forward to seeing you in the studio!❤<br/>
+                            Best Regards,<br/>
+                            Elin Dance Studio<br/>
+                            <img src="'.config('website_url').'/assets/img/logo3.png" style="width:136px;height:115px">
+                            ';
+
                         //给这些用户发邮件
                         $result = $obj
                             ->to($order['email'])
-                            ->subject('Elin Dance Studio 您候补预订的课程已转为正式预约')
-                            ->message('Hi,'.$order['firstname']. ' ' .$order['lastname'].',您候补预定的课程['.$order['name_en'].']即时起已转为正式预约,时间:'.date('Y-m-d H:i',$slot['starttime']).',请及时来上课!')
+                            ->subject('A spot for your waitlisted class is ready and you are now added in!')
+                            ->message($message)
                             ->send();
 
                         //发whatsapp