-
Notifications
You must be signed in to change notification settings - Fork 23
/
booking_complete.php
49 lines (32 loc) · 1.04 KB
/
booking_complete.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
// This is the booking receipt page
require('rezgo/include/page_header.php');
// start a new instance of RezgoSite
$site = new RezgoSite();
// grab and decode the trans_num if it was set
$trans_num = $site->decode($_REQUEST['trans_num']);
// send the user home if they shoulden't be here
if(!$trans_num) $site->sendTo($site->base."/booking-not-found");
// start a session so we can grab the analytics code
session_start();
// empty the cart
$site->clearCart();
$site->setMetaTags('<meta name="robots" content="noindex, nofollow">');
?>
<?php echo $site->getTemplate('frame_header')?>
<?php if (strlen($trans_num) == 16) { ?>
<?php echo $site->getTemplate('booking_order')?>
<?php
$ga_add_transacton = "
ga('ecommerce:addTransaction', {
'id': '$trans_num',
'affiliation': '$c',
'revenue': '$cart_total',
'currency': '".$site->getBookingCurrency()."'
});
";
?>
<?php } else { ?>
<?php echo $site->getTemplate('booking_complete')?>
<?php } ?>
<?php echo $site->getTemplate('frame_footer')?>