fix missing tokens

This commit is contained in:
2017-07-01 23:32:32 +10:00
parent 71c0cbb26b
commit dc2f10fee3
2 changed files with 6 additions and 12 deletions

View File

@@ -17,6 +17,7 @@ function _booking_registration_email($nid, $balance_payment, $manual = false) {
//load the node matching this id
$node = node_load($nid);
$tokens = booking_define_personspecific_tokens($node);
watchdog('booking', 'Sending registration email to !first !last',
array('!first' => $node->booking_firstname, '!last' => $node->booking_lastname));
@@ -51,7 +52,7 @@ function _booking_registration_email($nid, $balance_payment, $manual = false) {
array(
'module' => 'booking',
'key' => 'registration_mail',
'body' => _booking_registration_email_generate($node, $waiting_list, $balance_payment, $manual),
'body' => _booking_registration_email_generate($node, $tokens, $waiting_list, $balance_payment, $manual),
'subject' => $subject,
'footer' => $message_footer,
));
@@ -59,7 +60,7 @@ function _booking_registration_email($nid, $balance_payment, $manual = false) {
$params['body'] = $html_body;
}
else {
$body = _booking_registration_email_generate($node, $waiting_list, $balance_payment, $manual);
$body = _booking_registration_email_generate($node, $tokens, $waiting_list, $balance_payment, $manual);
$params['body'] = $body;
}
@@ -159,9 +160,9 @@ function _booking_regn_notifyonly_email($node, $balance_payment) {
* @param $waiting_list - whether this registration is on on the waiting list
* @return array containing email text
*/
function _booking_registration_email_generate($node, $waiting_list, $balance_payment, $manual) {
function _booking_registration_email_generate($node, $tokens, $waiting_list, $balance_payment, $manual) {
global $event;
$tokens = booking_define_personspecific_tokens($node);
//$tokens = booking_define_personspecific_tokens($node);
$body = "";
if ($balance_payment == True) {

View File

@@ -296,14 +296,7 @@ a[x-apple-data-detectors=true] {
<!--[if mso]><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding-right: 10px; padding-left: 10px; padding-top: 10px; padding-bottom: 25px;"><![endif]-->
<div style="font-family:Verdana, Geneva, sans-serif;line-height:120%;color:#C4C4C4; padding-right: 10px; padding-left: 10px; padding-top: 10px; padding-bottom: 25px;">
<div style="font-size:12px;line-height:14px;font-family:Verdana, Geneva, sans-serif;color:#C4C4C4;text-align:left;">
<?php print $footer ?>
<!--
<p style="margin: 0;font-size: 12px;line-height: 14px">Our preferred method of contact is via email.<br><a style="color:#769FBB;text-decoration: underline;" title="info@studyweek.net" href="mailto:info@studyweek.net">info@studyweek.net</a><br></p>
<p style="margin: 0;font-size: 12px;line-height: 14px">&#160;<br></p><p style="margin: 0;font-size: 12px;line-height: 14px">If you have an enquiry regarding your booking.<br><a style="color:#769FBB;color:#769FBB;color:#769FBB;text-decoration: underline;" title="bookings@studyweek.net" href="mailto:bookings@studyweek.net">bookings@studyweek.net</a><br></p>
<p style="margin: 0;font-size: 12px;line-height: 14px">&#160;<br></p><p style="margin: 0;font-size: 12px;line-height: 14px">Need to speak to the right person?<br>Speak to our bookings coordinator - <a style="color:#769FBB;color:#769FBB;color:#769FBB;color:#769FBB;color:#769FBB;text-decoration: underline;" title="tel:0423637024" href="tel:0423637024">0423 637 024</a></p>
-->
</div>
<div style="font-size:12px;line-height:14px;font-family:Verdana, Geneva, sans-serif;color:#C4C4C4;text-align:left;"><?php print $footer ?></div>
</div>
<!--[if mso]></td></tr></table><![endif]-->