Kaynağa Gözat

finishing restyling, adding backorder übersicht

Medowar 2 ay önce
ebeveyn
işleme
0f61597f5b
11 değiştirilmiş dosya ile 225 ekleme ve 138 silme
  1. 78 13
      admin/backorders.php
  2. 5 5
      admin/index.php
  3. 2 2
      admin/login.php
  4. 2 2
      admin/products.php
  5. 11 9
      admin/reservations.php
  6. 10 0
      assets/css/style.css
  7. 1 1
      cart.php
  8. 4 4
      checkout.php
  9. 108 98
      includes/functions.php
  10. 1 1
      product.php
  11. 3 3
      reservation.php

+ 78 - 13
admin/backorders.php

@@ -14,7 +14,7 @@ $pageTitle = 'Nachbestellungen verwalten';
 if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['notify_available'])) {
     $reservationId = sanitize($_POST['reservation_id']);
     $result = markBackorderAvailable($reservationId);
-    $message = $result['success'] ? 'Kunde wurde über die Verfügbarkeit informiert.' : $result['message'];
+    $message = $result['success'] ? 'Kunde wurde informiert, dass die Nachbestellung zur Abholung bereit ist.' : $result['message'];
     $messageType = $result['success'] ? 'success' : 'error';
 }
 
@@ -54,6 +54,45 @@ foreach ($reservations as $reservation) {
     $canNotifyMap[$reservation['id']] = !$isNotified && canFulfillReservationItems($reservation['items']);
 }
 
+$productsById = [];
+foreach (getProducts() as $product) {
+    $productsById[$product['id']] = $product;
+}
+
+$backorderSummary = [];
+foreach ($reservations as $reservation) {
+    foreach ($reservation['items'] as $item) {
+        $productId = $item['product_id'];
+        if (!isset($productsById[$productId])) {
+            continue;
+        }
+        $sizeLabel = isset($item['size']) && $item['size'] !== '' ? $item['size'] : '';
+        $key = $productId . '|' . $sizeLabel;
+        if (!isset($backorderSummary[$key])) {
+            $backorderSummary[$key] = [
+                'name' => $productsById[$productId]['name'],
+                'size' => $sizeLabel,
+                'quantity' => 0
+            ];
+        }
+        $backorderSummary[$key]['quantity'] += (int)$item['quantity'];
+    }
+}
+
+$summaryRows = array_values($backorderSummary);
+usort($summaryRows, function($a, $b) {
+    $nameCompare = strcasecmp($a['name'], $b['name']);
+    if ($nameCompare !== 0) {
+        return $nameCompare;
+    }
+    return strcasecmp($a['size'], $b['size']);
+});
+
+$summaryTotal = 0;
+foreach ($summaryRows as $row) {
+    $summaryTotal += $row['quantity'];
+}
+
 include __DIR__ . '/../includes/header.php';
 ?>
 
@@ -70,7 +109,7 @@ include __DIR__ . '/../includes/header.php';
     </div>
 <?php endif; ?>
 
-<div style="background: white; padding: 1.5rem; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); margin-bottom: 2rem;">
+<div class="panel">
     <form method="GET" style="display: flex; gap: 1rem; align-items: end; flex-wrap: wrap;">
         <div style="flex: 1; min-width: 200px;">
             <label for="code">Code/ID suchen:</label>
@@ -91,6 +130,31 @@ include __DIR__ . '/../includes/header.php';
     </form>
 </div>
 
+<?php if (!empty($summaryRows)): ?>
+    <div class="panel">
+        <h3>Übersicht Nachbestellte Artikel</h3>
+        <table class="table-compact">
+            <thead>
+                <tr>
+                    <th>Produkt</th>
+                    <th>Größe</th>
+                    <th>Menge</th>
+                </tr>
+            </thead>
+            <tbody>
+                <?php foreach ($summaryRows as $row): ?>
+                    <tr>
+                        <td><?php echo htmlspecialchars($row['name']); ?></td>
+                        <td><?php echo $row['size'] !== '' ? htmlspecialchars($row['size']) : '—'; ?></td>
+                        <td><?php echo (int)$row['quantity']; ?></td>
+                    </tr>
+                <?php endforeach; ?>
+            </tbody>
+        </table>
+        <p class="mt-2"><strong>Gesamt:</strong> <?php echo (int)$summaryTotal; ?> Artikel</p>
+    </div>
+<?php endif; ?>
+
 <?php if (empty($reservations)): ?>
     <div class="alert alert-info">
         <p>Keine Nachbestellungen gefunden.</p>
