thank you page
This commit is contained in:
10
index.php
10
index.php
@@ -164,6 +164,14 @@ $router->get('/manage/{uuid}', function ($uuid) {
|
|||||||
include 'views/common/footer.php';
|
include 'views/common/footer.php';
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$router->get('/thank-you/{uuid}', function ($uuid) {
|
||||||
|
$order = R::findOne('orders', ' uuid = ?', [$uuid]);
|
||||||
|
$guests = R::findAll('guests', ' order_id = ?', [$order->id]);
|
||||||
|
include 'views/common/head.php';
|
||||||
|
include 'views/thankyou.php';
|
||||||
|
include 'views/common/footer.php';
|
||||||
|
});
|
||||||
|
|
||||||
$router->post('/manage/{uuid}', function ($uuid) {
|
$router->post('/manage/{uuid}', function ($uuid) {
|
||||||
if ($uuid !== $_POST['uuid']) {
|
if ($uuid !== $_POST['uuid']) {
|
||||||
throw new Exception('Invalid form submission', 400);
|
throw new Exception('Invalid form submission', 400);
|
||||||
@@ -188,7 +196,7 @@ $router->post('/manage/{uuid}', function ($uuid) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
header('Location: /manage/'.$uuid);
|
header('Location: /thank-you/'.$uuid);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Run it!
|
// Run it!
|
||||||
|
|||||||
42
views/thankyou.php
Normal file
42
views/thankyou.php
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12 mb-12">
|
||||||
|
<div class="mb-12 text-center">
|
||||||
|
<br/><br/>
|
||||||
|
<h1>Thank You!</h1>
|
||||||
|
<p>Please <a href="javascript:window.print()">print this page</a> for your records.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-12 mb-4">
|
||||||
|
<h4 class="d-flex justify-content-between align-items-center mb-3">
|
||||||
|
<span class="text-muted">Receipt #<?=$order->id?></span>
|
||||||
|
</h4>
|
||||||
|
<?php
|
||||||
|
if ($order->payment_type == 1) { ?>
|
||||||
|
<p>Mail or drop off payment within seven days of submitting this form or your tickets will be released
|
||||||
|
for others to purchase<br/>
|
||||||
|
<br/>
|
||||||
|
Mail to:<br/>
|
||||||
|
Attn: Dinner in the Woods<br/>
|
||||||
|
Nature's Classroom<br/>
|
||||||
|
PO Box 660<br/>
|
||||||
|
Mukwonago, WI 53149
|
||||||
|
</p>
|
||||||
|
<?php }else {?>
|
||||||
|
<p>Your payment will be processed by our payment processor Stripe <small>(<?=$order->stripe_token?>)</small></p>
|
||||||
|
<?php } ?>
|
||||||
|
<ul class="list-group mb-3">
|
||||||
|
<?=shoppingCartLineItem('Dinner', $order->ticket_cents, $order->ticket_quantity . ' x tickets');?>
|
||||||
|
<?=shoppingCartLineItem('Cabana', $order->cabana_cents);?>
|
||||||
|
<?=shoppingCartLineItem('Ticket Enhancers', $order->enhancer_cents, $order->enhancer_quantity . ' x enhancers');?>
|
||||||
|
<?=shoppingCartLineItem('Add\'l Contribution', $order->additional_cents);?>
|
||||||
|
<?=shoppingCartTotal($order->total_cents);?>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>We will send you an email notification before the event as a reminder. If you purchased additional tickets for your
|
||||||
|
guests you can <a href="/manage/<?=$order->uuid?>">manage your guests</a>. If you have any questions please email <a href="mailto:deepa@nciw.org">deepa@nciw.org</a></p>
|
||||||
|
<p class="text-center"><a href="/manage/<?=$order->uuid?>" class="btn btn-lg btn-success">Manage Guests</a></p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
Reference in New Issue
Block a user