Browse Source

购买配套,新邮件模板

lizhen_gitee 5 months ago
parent
commit
b5407d1443
2 changed files with 22 additions and 8 deletions
  1. 7 6
      application/api/controller/Demo.php
  2. 15 2
      application/index/controller/Plantask.php

+ 7 - 6
application/api/controller/Demo.php

@@ -98,11 +98,12 @@ class Demo extends Api
 
         $message =
             'Hi,'.$order['firstname']. ' ' .$order['lastname'].'!<br/>
-                    We regret to inform you that the following class has been cancelled.<br/>
-                    Class:'.$order['name_en'].'<br/>
-                    Date: '.date('d F Y',$slot['starttime']).'<br/>
-                    Time: '.date('H:i a',$slot['starttime']).'<br/>
-                    Thank you for your kind understanding and look forward to seeing you in our studio soon!❤<br/>
+                    Thank you for your purchase of the '.$order['name_en'].' plan!<br/>
+                    <b>Please note</b>: Plans that are 5 hours and above need to be activated by us! This is so that you can use up your current plans first (if any)!<br/>
+                    When you wish to activate, please send a WhatsApp message to 8879-9689 to activate your package to start booking classes.<br/>
+                    Once activated, your plan’s validity period will begin.<br/>
+                    You can view the unactivated packages in the app.<br/>
+                    We look forward to seeing you soon!❤<br/>
                     Best Regards,<br/>
                     Elin Dance Studio<br/>
                     <img src="'.config('website_url').'/assets/img/logo3.png" style="width:136px;height:115px">
@@ -112,7 +113,7 @@ class Demo extends Api
         $obj = new Email();
         $result = $obj
             ->to($order['email'])
-            ->subject('Class is Cancelled!')
+            ->subject('Your plan purchase has been received!')
             ->message($message)
             ->send();
         dump($result);

+ 15 - 2
application/index/controller/Plantask.php

@@ -219,11 +219,24 @@ class Plantask extends Controller
         $obj = new Email();
         foreach($task_list as $order){
             try {
+                $message =
+                    'Hi,'.$order['firstname']. ' ' .$order['lastname'].'!<br/>
+                    Thank you for your purchase of the '.$order['name_en'].' plan!<br/>
+                    <b>Please note</b>: Plans that are 5 hours and above need to be activated by us! This is so that you can use up your current plans first (if any)!<br/>
+                    When you wish to activate, please send a WhatsApp message to 8879-9689 to activate your package to start booking classes.<br/>
+                    Once activated, your plan’s validity period will begin.<br/>
+                    You can view the unactivated packages in the app.<br/>
+                    We look forward to seeing you soon!❤<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'].']即日起生效!')
+                    ->subject('Your plan purchase has been received!')
+                    ->message($message)
                     ->send();
 
                 //发whatsapp