@@ -127,17 +191,17 @@ include __DIR__ . '/../includes/header.php';
                     <td>
                         <?php
                         if (isset($reservation['backorder_status']) && $reservation['backorder_status'] === 'notified') {
-                            echo '<span style="color: #28a745;">Informiert</span>';
+                            echo '<span class="status status-notified">Informiert</span>';
                         } else {
-                            echo '<span style="color: #ffc107;">Offen</span>';
+                            echo '<span class="status status-open">Offen</span>';
                         }
                         ?>
                     </td>
                     <td>
                         <?php if ((!isset($reservation['backorder_status']) || $reservation['backorder_status'] !== 'notified') && canFulfillReservationItems($reservation['items'])): ?>
-                            <form method="POST" style="display: inline;" onsubmit="return confirm('Kunde über Verfügbarkeit informieren?');">
+                            <form method="POST" style="display: inline;" onsubmit="return confirm('Kunden informieren, dass die Nachbestellung 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 freigeben</button>
+                                <button type="submit" name="notify_available" class="btn btn-small">Abholung bereit</button>
                             </form>
                         <?php endif; ?>
                         <button onclick="showDetails('<?php echo htmlspecialchars($reservation['id']); ?>')" class="btn btn-secondary btn-small">Details</button>
@@ -149,13 +213,13 @@ include __DIR__ . '/../includes/header.php';
 <?php endif; ?>
 
 <!-- Details Modal -->
-<div id="detailsModal" style="display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1000; align-items: center; justify-content: center;">
-    <div style="background: white; padding: 2rem; border-radius: 8px; max-width: 1000px; max-height: 95vh; overflow-y: auto; position: relative;">
-        <button onclick="closeDetails()" style="position: absolute; top: 1rem; right: 1rem; background: #dc3545; color: white; border: none; border-radius: 4px; padding: 0.5rem 1rem; cursor: pointer;">Schließen</button>
+<div id="detailsModal" class="modal">
+    <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('Kunde über Verfügbarkeit informieren?');">
+        <form method="POST" id="notifyForm" style="margin-top: 1.5rem; display: none;" onsubmit="return confirm('Kunden informieren, dass die Nachbestellung zur Abholung bereit ist?');">
             <input type="hidden" name="reservation_id" id="notifyReservationId" value="">
-            <button type="submit" name="notify_available" class="btn">Abholung freigeben</button>
+            <button type="submit" name="notify_available" class="btn">Abholung bereit</button>
         </form>
     </div>
 </div>
