|
@@ -140,8 +140,9 @@ class Lessonslot extends Backend
|
|
|
|
|
|
//课时
|
|
|
$info = Db::name('lesson_slot')->alias('slot')
|
|
|
- ->field('slot.*,lesson.name,lesson.name_en,lesson.image,lesson.price')
|
|
|
+ ->field('slot.*,lesson.name,lesson.name_en,lesson.image,lesson.price,coach.nickname as coach_nickname')
|
|
|
->join('lesson','slot.lesson_id = lesson.id','LEFT')
|
|
|
+ ->join('coach','slot.coach_ids = coach.id','LEFT')
|
|
|
->where('slot.id',$slot_id)->where('slot.status',0)->find();
|
|
|
if(empty($info)){
|
|
|
$this->error('课程可能已取消,请刷新重试');
|
|
@@ -300,11 +301,27 @@ class Lessonslot extends Backend
|
|
|
$userinfo = Db::name('user')->where('id',$user_id)->find();
|
|
|
$obj = new Email();
|
|
|
try {
|
|
|
+ $message =
|
|
|
+ 'Hi,'.$userinfo['firstname']. ' ' .$userinfo['lastname'].'!<br/>
|
|
|
+ Your booking is confirmed and you’re all set now to fly with us! Here are the details of your booking:
|
|
|
+ Class:'.$info['name_en'].'<br/>
|
|
|
+ Instructor:'.$info['coach_nickname'].'<br/>
|
|
|
+ Date: '.date('d F Y',$info['starttime']).'<br/>
|
|
|
+ Time: '.date('H:i a',$info['starttime']).'<br/>
|
|
|
+ Please arrive 10 minutes before the class timing to prepare for the harness fitting!<br/>
|
|
|
+ We are located at 450 Alexandra Road, #02-01,<br/>
|
|
|
+ Singapore 119960. For those who are driving, parking is available on level 2 of the building. For those who are taking public transport, the nearest mrt is Labrador Park MRT (7-10 minutes walk) and there is also a bus stop available just outside the building!<br/>
|
|
|
+ We look forward to seeing you for an amazing session! ❤<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($userinfo['email'])
|
|
|
- ->subject('Elin Dance Studio 已帮您预约课程')
|
|
|
- ->message('Hi,'.$userinfo['firstname']. ' ' .$userinfo['lastname'].',已帮您预约课程['.$info['name_en'].'],上课时间:'.date('Y-m-d H:i',$info['starttime']).',请及时来上课!')
|
|
|
+ ->subject('You are now booked in for this class! ')
|
|
|
+ ->message($message)
|
|
|
->send();
|
|
|
|
|
|
//发whatsapp
|