phpScheduleIt
May 19, 2013, 11:15:22 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: phpScheduleIt 2.4.2 has been released!
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: Email notification  (Read 515 times)
andyrav
Jr. Member
**

Karma: 0
Posts: 68


« on: February 16, 2012, 12:17:07 PM »

Hi
Is it possiable to customise the email subject header?
currently it displays
Your Reservation Was Updated


it is possiable to include the date and title in the subject?

tried changeing       return $this->Translate('ReservationUpdatedSubject');  to return $this->_reservation->Title; but this didnt work
 Embarrassed


cheers
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5403


WWW
« Reply #1 on: February 16, 2012, 03:31:04 PM »

Very close. Try return $this->reservationSeries->Title();
Logged
andyrav
Jr. Member
**

Karma: 0
Posts: 68


« Reply #2 on: February 17, 2012, 03:33:58 AM »

sorry didnt work

public function Subject()
   {
      return $this->reservationSeries->Title();
   }

any ideas?
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5403


WWW
« Reply #3 on: February 21, 2012, 12:39:48 PM »

Sorry, I tested this on the created email. Change line 35 of lib\Email\Messages\ReservationCreatedEmail.php to 

protected $reservationSeries;
Logged
warrenl
Newbie
*

Karma: 0
Posts: 7


« Reply #4 on: December 13, 2012, 05:14:21 PM »

Hi,

Could you explain how to get the Schedule name into the Subject please?
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5403


WWW
« Reply #5 on: December 17, 2012, 11:24:22 AM »

This one's a bit trickier, since the schedule details aren't included as part of the reservation. You'd need to load the schedule from the ScheduleRepository. You can do this in \lib\Application\Reservation\Notification\OwnerEmailNotification.php Notify(). Something like:

$scheduleRepo = new ScheduleRepository();
$schedule = $scheduleRepository->LoadById($reservation->ScheduleId());

Then pass that into the constructor of the ReservationCreatedEmail object. You can then change the Subject() function to   

return $this->Translate('ReservationCreatedSubject', array($schedule->GetName())); and change the language file to include a placeholder for the schedule name
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2006-2007, Simple Machines Valid XHTML 1.0! Valid CSS!