diff --git a/header.php b/header.php
index d01b85e..493fc57 100644
--- a/header.php
+++ b/header.php
@@ -2063,88 +2063,100 @@ if ($_SESSION["userId"] <> "") {
No items in the cart";
+ } else {
foreach ($order_data as $order) {
- // Ensure that the required data is available before accessing it
if (isset($order['status']) && $order['status'] === 'CART' && isset($order['items'][0]['product'])) {
+ $cartEmpty = false;
$totalAmount += $order['total_amount'];
$product = getProduct($order['items'][0]['product']['product_id']);
$product_data = json_decode($product, true);
- ?>
-