prepare($sql); $stmt->execute([$order_id, $_SESSION['user_id']]); $order = $stmt->fetch(); if (!$order) { header('Location: orders.php'); exit; } // Fetch order items $sql = " SELECT oi.*, p.name as product_name FROM order_items oi JOIN products p ON oi.product_id = p.id WHERE oi.order_id = ? "; $stmt = $pdo->prepare($sql); $stmt->execute([$order_id]); $order_items = $stmt->fetchAll(); ?>

Order Details #

Order Summary

Total Amount: $

Status:

Date:

Items in this Order

Product Quantity Price Total
$ $
Back to Orders