@@ -182,14 +246,15 @@ function showDetails(reservationId) {
     itemsHtml += '</ul>';
     
     const statusText = reservation.backorder_status === 'notified' ? 'Informiert' : 'Offen';
+    const statusClass = reservation.backorder_status === 'notified' ? 'status-notified' : 'status-open';
     const html = `
         <h2>Nachbestellungsdetails</h2>
         <p><strong>Nachbestellungsnummer:</strong> ${reservation.id}</p>
-        <p><strong>Abholcode:</strong> <strong style="font-size: 1.5rem; color: #c41e3a;">${reservation.code}</strong></p>
+        <p><strong>Abholcode:</strong> <strong class="code-highlight">${reservation.code}</strong></p>
         <p><strong>Kunde:</strong> ${reservation.customer_name}</p>
         <p><strong>E-Mail:</strong> ${reservation.customer_email}</p>
         <p><strong>Erstellt:</strong> ${reservation.created}</p>
-        <p><strong>Status:</strong> ${statusText}</p>
+        <p><strong>Status:</strong> <span class="status ${statusClass}">${statusText}</span></p>
         ${itemsHtml}
     `;
     

+ 5 - 5
admin/index.php

@@ -114,11 +114,11 @@ if (empty($recentReservations)):
                     <td>
                         <?php
                         if ($reservation['picked_up']) {
-                            echo '<span style="color: #28a745;">Abgeholt</span>';
+                            echo '<span class="status status-picked">Abgeholt</span>';
                         } elseif ($reservation['status'] === 'expired') {
-                            echo '<span style="color: #dc3545;">Abgelaufen</span>';
+                            echo '<span class="status status-expired">Abgelaufen</span>';
                         } else {
-                            echo '<span style="color: #ffc107;">Offen</span>';
+                            echo '<span class="status status-open">Offen</span>';
                         }
                         ?>
                     </td>
@@ -157,9 +157,9 @@ if (empty($recentBackorders)):
                     <td>
                         <?php
                         if (isset($reservation['backorder_status']) && $reservation['backorder_status'] === 'notified') {
-                            echo '<span style="color: #28a745;">Informiert</span>';
+                            echo '<span class="status status-notified">Informiert</span>';
                         } else {
-                            echo '<span style="color: #ffc107;">Offen</span>';
+                            echo '<span class="status status-open">Offen</span>';
                         }
                         ?>
                     </td>

+ 2 - 2
admin/login.php

@@ -56,7 +56,7 @@ if (isset($_SESSION['admin_logged_in']) && $_SESSION['admin_logged_in']) {
                 </div>
             <?php endif; ?>
             
-            <form method="POST" style="background: white; padding: 2rem; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1);">
+            <form method="POST" class="panel" style="padding: 2rem;">
                 <div class="form-group">
                     <label for="username">Benutzername:</label>
                     <input type="text" id="username" name="username" required autofocus>
@@ -69,7 +69,7 @@ if (isset($_SESSION['admin_logged_in']) && $_SESSION['admin_logged_in']) {
             </form>
             
             <div style="text-align: center; margin-top: 1rem;">
-                <a href="<?php echo SITE_URL; ?>/index.php" style="color: #6c757d;">Zurück zum Shop</a>
+                <a href="<?php echo SITE_URL; ?>/index.php">Zurück zum Shop</a>
             </div>
         </div>
     </main>

+ 2 - 2
admin/products.php

@@ -135,7 +135,7 @@ include __DIR__ . '/../includes/header.php';
 <?php endif; ?>
 
 <?php if ($editingProduct): ?>
-    <div style="background: white; padding: 2rem; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); margin-bottom: 2rem;">
+    <div class="panel" style="padding: 2rem;">
         <h3>Produkt bearbeiten</h3>
         <form method="POST">
             <input type="hidden" name="product_id" value="<?php echo $editingProduct['id']; ?>">
@@ -224,7 +224,7 @@ include __DIR__ . '/../includes/header.php';
         </form>
     </div>
 <?php else: ?>
-    <div style="background: white; padding: 2rem; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); margin-bottom: 2rem;">
+    <div class="panel" style="padding: 2rem;">
         <h3>Neues Produkt hinzufügen</h3>
         <form method="POST">
             <div class="form-group">

+ 11 - 9
admin/reservations.php

@@ -73,7 +73,7 @@ include __DIR__ . '/../includes/header.php';
     </div>
 <?php endif; ?>
 
-<div style="background: white; padding: 1.5rem; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); margin-bottom: 2rem;">
+<div class="panel">
     <form method="GET" style="display: flex; gap: 1rem; align-items: end; flex-wrap: wrap;">
         <div style="flex: 1; min-width: 200px;">
             <label for="code">Code/ID suchen:</label>
@@ -133,11 +133,11 @@ include __DIR__ . '/../includes/header.php';
                     <td>
                         <?php
                         if ($reservation['picked_up']) {
-                            echo '<span style="color: #28a745;">Abgeholt</span>';
+                            echo '<span class="status status-picked">Abgeholt</span>';
                         } elseif ($reservation['status'] === 'expired') {
-                            echo '<span style="color: #dc3545;">Abgelaufen</span>';
+                            echo '<span class="status status-expired">Abgelaufen</span>';
                         } else {
-                            echo '<span style="color: #ffc107;">Offen</span>';
+                            echo '<span class="status status-open">Offen</span>';
                         }
                         ?>
                     </td>
@@ -157,9 +157,9 @@ include __DIR__ . '/../includes/header.php';
 <?php endif; ?>
 
 <!-- Details Modal -->
-<div id="detailsModal" style="display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1000; align-items: center; justify-content: center;">
-    <div style="background: white; padding: 2rem; border-radius: 8px; max-width: 1000px; max-height: 95vh; overflow-y: auto; position: relative;">
-        <button onclick="closeDetails()" style="position: absolute; top: 1rem; right: 1rem; background: #dc3545; color: white; border: none; border-radius: 4px; padding: 0.5rem 1rem; cursor: pointer;">Schließen</button>
+<div id="detailsModal" class="modal">
+    <div class="modal-content">
+        <button onclick="closeDetails()" class="btn btn-small modal-close">Schließen</button>
         <div id="detailsContent"></div>
     </div>
 </div>
@@ -184,15 +184,17 @@ function showDetails(reservationId) {
     });
     itemsHtml += '</ul>';
     
+    const statusText = reservation.picked_up ? 'Abgeholt' : (reservation.status === 'expired' ? 'Abgelaufen' : 'Offen');
+    const statusClass = reservation.picked_up ? 'status-picked' : (reservation.status === 'expired' ? 'status-expired' : 'status-open');
     const html = `
         <h2>Reservierungsdetails</h2>
         <p><strong>Reservierungsnummer:</strong> ${reservation.id}</p>
-        <p><strong>Abholcode:</strong> <strong style="font-size: 1.5rem; color: #c41e3a;">${reservation.code}</strong></p>
+        <p><strong>Abholcode:</strong> <strong class="code-highlight">${reservation.code}</strong></p>
         <p><strong>Kunde:</strong> ${reservation.customer_name}</p>
         <p><strong>E-Mail:</strong> ${reservation.customer_email}</p>
         <p><strong>Erstellt:</strong> ${reservation.created}</p>
         <p><strong>Gültig bis:</strong> ${reservation.expires}</p>
-        <p><strong>Status:</strong> ${reservation.picked_up ? 'Abgeholt' : (reservation.status === 'expired' ? 'Abgelaufen' : 'Offen')}</p>
+        <p><strong>Status:</strong> <span class="status ${statusClass}">${statusText}</span></p>
         ${itemsHtml}
     `;
     

+ 10 - 0
assets/css/style.css

@@ -229,6 +229,10 @@ main {
     color: var(--brand-text);
 }
 
+::placeholder {
+    color: var(--brand-muted);
+}
+
 .form-group input:focus,
 .form-group textarea:focus,
 .form-group select:focus {
@@ -445,6 +449,12 @@ footer {
     border: 1px solid var(--brand-border);
 }
 
+.modal-close {
+    position: absolute;
+    top: 1rem;
+    right: 1rem;
+}
+
 .product-placeholder {
     width: 100%;
     height: 400px;

+ 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 style="color: #dc3545;">Nachbestellung möglich</strong>
+                            <br><strong class="status status-open">Nachbestellung möglich</strong>
                         <?php endif; ?>
                     </p>
                 </div>

+ 4 - 4
checkout.php

@@ -130,7 +130,7 @@ include __DIR__ . '/includes/header.php';
             <h4 style="margin-top: 1rem;">Sofort verfügbar</h4>
             <?php foreach ($cartItems as $cartItem): ?>
                 <?php if ($cartItem['in_stock']): ?>
-                <div style="background: white; padding: 1rem; margin-bottom: 1rem; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1);">
+                <div class="panel" style="padding: 1rem; margin-bottom: 1rem;">
                     <strong><?php echo htmlspecialchars($cartItem['product']['name']); ?></strong><br>
                     <?php if (isset($cartItem['size']) && !empty($cartItem['size'])): ?>
                         Größe: <?php echo htmlspecialchars($cartItem['size']); ?><br>
@@ -149,7 +149,7 @@ include __DIR__ . '/includes/header.php';
             </div>
             <?php foreach ($cartItems as $cartItem): ?>
                 <?php if (!$cartItem['in_stock']): ?>
-                <div style="background: white; padding: 1rem; margin-bottom: 1rem; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1);">
+                <div class="panel" style="padding: 1rem; margin-bottom: 1rem;">
                     <strong><?php echo htmlspecialchars($cartItem['product']['name']); ?></strong><br>
                     <?php if (isset($cartItem['size']) && !empty($cartItem['size'])): ?>
                         Größe: <?php echo htmlspecialchars($cartItem['size']); ?><br>
@@ -161,7 +161,7 @@ include __DIR__ . '/includes/header.php';
             <?php endforeach; ?>
         <?php endif; ?>
         
-        <div style="background: white; padding: 1rem; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); margin-top: 1rem;">
+        <div class="panel" style="padding: 1rem; margin-top: 1rem;">
             <?php if ($regularTotal > 0): ?>
                 <div>Summe sofort verfügbar: <strong><?php echo formatPrice($regularTotal); ?></strong></div>
             <?php endif; ?>
@@ -188,7 +188,7 @@ include __DIR__ . '/includes/header.php';
             </div>
             
             <div class="alert alert-info">
-                <strong>Hinweis:</strong> Nach der Reservierung erhalten Sie einen Abholcode. Für Nachbestellungen informieren wir Sie, sobald die komplette Bestellung verfügbar ist.
+                <strong>Hinweis:</strong> Nach der Reservierung erhalten Sie einen Abholcode. Für Nachbestellungen 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>

+ 108 - 98
includes/functions.php

@@ -468,27 +468,29 @@ function sendReservationEmails($reservation) {
     <head>
         <meta charset="UTF-8">
     </head>
-    <body style="font-family: Arial, sans-serif; line-height: 1.6; color: #333;">
-        <h2 style="color: #c41e3a;">Reservierung bestätigt</h2>
-        <p>Sehr geehrte/r ' . htmlspecialchars($reservation['customer_name']) . ',</p>
-        <p>vielen Dank für Ihre Reservierung bei ' . SITE_NAME . '.</p>
-        
-        <div style="background: #fff3cd; border: 2px solid #ffc107; padding: 1.5rem; margin: 1.5rem 0; border-radius: 8px; text-align: center;">
-            <h3 style="margin-top: 0;">Ihr Abholcode:</h3>
-            <h2 style="font-size: 2rem; letter-spacing: 0.2rem; color: #856404; font-family: monospace;">' . htmlspecialchars($reservation['code']) . '</h2>
+    <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;">Reservierung bestätigt</h2>
+            <p>Sehr geehrte/r ' . htmlspecialchars($reservation['customer_name']) . ',</p>
+            <p>vielen Dank für Ihre Reservierung 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;">Ihr Abholcode:</h3>
+                <h2 style="font-size: 2rem; letter-spacing: 0.2rem; color: #cac300; font-family: monospace;">' . htmlspecialchars($reservation['code']) . '</h2>
+            </div>
+            
+            <h3>Reservierungsdetails:</h3>
+            <p><strong>Reservierungsnummer:</strong> ' . htmlspecialchars($reservation['id']) . '</p>
+            <p><strong>Erstellt am:</strong> ' . formatDate($reservation['created']) . '</p>
+            <p><strong>Gültig bis:</strong> ' . formatDate($reservation['expires']) . '</p>
+            
+            <h3>Reservierte Artikel:</h3>
+            ' . $itemsHtml . '
+            
+            <p><strong>Wichtig:</strong> Bitte bringen Sie diesen Abholcode zur Abholung mit. Die Reservierung ist bis zum ' . formatDate($reservation['expires']) . ' gültig.</p>
+            
+            <p>Mit freundlichen Grüßen<br>' . SITE_NAME . '</p>
         </div>
-        
-        <h3>Reservierungsdetails:</h3>
-        <p><strong>Reservierungsnummer:</strong> ' . htmlspecialchars($reservation['id']) . '</p>
-        <p><strong>Erstellt am:</strong> ' . formatDate($reservation['created']) . '</p>
-        <p><strong>Gültig bis:</strong> ' . formatDate($reservation['expires']) . '</p>
-        
-        <h3>Reservierte Artikel:</h3>
-        ' . $itemsHtml . '
-        
-        <p><strong>Wichtig:</strong> Bitte bringen Sie diesen Abholcode zur Abholung mit. Die Reservierung ist bis zum ' . formatDate($reservation['expires']) . ' gültig.</p>
-        
-        <p>Mit freundlichen Grüßen<br>' . SITE_NAME . '</p>
     </body>
     </html>';
     
@@ -501,26 +503,28 @@ function sendReservationEmails($reservation) {
     <head>
         <meta charset="UTF-8">
     </head>
-    <body style="font-family: Arial, sans-serif; line-height: 1.6; color: #333;">
-        <h2 style="color: #c41e3a;">Neue Reservierung</h2>
-        <p>Eine neue Reservierung wurde erstellt:</p>
-        
-        <div style="background: #d1ecf1; border: 2px solid #bee5eb; padding: 1.5rem; margin: 1.5rem 0; border-radius: 8px;">
-            <h3 style="margin-top: 0;">Abholcode:</h3>
-            <h2 style="font-size: 2rem; letter-spacing: 0.2rem; color: #0c5460; font-family: monospace;">' . htmlspecialchars($reservation['code']) . '</h2>
+    <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 Reservierung</h2>
+            <p>Eine neue Reservierung 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;">Abholcode:</h3>
+                <h2 style="font-size: 2rem; letter-spacing: 0.2rem; color: #cac300; font-family: monospace;">' . htmlspecialchars($reservation['code']) . '</h2>
+            </div>
+            
+            <h3>Kundendaten:</h3>
+            <p><strong>Name:</strong> ' . htmlspecialchars($reservation['customer_name']) . '</p>
+            <p><strong>E-Mail:</strong> ' . htmlspecialchars($reservation['customer_email']) . '</p>
+            
+            <h3>Reservierungsdetails:</h3>
+            <p><strong>Reservierungsnummer:</strong> ' . htmlspecialchars($reservation['id']) . '</p>
+            <p><strong>Erstellt am:</strong> ' . formatDate($reservation['created']) . '</p>
+            <p><strong>Gültig bis:</strong> ' . formatDate($reservation['expires']) . '</p>
+            
+            <h3>Reservierte Artikel:</h3>
+            ' . $itemsHtml . '
         </div>
-        
-        <h3>Kundendaten:</h3>
-        <p><strong>Name:</strong> ' . htmlspecialchars($reservation['customer_name']) . '</p>
-        <p><strong>E-Mail:</strong> ' . htmlspecialchars($reservation['customer_email']) . '</p>
-        
-        <h3>Reservierungsdetails:</h3>
-        <p><strong>Reservierungsnummer:</strong> ' . htmlspecialchars($reservation['id']) . '</p>
-        <p><strong>Erstellt am:</strong> ' . formatDate($reservation['created']) . '</p>
-        <p><strong>Gültig bis:</strong> ' . formatDate($reservation['expires']) . '</p>
-        
-        <h3>Reservierte Artikel:</h3>
-        ' . $itemsHtml . '
     </body>
     </html>';
     
@@ -552,30 +556,32 @@ function sendBackorderEmails($reservation) {
     <head>
         <meta charset="UTF-8">
     </head>
-    <body style="font-family: Arial, sans-serif; line-height: 1.6; color: #333;">
-        <h2 style="color: #c41e3a;">Nachbestellung bestätigt</h2>
-        <p>Sehr geehrte/r ' . htmlspecialchars($reservation['customer_name']) . ',</p>
-        <p>vielen Dank für Ihre Nachbestellung bei ' . SITE_NAME . '.</p>
-        
-        <div style="background: #fff3cd; border: 2px solid #ffc107; padding: 1.5rem; margin: 1.5rem 0; border-radius: 8px; text-align: center;">
-            <h3 style="margin-top: 0;">Ihr Abholcode:</h3>
-            <h2 style="font-size: 2rem; letter-spacing: 0.2rem; color: #856404; font-family: monospace;">' . htmlspecialchars($reservation['code']) . '</h2>
-        </div>
-        
-        <h3>Nachbestellungsdetails:</h3>
-        <p><strong>Nachbestellungsnummer:</strong> ' . htmlspecialchars($reservation['id']) . '</p>
-        <p><strong>Erstellt am:</strong> ' . formatDate($reservation['created']) . '</p>
-        
-        <h3>Nachbestellte Artikel:</h3>
-        ' . $itemsHtml . '
-        
-        <div style="background: #f8d7da; border: 2px solid #f5c6cb; padding: 1.5rem; margin: 1.5rem 0; border-radius: 8px;">
-            <strong>Hinweis:</strong> Die Lieferzeiten sind nicht bekannt, da die Bestellung in Chargen erfolgt.
+    <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>
+            <p>Sehr geehrte/r ' . htmlspecialchars($reservation['customer_name']) . ',</p>
+            <p>vielen Dank für Ihre Nachbestellung 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;">Ihr Abholcode:</h3>
+                <h2 style="font-size: 2rem; letter-spacing: 0.2rem; color: #cac300; font-family: monospace;">' . htmlspecialchars($reservation['code']) . '</h2>
+            </div>
+            
+            <h3>Nachbestellungsdetails:</h3>
+            <p><strong>Nachbestellungsnummer:</strong> ' . htmlspecialchars($reservation['id']) . '</p>
+            <p><strong>Erstellt am:</strong> ' . formatDate($reservation['created']) . '</p>
+            
+            <h3>Nachbestellte 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>Mit freundlichen Grüßen<br>' . SITE_NAME . '</p>
         </div>
-        
-        <p>Wir informieren Sie, sobald die komplette Nachbestellung verfügbar ist.</p>
-        
-        <p>Mit freundlichen Grüßen<br>' . SITE_NAME . '</p>
     </body>
     </html>';
     
@@ -588,27 +594,29 @@ function sendBackorderEmails($reservation) {
     <head>
         <meta charset="UTF-8">
     </head>
-    <body style="font-family: Arial, sans-serif; line-height: 1.6; color: #333;">
-        <h2 style="color: #c41e3a;">Neue Nachbestellung</h2>
-        <p>Eine neue Nachbestellung wurde erstellt:</p>
-        
-        <div style="background: #d1ecf1; border: 2px solid #bee5eb; padding: 1.5rem; margin: 1.5rem 0; border-radius: 8px;">
-            <h3 style="margin-top: 0;">Abholcode:</h3>
-            <h2 style="font-size: 2rem; letter-spacing: 0.2rem; color: #0c5460; font-family: monospace;">' . htmlspecialchars($reservation['code']) . '</h2>
+    <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>
+            
+            <div style="background: #28292a; border: 2px solid #cac300; padding: 1.5rem; margin: 1.5rem 0; border-radius: 8px;">
+                <h3 style="margin-top: 0;">Abholcode:</h3>
+                <h2 style="font-size: 2rem; letter-spacing: 0.2rem; color: #cac300; font-family: monospace;">' . htmlspecialchars($reservation['code']) . '</h2>
+            </div>
+            
+            <h3>Kundendaten:</h3>
+            <p><strong>Name:</strong> ' . htmlspecialchars($reservation['customer_name']) . '</p>
+            <p><strong>E-Mail:</strong> ' . htmlspecialchars($reservation['customer_email']) . '</p>
+            
+            <h3>Nachbestellungsdetails:</h3>
+            <p><strong>Nachbestellungsnummer:</strong> ' . htmlspecialchars($reservation['id']) . '</p>
+            <p><strong>Erstellt am:</strong> ' . formatDate($reservation['created']) . '</p>
+            
+            <h3>Nachbestellte Artikel:</h3>
+            ' . $itemsHtml . '
+            
+            <p><strong>Hinweis:</strong> Lieferzeiten sind nicht bekannt, Bestellung in Chargen.</p>
         </div>
-        
-        <h3>Kundendaten:</h3>
-        <p><strong>Name:</strong> ' . htmlspecialchars($reservation['customer_name']) . '</p>
-        <p><strong>E-Mail:</strong> ' . htmlspecialchars($reservation['customer_email']) . '</p>
-        
-        <h3>Nachbestellungsdetails:</h3>
-        <p><strong>Nachbestellungsnummer:</strong> ' . htmlspecialchars($reservation['id']) . '</p>
-        <p><strong>Erstellt am:</strong> ' . formatDate($reservation['created']) . '</p>
-        
-        <h3>Nachbestellte Artikel:</h3>
-        ' . $itemsHtml . '
-        
-        <p><strong>Hinweis:</strong> Lieferzeiten sind nicht bekannt, Bestellung in Chargen.</p>
     </body>
     </html>';
     
@@ -632,28 +640,30 @@ function sendBackorderAvailableEmail($reservation) {
     }
     $itemsHtml .= '</ul>';
     
-    $subject = 'Ihre Nachbestellung ist verfügbar';
+    $subject = 'Ihre Nachbestellung ist zur Abholung bereit';
     $message = '
     <html>
     <head>
         <meta charset="UTF-8">
     </head>
-    <body style="font-family: Arial, sans-serif; line-height: 1.6; color: #333;">
-        <h2 style="color: #28a745;">Nachbestellung verfügbar</h2>
-        <p>Sehr geehrte/r ' . htmlspecialchars($reservation['customer_name']) . ',</p>
-        <p>Ihre komplette Nachbestellung ist jetzt verfügbar.</p>
-        
-        <div style="background: #d4edda; border: 2px solid #c3e6cb; padding: 1.5rem; margin: 1.5rem 0; border-radius: 8px; text-align: center;">
-            <h3 style="margin-top: 0;">Ihr Abholcode:</h3>
-            <h2 style="font-size: 2rem; letter-spacing: 0.2rem; color: #155724; font-family: monospace;">' . htmlspecialchars($reservation['code']) . '</h2>
+    <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>
+            <p>Sehr geehrte/r ' . htmlspecialchars($reservation['customer_name']) . ',</p>
+            <p>Ihre komplette Nachbestellung 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;">Ihr Abholcode:</h3>
+                <h2 style="font-size: 2rem; letter-spacing: 0.2rem; color: #cac300; font-family: monospace;">' . htmlspecialchars($reservation['code']) . '</h2>
+            </div>
+            
+            <h3>Bereitliegende Artikel:</h3>
+            ' . $itemsHtml . '
+            
+            <p>Bitte bringen Sie den Abholcode zur Abholung mit.</p>
+            
+            <p>Mit freundlichen Grüßen<br>' . SITE_NAME . '</p>
         </div>
-        
-        <h3>Verfügbare Artikel:</h3>
-        ' . $itemsHtml . '
-        
-        <p>Bitte bringen Sie den Abholcode zur Abholung mit.</p>
-        
-        <p>Mit freundlichen Grüßen<br>' . SITE_NAME . '</p>
     </body>
     </html>';
     

+ 1 - 1
product.php

@@ -78,7 +78,7 @@ include __DIR__ . '/includes/header.php';
         <?php if (!empty($product['image']) && file_exists(__DIR__ . '/assets/images/' . $product['image'])): ?>
             <img src="<?php echo SITE_URL; ?>/assets/images/<?php echo htmlspecialchars($product['image']); ?>" alt="<?php echo htmlspecialchars($product['name']); ?>" style="width: 100%; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1);">
         <?php else: ?>
-            <div style="width: 100%; height: 400px; background-color: #e9ecef; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #6c757d;">
+            <div class="product-placeholder">
                 Kein Bild verfügbar
             </div>
         <?php endif; ?>

+ 3 - 3
reservation.php

@@ -68,7 +68,7 @@ include __DIR__ . '/includes/header.php';
         <p>Bitte notieren Sie sich diesen Code und zeigen Sie ihn bei der Abholung vor.</p>
     </div>
 
-    <div style="background: white; padding: 2rem; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); margin: 2rem 0;">
+    <div class="panel" style="padding: 2rem; margin: 2rem 0;">
         <h3>Reservierungsdetails</h3>
         
         <p><strong>Reservierungsnummer:</strong> <?php echo htmlspecialchars($reservation['id']); ?></p>
@@ -117,10 +117,10 @@ include __DIR__ . '/includes/header.php';
     <div class="reservation-code">
         <h3>Ihr Abholcode:</h3>
         <h2><?php echo htmlspecialchars($backorderReservation['code']); ?></h2>
-        <p>Bitte notieren Sie sich diesen Code. Wir informieren Sie, sobald die komplette Nachbestellung verfügbar ist.</p>
+        <p>Bitte notieren Sie sich diesen Code. Wir informieren Sie, sobald die komplette Nachbestellung zur Abholung bereit ist.</p>
     </div>
 
-    <div style="background: white; padding: 2rem; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); margin: 2rem 0;">
+    <div class="panel" style="padding: 2rem; margin: 2rem 0;">
         <h3>Nachbestellungsdetails</h3>
         
         <p><strong>Nachbestellungsnummer:</strong> <?php echo htmlspecialchars($backorderReservation['id']); ?></p>