Explorar o código

refactor terminology from "Nachbestellung" to "Vorbestellung" across

Medowar hai 2 meses
pai
achega
8b4fedf193
Modificáronse 10 ficheiros con 120 adicións e 80 borrados
  1. 8 8
      admin/backorders.php
  2. 19 13
      admin/index.php
  3. 1 1
      cart.php
  4. 3 3
      checkout.php
  5. 2 2
      config.php
  6. 61 27
      data/reservations.json
  7. 17 17
      includes/functions.php
  8. 1 1
      index.php
  9. 3 3
      product.php
  10. 5 5
      reservation.php

+ 8 - 8
admin/backorders.php

@@ -8,13 +8,13 @@ if (!isset($_SESSION['admin_logged_in']) || !$_SESSION['admin_logged_in']) {
     exit;
 }
 
-$pageTitle = 'Nachbestellungen verwalten';
+$pageTitle = 'Vorbestellungen verwalten';
 
 // Handle availability notification
 if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['notify_available'])) {
     $reservationId = sanitize($_POST['reservation_id']);
     $result = markBackorderAvailable($reservationId);
-    $message = $result['success'] ? 'Kunde wurde informiert, dass die Nachbestellung zur Abholung bereit ist.' : $result['message'];
+    $message = $result['success'] ? 'Kunde wurde informiert, dass die Vorbestellung zur Abholung bereit ist.' : $result['message'];
     $messageType = $result['success'] ? 'success' : 'error';
 }
 
@@ -92,7 +92,7 @@ include __DIR__ . '/../includes/header.php';
 ?>
 
 <div class="admin-header">
-    <h2>Nachbestellungen verwalten</h2>
+    <h2>Vorbestellungen verwalten</h2>
     <div>
         <a href="index.php" class="btn btn-secondary">Zurück zum Dashboard</a>
     </div>
@@ -126,7 +126,7 @@ include __DIR__ . '/../includes/header.php';
 
 <?php if (!empty($summaryRows)): ?>
     <div class="panel">
-        <h3>Übersicht Nachbestellte Artikel</h3>
+        <h3>Übersicht Vorbestellte Artikel</h3>
         <table class="table-compact">
             <thead>
                 <tr>
@@ -151,7 +151,7 @@ include __DIR__ . '/../includes/header.php';
 
 <?php if (empty($reservations)): ?>
     <div class="alert alert-info">
-        <p>Keine Nachbestellungen gefunden.</p>
+        <p>Keine Vorbestellungen gefunden.</p>
     </div>
 <?php else: ?>
     <table>
@@ -193,7 +193,7 @@ include __DIR__ . '/../includes/header.php';
                     </td>
                     <td>
                         <?php if ((!isset($reservation['backorder_status']) || $reservation['backorder_status'] !== 'notified') && canFulfillReservationItems($reservation['items'])): ?>
-                            <form method="POST" style="display: inline;" onsubmit="return confirm('Kunden informieren, dass die Nachbestellung zur Abholung bereit ist?');">
+                            <form method="POST" style="display: inline;" onsubmit="return confirm('Kunden informieren, dass die Vorbestellung zur Abholung bereit ist?');">
                                 <input type="hidden" name="reservation_id" value="<?php echo htmlspecialchars($reservation['id']); ?>">
                                 <button type="submit" name="notify_available" class="btn btn-small">Abholung bereit</button>
                             </form>
@@ -211,7 +211,7 @@ include __DIR__ . '/../includes/header.php';
     <div class="modal-content">
         <button onclick="closeDetails()" class="btn btn-small modal-close">Schließen</button>
         <div id="detailsContent"></div>
-        <form method="POST" id="notifyForm" style="margin-top: 1.5rem; display: none;" onsubmit="return confirm('Kunden informieren, dass die Nachbestellung zur Abholung bereit ist?');">
+        <form method="POST" id="notifyForm" style="margin-top: 1.5rem; display: none;" onsubmit="return confirm('Kunden informieren, dass die Vorbestellung zur Abholung bereit ist?');">
             <input type="hidden" name="reservation_id" id="notifyReservationId" value="">
             <button type="submit" name="notify_available" class="btn">Abholung bereit</button>
         </form>
