38 lines
1.2 KiB
PHP
38 lines
1.2 KiB
PHP
<?php
|
|
// Prevent direct access to file
|
|
defined(security_key) or exit;
|
|
// Remove all the products in cart, the variable is no longer needed as the order has been processed
|
|
if (isset($_SESSION['cart'])) {
|
|
unset($_SESSION['cart']);
|
|
}
|
|
// Remove discount code
|
|
if (isset($_SESSION['discount'])) {
|
|
unset($_SESSION['discount']);
|
|
}
|
|
|
|
$view = template_header(($place_order_header ?? 'Place order'),'');
|
|
|
|
if ($error){
|
|
$view .= '
|
|
<p class="content-wrapper error">'.$error.'</p>';
|
|
}
|
|
else{
|
|
$view .= '
|
|
<div class="order-confirmation">
|
|
<div class="order-confirmation__container">
|
|
<div class="order-confirmation__icon">
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="48" height="48" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path>
|
|
<polyline points="22 4 12 14.01 9 11.01"></polyline>
|
|
</svg>
|
|
</div>
|
|
<h1 class="order-confirmation__title">'.$h1_order_succes_message.'</h1>
|
|
<p class="order-confirmation__message">'.$order_succes_message.'</p>
|
|
</div>
|
|
</div>
|
|
';
|
|
}
|
|
|
|
$view .= template_footer();
|
|
|
|
echo $view; |