add booking uuid as a token

This commit is contained in:
Nathan Coad
2018-01-19 11:03:31 +11:00
parent 796b910a85
commit 0c9754e41b

View File

@@ -421,6 +421,10 @@ function booking_token_info() {
'name' => t('Confirm Payment Link'),
'description' => t('If using paypal, the link to the booking confirmation page to complete a registration.')
);
$info['tokens']['booking']['booking-uuid'] = array(
'name' => t('Unique User ID'),
'description' => t('The unique user id used to create links to forms such as payment and travel.')
);
$info['tokens']['booking']['paypal-deposit-amount'] = array(
'name' => t('Paypal Deposit Only'),
'description' => t('The deposit amount required to confirm the registration including paypal fees.')
@@ -614,6 +618,7 @@ function booking_define_personspecific_tokens($node)
$tokens['lname'] = ucwords(trim($node->booking_lastname));
$tokens['dietary'] = ucwords(trim($node->booking_dietary));
$tokens['booking-id'] = $node->nid;
$tokens['booking-uuid'] = $tempid;
$tokens['payment-required'] = _booking_amount_owing($node, $amount_paid, FALSE);
$tokens['refund-due'] = $node->booking_refund_due;
$tokens['waitinglist-position'] = $result->num_ppl - variable_get('booking_regn_limit',350) + 1;