-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathorders.php
More file actions
41 lines (39 loc) · 1.28 KB
/
orders.php
File metadata and controls
41 lines (39 loc) · 1.28 KB
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
<?php
require_once("./bootstrap.php");
if (!isUserLoggedIn()) {
header("Location: login.php");
exit;
}
$templateParams["titolo"] = "Campus Shop - Ordini";
$orders = $dbh->getOrdersIdByClientId($_SESSION["userId"]);
include("./layouts/header.php");
?>
<div class="container-xl">
<div class="row mx-0">
<div class="col text-center">
<div class="text-capitalize pt-5 pb-2 h1">
Ordini
</div>
</div>
</div>
<?php if (count($orders) == 1) : ?>
<div class="row mx-0">
<div class="col text-center">
<div class="text-capitalize pt-5 pb-2 h3">
Nessun Ordine
</div>
</div>
</div>
<?php endif; ?>
</div>
<?php
foreach ($orders as $order) {
foreach ($dbh->getShippingsFromOrder($order) as $shipping) {
$templateParams['gridTitle'] = "Spedizione n: " . $shipping;
$templateParams['shippingStatus'] = "Stato spedizione: " . $dbh->getShippingStatus($shipping);
$templateParams['products'] = $dbh->getProductsFromShipping($shipping);
$templateParams['cost'] = $dbh->getShippingCost($shipping);
include('./user/shippingGrid.php');
}
}
include("./layouts/footer.php");