Booked Scheduler Community Support
February 23, 2018, 08:19:11 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Booked is proud to recommend Shift Capsule in the employee shift scheduling space www.ShiftCapsule.com
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: Add Terms of Use attachment to new reservations  (Read 117 times)
katcher
Newbie
*

Karma: 0
Posts: 4


« on: January 31, 2018, 04:01:25 PM »

Hello,

We would like to send a Terms of use document to all new reservations.  I have seen this discussed in numerous topics.  I have not however been able to solve.  Can someone provide some guidance?

Thanks

Eric
Logged
TechCoder
Hero Member
*****

Karma: 5
Posts: 1487

Need Booked API/App/Plugin? http://bit.ly/23EutBO


WWW
« Reply #1 on: January 31, 2018, 09:55:03 PM »

I'm not sure what you mean by "new" reservations (do you want to keep track of users that have received the Terms document and not send to them - i.e., they are 'old'??)

However, if you want to send this Terms document, you can do several things:

1) mod the associated .tpl file with the 'reservation added' email.  This would work, though it requires the user to be accepting that email (in their profile).

2) make a PostReservation plugin that would send out an email with the attachment.  While this would be the better method if not sending to some 'old' (guessed above) list, it seems a bit of an odd UX to get this 'disjointed' email.

3) Use a Custom Attribute to have a checkbox they are required to check.  Something like "I agree to the Terms of use".  While this has (IMHO) the best UX, the user should be given some way to actually read the Terms document.

That's my 'top 3' ways to go about it - none 'out of the box', though any would be moderately simple to do (for someone that knows the system).

Should you require professional assistance in such things, we are happy to provide a quote (we've done a lot of custom modifications for clients all over the world - from plugins to full blown apps).

=========================================================
               Plugins, Custom Development and Support for booked scheduler
https://CashFlowProducts.com/helpdesk  <<<<==== Click here to get the help you need!
=========================================================
Logged
katcher
Newbie
*

Karma: 0
Posts: 4


« Reply #2 on: February 01, 2018, 05:29:11 PM »

Thanks for the reply.

We are using Version 2.6.8 of booked.  All I want is to attach a pdf to all New reservations.  I do not care if they have already received it.

I have modified lib/Email/EmailService.php to check for the Subject line of the email and append an additional attachment.

Approx Line 92

      if( ((strpos($this->phpMailer->Subject, 'Reservation Created for') !== false) && (strpos($this->phpMailer->Subject, 'Reservation Created for') == '0')))
      {
         Log::Debug('Adding Policy PDF to Created Reservation:[ %s ]', 'uploads\xxx-attachments\policy.pdf');
         $this->phpMailer->addStringAttachment('uploads\xxx-attachments\policy.pdf', 'Booking-policy.pdf');
      }

I realize the shortcomings here as the subject line will differ based on language.  
Is there another way that I can identify if this is a new reservation?  Also, is there any way I can force the notification on create to true?  I can probably hide the activate/deactivate buttons using css if needed.

Eric
Logged
Pages: [1]
  Print  
 
Jump to:  

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