@@ -242,7 +242,7 @@ function showDetails(reservationId) {
     const statusText = reservation.backorder_status === 'notified' ? 'Informiert' : 'Offen';
     const statusClass = reservation.backorder_status === 'notified' ? 'status-notified' : 'status-open';
     const html = `
-        <h2>Nachbestellungsdetails</h2>
+        <h2>Vorbestellungsdetails</h2>
         <p><strong>Bestellnummer:</strong> <strong class="order-highlight">${reservation.id}</strong></p>
         <p><strong>Kunde:</strong> ${reservation.customer_name}</p>
         <p><strong>E-Mail:</strong> ${reservation.customer_email}</p>

+ 19 - 13
admin/index.php

@@ -36,7 +36,13 @@ $openReservations = count(array_filter($regularReservations, function($r) {
 $pickedUpReservations = count(array_filter($regularReservations, function($r) {
     return $r['picked_up'];
 }));
-$openBackorders = count($backorderReservations);
+$openRegularReservations = array_values(array_filter($regularReservations, function($r) {
+    return $r['status'] === 'open' && !$r['picked_up'];
+}));
+$openPreorders = array_values(array_filter($backorderReservations, function($r) {
+    return !isset($r['backorder_status']) || $r['backorder_status'] !== 'notified';
+}));
+$openBackorders = count($openPreorders);
 
 include __DIR__ . '/../includes/header.php';
 ?>
@@ -46,7 +52,7 @@ include __DIR__ . '/../includes/header.php';
     <div>
         <a href="products.php" class="btn">Produkte verwalten</a>
         <a href="reservations.php" class="btn">Reservierungen</a>
-        <a href="backorders.php" class="btn">Nachbestellungen</a>
+        <a href="backorders.php" class="btn">Vorbestellungen</a>
         <a href="login.php?logout=1" class="btn btn-secondary">Abmelden</a>
     </div>
 </div>
@@ -73,18 +79,18 @@ include __DIR__ . '/../includes/header.php';
     </div>
     
     <div class="stat-card">
-        <h3>Offene Nachbestellungen</h3>
+        <h3>Offene Vorbestellungen</h3>
         <div class="stat-value"><?php echo $openBackorders; ?></div>
     </div>
     
 </div>
 
-<h3 style="margin-top: 2rem;">Letzte Reservierungen</h3>
+<h3 style="margin-top: 2rem;">Offene Reservierungen</h3>
 <?php
-$recentReservations = array_slice(array_reverse($regularReservations), 0, 5);
-if (empty($recentReservations)):
+$openReservationsList = array_slice(array_reverse($openRegularReservations), 0, 5);
+if (empty($openReservationsList)):
 ?>
-    <p>Keine Reservierungen vorhanden.</p>
+    <p>Keine offenen Reservierungen vorhanden.</p>
 <?php else: ?>
     <table>
         <thead>
@@ -97,7 +103,7 @@ if (empty($recentReservations)):
             </tr>
         </thead>
         <tbody>
-            <?php foreach ($recentReservations as $reservation): ?>
+            <?php foreach ($openReservationsList as $reservation): ?>
                 <tr>
                     <td><strong><?php echo htmlspecialchars($reservation['id']); ?></strong></td>
                     <td><?php echo htmlspecialchars($reservation['customer_name']); ?></td>
@@ -122,12 +128,12 @@ if (empty($recentReservations)):
     </table>
 <?php endif; ?>
 
-<h3 style="margin-top: 2rem;">Letzte Nachbestellungen</h3>
+<h3 style="margin-top: 2rem;">Offene Vorbestellungen</h3>
 <?php
-$recentBackorders = array_slice(array_reverse($backorderReservations), 0, 5);
-if (empty($recentBackorders)):
+$openPreordersList = array_slice(array_reverse($openPreorders), 0, 5);
+if (empty($openPreordersList)):
 ?>
-    <p>Keine Nachbestellungen vorhanden.</p>
+    <p>Keine offenen Vorbestellungen vorhanden.</p>
 <?php else: ?>
     <table>
         <thead>
@@ -140,7 +146,7 @@ if (empty($recentBackorders)):
             </tr>
         </thead>
         <tbody>
-            <?php foreach ($recentBackorders as $reservation): ?>
+            <?php foreach ($openPreordersList as $reservation): ?>
                 <tr>
                     <td><strong><?php echo htmlspecialchars($reservation['id']); ?></strong></td>
                     <td><?php echo htmlspecialchars($reservation['customer_name']); ?></td>

+ 1 - 1
cart.php

@@ -93,7 +93,7 @@ include __DIR__ . '/includes/header.php';
                     <p class="stock <?php echo $hasEnoughStock ? 'in-stock' : 'out-of-stock'; ?>">
                         Lagerbestand: <?php echo $itemStock; ?> Stück
                         <?php if (!$hasEnoughStock): ?>
-                            <br><strong class="status status-open">Nachbestellung möglich</strong>
+                            <br><strong class="status status-open">Vorbestellung möglich</strong>
                         <?php endif; ?>
                     </p>
                 </div>

+ 3 - 3
checkout.php

@@ -143,7 +143,7 @@ include __DIR__ . '/includes/header.php';
         <?php endif; ?>
         
         <?php if ($backorderTotal > 0): ?>
-            <h4 style="margin-top: 1.5rem;">Nachbestellung</h4>
+            <h4 style="margin-top: 1.5rem;">Vorbestellung</h4>
             <div class="alert alert-warning" style="margin-bottom: 1rem;">
                 <strong>Hinweis:</strong> Lieferzeiten sind nicht bekannt, da die Bestellung in Chargen erfolgt.
             </div>
@@ -166,7 +166,7 @@ include __DIR__ . '/includes/header.php';
                 <div>Summe sofort verfügbar: <strong><?php echo formatPrice($regularTotal); ?></strong></div>
             <?php endif; ?>
             <?php if ($backorderTotal > 0): ?>
-                <div>Summe Nachbestellung: <strong><?php echo formatPrice($backorderTotal); ?></strong></div>
+                <div>Summe Vorbestellung: <strong><?php echo formatPrice($backorderTotal); ?></strong></div>
             <?php endif; ?>
             <strong style="font-size: 1.2rem;">Gesamtsumme: <?php echo formatPrice($total); ?></strong>
         </div>
@@ -188,7 +188,7 @@ include __DIR__ . '/includes/header.php';
             </div>
             
             <div class="alert alert-info">
-                <strong>Hinweis:</strong> Nach der Reservierung erhalten Sie eine Bestellnummer. Für Nachbestellungen informieren wir Sie, sobald die komplette Bestellung zur Abholung bereit ist.
+                <strong>Hinweis:</strong> Nach der Reservierung erhalten Sie eine Bestellnummer. Für Vorbestellungen informieren wir Sie, sobald die komplette Bestellung zur Abholung bereit ist.
             </div>
             
             <button type="submit" name="create_reservation" class="btn" style="width: 100%;">Reservierung abschließen</button>

+ 2 - 2
config.php

@@ -29,11 +29,11 @@ define('ADMIN_USERS', [
 
 // Reservation settings
 define('RESERVATION_EXPIRY_DAYS', 60);
-define('ORDER_PREFIX', 'ORD'); // Prefix for order number pattern: PREFIX-YEAR-SEQ
+define('ORDER_PREFIX', 'FWFS'); // Prefix for order number pattern: PREFIX-YEAR-SEQ
 
 // Email settings
 define('ADMIN_EMAIL', 'inbox@medowar.de'); // Change to your admin email
-define('FROM_EMAIL', 'shop@medowar.de'); // Change to your sender email
+define('FROM_EMAIL', 'shop@med0.de'); // Change to your sender email
 define('FROM_NAME', SITE_NAME);
 
 // Data file paths

+ 61 - 27
data/reservations.json

@@ -1,77 +1,111 @@
 {
     "reservations": [
         {
-            "id": "RES-2026-001",
-            "code": "6JKXCJ",
+            "id": "FWFS-2026-001",
             "customer_name": "Josef Test",
             "customer_email": "inbox@medowar.de",
             "items": [
                 {
                     "product_id": 1,
-                    "quantity": 10,
-                    "size": "S"
+                    "quantity": 3,
+                    "size": "L"
                 }
             ],
-            "created": "2026-02-08 21:03:07",
-            "expires": "2026-04-09 21:03:07",
+            "created": "2026-02-08 23:50:25",
+            "expires": "2026-04-09 23:50:25",
             "status": "open",
             "picked_up": false,
             "type": "regular"
         },
         {
-            "id": "RES-2026-002",
-            "code": "VPVT2Q",
-            "customer_name": "Josef Test",
+            "id": "FWFS-2026-002",
+            "customer_name": "Testing 123",
             "customer_email": "inbox@medowar.de",
             "items": [
                 {
                     "product_id": 1,
-                    "quantity": 2,
-                    "size": "S"
+                    "quantity": 5,
+                    "size": "L"
                 }
             ],
-            "created": "2026-02-08 21:03:30",
-            "expires": "2026-04-09 21:03:30",
+            "created": "2026-02-08 23:50:58",
+            "expires": "2026-04-09 23:56:38",
             "status": "open",
             "picked_up": false,
             "type": "regular"
         },
         {
-            "id": "RES-2026-003",
-            "code": "4ADCGC",
+            "id": "FWFS-2026-003",
             "customer_name": "Josef Test",
             "customer_email": "inbox@medowar.de",
             "items": [
                 {
-                    "product_id": 2,
-                    "quantity": 2,
-                    "size": "S"
+                    "product_id": 1,
+                    "quantity": 15,
+                    "size": "M"
                 }
             ],
-            "created": "2026-02-08 21:04:10",
-            "expires": "2026-04-09 21:04:10",
+            "created": "2026-02-08 23:52:29",
+            "expires": "2026-04-09 23:52:29",
+            "status": "open",
+            "picked_up": false,
+            "type": "regular"
+        },
+        {
+            "id": "FWFS-2026-004",
+            "customer_name": "Josef test3",
+            "customer_email": "inbox@medowar.de",
+            "items": [
+                {
+                    "product_id": 7,
+                    "quantity": 80
+                }
+            ],
+            "created": "2026-02-08 23:53:56",
+            "expires": "2026-04-09 23:53:56",
             "status": "picked_up",
             "picked_up": true,
             "type": "regular"
         },
         {
-            "id": "RES-2026-004",
-            "code": "GNKV6D",
-            "customer_name": "Josef Test",
+            "id": "FWFS-2026-005",
+            "customer_name": "Josef test3",
             "customer_email": "inbox@medowar.de",
             "items": [
                 {
                     "product_id": 1,
-                    "quantity": 10,
-                    "size": "S"
+                    "quantity": 3,
+                    "size": "M"
+                },
+                {
+                    "product_id": 1,
+                    "quantity": 2,
+                    "size": "L"
                 }
             ],
-            "created": "2026-02-08 21:04:12",
+            "created": "2026-02-08 23:53:58",
             "expires": "",
             "status": "open",
             "picked_up": false,
             "type": "backorder",
-            "backorder_status": "notified"
+            "backorder_status": "pending"
+        },
+        {
+            "id": "FWFS-2026-006",
+            "customer_name": "Inbox Testing mail",
+            "customer_email": "medowar@AllFreeMail.net",
+            "items": [
+                {
+                    "product_id": 1,
+                    "quantity": 2,
+                    "size": "L"
+                }
+            ],
+            "created": "2026-02-09 00:23:51",
+            "expires": "2026-04-10 00:25:03",
+            "status": "open",
+            "picked_up": false,
+            "type": "regular"
         }
     ]
 }

+ 17 - 17
includes/functions.php

@@ -372,10 +372,10 @@ function markBackorderAvailable($reservationId) {
     foreach ($reservations as &$reservation) {
         if ($reservation['id'] === $reservationId) {
             if (!isset($reservation['type']) || $reservation['type'] !== 'backorder') {
-                return ['success' => false, 'message' => 'Diese Nachbestellung wurde bereits in eine Bestellung umgewandelt.'];
+                return ['success' => false, 'message' => 'Diese Vorbestellung wurde bereits in eine Bestellung umgewandelt.'];
             }
             if (isset($reservation['backorder_status']) && $reservation['backorder_status'] === 'notified') {
-                return ['success' => false, 'message' => 'Diese Nachbestellung wurde bereits informiert.'];
+                return ['success' => false, 'message' => 'Diese Vorbestellung wurde bereits informiert.'];
             }
             if (!canFulfillReservationItems($reservation['items'])) {
                 return ['success' => false, 'message' => 'Nicht alle Artikel sind verfügbar.'];
@@ -404,7 +404,7 @@ function markBackorderAvailable($reservationId) {
             return ['success' => true, 'reservation' => $reservation];
         }
     }
-    return ['success' => false, 'message' => 'Nachbestellung nicht gefunden.'];
+    return ['success' => false, 'message' => 'Vorbestellung nicht gefunden.'];
 }
 
 /**
@@ -555,7 +555,7 @@ function sendBackorderEmails($reservation) {
     $itemsHtml .= '</ul>';
     
     // Customer email
-    $customerSubject = 'Nachbestellung bei ' . SITE_NAME;
+    $customerSubject = 'Vorbestellung bei ' . SITE_NAME;
     $customerMessage = '
     <html>
     <head>
@@ -563,27 +563,27 @@ function sendBackorderEmails($reservation) {
     </head>
     <body style="font-family: Arial, sans-serif; line-height: 1.6; color: #f5f7fb; background: #28292a; padding: 1.5rem;">
         <div style="max-width: 640px; margin: 0 auto; background: #2f3541; padding: 1.5rem 2rem; border-radius: 10px; border: 1px solid #3b4252;">
-            <h2 style="color: #cac300; margin-top: 0;">Nachbestellung bestätigt</h2>
+            <h2 style="color: #cac300; margin-top: 0;">Vorbestellung bestätigt</h2>
             <p>Sehr geehrte/r ' . htmlspecialchars($reservation['customer_name']) . ',</p>
-            <p>vielen Dank für Ihre Nachbestellung bei ' . SITE_NAME . '.</p>
+            <p>vielen Dank für Ihre Vorbestellung bei ' . SITE_NAME . '.</p>
             
             <div style="background: #28292a; border: 2px solid #cac300; padding: 1.5rem; margin: 1.5rem 0; border-radius: 8px; text-align: center;">
                 <h3 style="margin-top: 0; color: #f5f7fb;">Ihre Bestellnummer:</h3>
                 <h2 style="font-size: 2rem; letter-spacing: 0.2rem; color: #cac300; font-family: monospace;">' . htmlspecialchars($reservation['id']) . '</h2>
             </div>
             
-            <h3>Nachbestellungsdetails:</h3>
+            <h3>Vorbestellungsdetails:</h3>
             <p><strong>Bestellnummer:</strong> ' . htmlspecialchars($reservation['id']) . '</p>
             <p><strong>Erstellt am:</strong> ' . formatDate($reservation['created']) . '</p>
             
-            <h3>Nachbestellte Artikel:</h3>
+            <h3>Vorbestellte Artikel:</h3>
             ' . $itemsHtml . '
             
             <div style="background: #28292a; border: 2px solid #cf2e2e; padding: 1.5rem; margin: 1.5rem 0; border-radius: 8px;">
                 <strong>Hinweis:</strong> Die Lieferzeiten sind nicht bekannt, da die Bestellung in Chargen erfolgt.
             </div>
             
-            <p>Wir informieren Sie, sobald die komplette Nachbestellung zur Abholung bereit ist.</p>
+            <p>Wir informieren Sie, sobald die komplette Vorbestellung zur Abholung bereit ist.</p>
             
             <p>Mit freundlichen Grüßen<br>' . SITE_NAME . '</p>
         </div>
@@ -593,7 +593,7 @@ function sendBackorderEmails($reservation) {
     sendEmail($reservation['customer_email'], $customerSubject, $customerMessage);
     
     // Admin email
-    $adminSubject = 'Neue Nachbestellung: ' . $reservation['id'];
+    $adminSubject = 'Neue Vorbestellung: ' . $reservation['id'];
     $adminMessage = '
     <html>
     <head>
@@ -601,8 +601,8 @@ function sendBackorderEmails($reservation) {
     </head>
     <body style="font-family: Arial, sans-serif; line-height: 1.6; color: #f5f7fb; background: #28292a; padding: 1.5rem;">
         <div style="max-width: 640px; margin: 0 auto; background: #2f3541; padding: 1.5rem 2rem; border-radius: 10px; border: 1px solid #3b4252;">
-            <h2 style="color: #cac300; margin-top: 0;">Neue Nachbestellung</h2>
-            <p>Eine neue Nachbestellung wurde erstellt:</p>
+            <h2 style="color: #cac300; margin-top: 0;">Neue Vorbestellung</h2>
+            <p>Eine neue Vorbestellung wurde erstellt:</p>
             
             <div style="background: #28292a; border: 2px solid #cac300; padding: 1.5rem; margin: 1.5rem 0; border-radius: 8px;">
                 <h3 style="margin-top: 0;">Bestellnummer:</h3>
@@ -613,11 +613,11 @@ function sendBackorderEmails($reservation) {
             <p><strong>Name:</strong> ' . htmlspecialchars($reservation['customer_name']) . '</p>
             <p><strong>E-Mail:</strong> ' . htmlspecialchars($reservation['customer_email']) . '</p>
             
-            <h3>Nachbestellungsdetails:</h3>
+            <h3>Vorbestellungsdetails:</h3>
             <p><strong>Bestellnummer:</strong> ' . htmlspecialchars($reservation['id']) . '</p>
             <p><strong>Erstellt am:</strong> ' . formatDate($reservation['created']) . '</p>
             
-            <h3>Nachbestellte Artikel:</h3>
+            <h3>Vorbestellte Artikel:</h3>
             ' . $itemsHtml . '
             
             <p><strong>Hinweis:</strong> Lieferzeiten sind nicht bekannt, Bestellung in Chargen.</p>
@@ -645,7 +645,7 @@ function sendBackorderAvailableEmail($reservation) {
     }
     $itemsHtml .= '</ul>';
     
-    $subject = 'Ihre Nachbestellung ist zur Abholung bereit';
+    $subject = 'Ihre Vorbestellung ist zur Abholung bereit';
     $message = '
     <html>
     <head>
@@ -653,9 +653,9 @@ function sendBackorderAvailableEmail($reservation) {
     </head>
     <body style="font-family: Arial, sans-serif; line-height: 1.6; color: #f5f7fb; background: #28292a; padding: 1.5rem;">
         <div style="max-width: 640px; margin: 0 auto; background: #2f3541; padding: 1.5rem 2rem; border-radius: 10px; border: 1px solid #3b4252;">
-            <h2 style="color: #cac300; margin-top: 0;">Nachbestellung zur Abholung bereit</h2>
+            <h2 style="color: #cac300; margin-top: 0;">Vorbestellung zur Abholung bereit</h2>
             <p>Sehr geehrte/r ' . htmlspecialchars($reservation['customer_name']) . ',</p>
-            <p>Ihre komplette Nachbestellung ist jetzt zur Abholung bereit.</p>
+            <p>Ihre komplette Vorbestellung ist jetzt zur Abholung bereit.</p>
             
             <div style="background: #28292a; border: 2px solid #cac300; padding: 1.5rem; margin: 1.5rem 0; border-radius: 8px; text-align: center;">
                 <h3 style="margin-top: 0; color: #f5f7fb;">Ihre Bestellnummer:</h3>

+ 1 - 1
index.php

@@ -49,7 +49,7 @@ include __DIR__ . '/includes/header.php';
                         <?php if ($totalStock > 0): ?>
                             Verfügbar (<?php echo $totalStock; ?> Stück)
                         <?php else: ?>
-                            Ausverkauft - Nachbestellung möglich
+                            Ausverkauft - Vorbestellung möglich
                         <?php endif; ?>
                     </div>
                     <a href="product.php?id=<?php echo $product['id']; ?>" class="btn" style="width: 100%; text-align: center; margin-top: 1rem;">Details ansehen</a>

+ 3 - 3
product.php

@@ -115,7 +115,7 @@ include __DIR__ . '/includes/header.php';
                     Verfügbar (<?php echo $totalStock; ?> Stück)
                 <?php endif; ?>
             <?php else: ?>
-                Ausverkauft - Nachbestellung möglich
+                Ausverkauft - Vorbestellung möglich
             <?php endif; ?>
         </div>
         
@@ -138,7 +138,7 @@ include __DIR__ . '/includes/header.php';
                             $sizeStock = isset($stockBySize[$sizeOption]) ? (int)$stockBySize[$sizeOption] : 0;
                         ?>
                             <option value="<?php echo htmlspecialchars($sizeOption); ?>" data-stock="<?php echo $sizeStock; ?>">
-                                <?php echo htmlspecialchars($sizeOption); ?><?php echo $sizeStock <= 0 ? ' (Ausverkauft - Nachbestellung möglich)' : " ($sizeStock verfügbar)"; ?>
+                                <?php echo htmlspecialchars($sizeOption); ?><?php echo $sizeStock <= 0 ? ' (Ausverkauft - Vorbestellung möglich)' : " ($sizeStock verfügbar)"; ?>
                             </option>
                         <?php endforeach; ?>
                     </select>
@@ -150,7 +150,7 @@ include __DIR__ . '/includes/header.php';
             </div>
             <?php if (!$hasStock): ?>
                 <div class="alert alert-warning">
-                    <strong>Hinweis:</strong> Dieses Produkt wird nachbestellt. Lieferzeiten sind nicht bekannt.
+                    <strong>Hinweis:</strong> Dieses Produkt wird vorbestellt. Lieferzeiten sind nicht bekannt.
                 </div>
             <?php endif; ?>
             <button type="submit" name="add_to_cart" class="btn" style="width: 100%;">In den Warenkorb</button>

+ 5 - 5
reservation.php

@@ -110,25 +110,25 @@ include __DIR__ . '/includes/header.php';
 <?php if ($backorderReservation): ?>
     <?php $backorderItems = buildReservationItems($backorderReservation); ?>
     <div class="alert alert-warning" style="margin-top: 2rem;">
-        <h2>Nachbestellung bestätigt</h2>
-        <p>Vielen Dank für Ihre Nachbestellung, <?php echo htmlspecialchars($backorderReservation['customer_name']); ?>.</p>
+        <h2>Vorbestellung bestätigt</h2>
+        <p>Vielen Dank für Ihre Vorbestellung, <?php echo htmlspecialchars($backorderReservation['customer_name']); ?>.</p>
     </div>
 
     <div class="order-number">
         <h3>Ihre Bestellnummer:</h3>
         <h2><?php echo htmlspecialchars($backorderReservation['id']); ?></h2>
-        <p>Bitte notieren Sie sich diese Bestellnummer. Wir informieren Sie, sobald die komplette Nachbestellung zur Abholung bereit ist.</p>
+        <p>Bitte notieren Sie sich diese Bestellnummer. Wir informieren Sie, sobald die komplette Vorbestellung zur Abholung bereit ist.</p>
     </div>
 
     <div class="panel" style="padding: 2rem; margin: 2rem 0;">
-        <h3>Nachbestellungsdetails</h3>
+        <h3>Vorbestellungsdetails</h3>
         
         <p><strong>Bestellnummer:</strong> <?php echo htmlspecialchars($backorderReservation['id']); ?></p>
         <p><strong>Name:</strong> <?php echo htmlspecialchars($backorderReservation['customer_name']); ?></p>
         <p><strong>E-Mail:</strong> <?php echo htmlspecialchars($backorderReservation['customer_email']); ?></p>
         <p><strong>Erstellt am:</strong> <?php echo formatDate($backorderReservation['created']); ?></p>
         
-        <h4 style="margin-top: 1.5rem;">Nachbestellte Artikel:</h4>
+        <h4 style="margin-top: 1.5rem;">Vorbestellte Artikel:</h4>
         <table style="margin-top: 1rem;">
             <thead>
                 <tr>