Files
Commerce/placeorder.php
2025-02-19 16:48:48 +01:00

24 lines
650 B
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']);
}
?>
<?=template_header(($place_order_header ?? 'Place order'))?>
<?php if ($error): ?>
<p class="content-wrapper error"><?=$error?></p>
<?php else: ?>
<div class="placeorder content-wrapper">
<h1><?=$h1_order_succes_message?></h1>
<p><?=$order_succes_message?></p>
</div>
<?php endif; ?>
<?=template_footer()?>