|
@@ -372,10 +372,10 @@ function markBackorderAvailable($reservationId) {
|
|
|
foreach ($reservations as &$reservation) {
|
|
foreach ($reservations as &$reservation) {
|
|
|
if ($reservation['id'] === $reservationId) {
|
|
if ($reservation['id'] === $reservationId) {
|
|
|
if (!isset($reservation['type']) || $reservation['type'] !== 'backorder') {
|
|
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') {
|
|
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'])) {
|
|
if (!canFulfillReservationItems($reservation['items'])) {
|
|
|
return ['success' => false, 'message' => 'Nicht alle Artikel sind verfügbar.'];
|
|
return ['success' => false, 'message' => 'Nicht alle Artikel sind verfügbar.'];
|
|
@@ -404,7 +404,7 @@ function markBackorderAvailable($reservationId) {
|
|
|
return ['success' => true, 'reservation' => $reservation];
|
|
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>';
|
|
$itemsHtml .= '</ul>';
|
|
|
|
|
|
|
|
// Customer email
|
|
// Customer email
|
|
|
- $customerSubject = 'Nachbestellung bei ' . SITE_NAME;
|
|
|
|
|
|
|
+ $customerSubject = 'Vorbestellung bei ' . SITE_NAME;
|
|
|
$customerMessage = '
|
|
$customerMessage = '
|
|
|
<html>
|
|
<html>
|
|
|
<head>
|
|
<head>
|
|
@@ -563,27 +563,27 @@ function sendBackorderEmails($reservation) {
|
|
|
</head>
|
|
</head>
|
|
|
<body style="font-family: Arial, sans-serif; line-height: 1.6; color: #f5f7fb; background: #28292a; padding: 1.5rem;">
|
|
<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;">
|
|
<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>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;">
|
|
<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>
|
|
<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>
|
|
<h2 style="font-size: 2rem; letter-spacing: 0.2rem; color: #cac300; font-family: monospace;">' . htmlspecialchars($reservation['id']) . '</h2>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <h3>Nachbestellungsdetails:</h3>
|
|
|
|
|
|
|
+ <h3>Vorbestellungsdetails:</h3>
|
|
|
<p><strong>Bestellnummer:</strong> ' . htmlspecialchars($reservation['id']) . '</p>
|
|
<p><strong>Bestellnummer:</strong> ' . htmlspecialchars($reservation['id']) . '</p>
|
|
|
<p><strong>Erstellt am:</strong> ' . formatDate($reservation['created']) . '</p>
|
|
<p><strong>Erstellt am:</strong> ' . formatDate($reservation['created']) . '</p>
|
|
|
|
|
|
|
|
- <h3>Nachbestellte Artikel:</h3>
|
|
|
|
|
|
|
+ <h3>Vorbestellte Artikel:</h3>
|
|
|
' . $itemsHtml . '
|
|
' . $itemsHtml . '
|
|
|
|
|
|
|
|
<div style="background: #28292a; border: 2px solid #cf2e2e; padding: 1.5rem; margin: 1.5rem 0; border-radius: 8px;">
|
|
<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.
|
|
<strong>Hinweis:</strong> Die Lieferzeiten sind nicht bekannt, da die Bestellung in Chargen erfolgt.
|
|
|
</div>
|
|
</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>
|
|
<p>Mit freundlichen Grüßen<br>' . SITE_NAME . '</p>
|
|
|
</div>
|
|
</div>
|
|
@@ -593,7 +593,7 @@ function sendBackorderEmails($reservation) {
|
|
|
sendEmail($reservation['customer_email'], $customerSubject, $customerMessage);
|
|
sendEmail($reservation['customer_email'], $customerSubject, $customerMessage);
|
|
|
|
|
|
|
|
// Admin email
|
|
// Admin email
|
|
|
- $adminSubject = 'Neue Nachbestellung: ' . $reservation['id'];
|
|
|
|
|
|
|
+ $adminSubject = 'Neue Vorbestellung: ' . $reservation['id'];
|
|
|
$adminMessage = '
|
|
$adminMessage = '
|
|
|
<html>
|
|
<html>
|
|
|
<head>
|
|
<head>
|
|
@@ -601,8 +601,8 @@ function sendBackorderEmails($reservation) {
|
|
|
</head>
|
|
</head>
|
|
|
<body style="font-family: Arial, sans-serif; line-height: 1.6; color: #f5f7fb; background: #28292a; padding: 1.5rem;">
|
|
<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;">
|
|
<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;">
|
|
<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>
|
|
<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>Name:</strong> ' . htmlspecialchars($reservation['customer_name']) . '</p>
|
|
|
<p><strong>E-Mail:</strong> ' . htmlspecialchars($reservation['customer_email']) . '</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>Bestellnummer:</strong> ' . htmlspecialchars($reservation['id']) . '</p>
|
|
|
<p><strong>Erstellt am:</strong> ' . formatDate($reservation['created']) . '</p>
|
|
<p><strong>Erstellt am:</strong> ' . formatDate($reservation['created']) . '</p>
|
|
|
|
|
|
|
|
- <h3>Nachbestellte Artikel:</h3>
|
|
|
|
|
|
|
+ <h3>Vorbestellte Artikel:</h3>
|
|
|
' . $itemsHtml . '
|
|
' . $itemsHtml . '
|
|
|
|
|
|
|
|
<p><strong>Hinweis:</strong> Lieferzeiten sind nicht bekannt, Bestellung in Chargen.</p>
|
|
<p><strong>Hinweis:</strong> Lieferzeiten sind nicht bekannt, Bestellung in Chargen.</p>
|
|
@@ -645,7 +645,7 @@ function sendBackorderAvailableEmail($reservation) {
|
|
|
}
|
|
}
|
|
|
$itemsHtml .= '</ul>';
|
|
$itemsHtml .= '</ul>';
|
|
|
|
|
|
|
|
- $subject = 'Ihre Nachbestellung ist zur Abholung bereit';
|
|
|
|
|
|
|
+ $subject = 'Ihre Vorbestellung ist zur Abholung bereit';
|
|
|
$message = '
|
|
$message = '
|
|
|
<html>
|
|
<html>
|
|
|
<head>
|
|
<head>
|
|
@@ -653,9 +653,9 @@ function sendBackorderAvailableEmail($reservation) {
|
|
|
</head>
|
|
</head>
|
|
|
<body style="font-family: Arial, sans-serif; line-height: 1.6; color: #f5f7fb; background: #28292a; padding: 1.5rem;">
|
|
<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;">
|
|
<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>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;">
|
|
<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>
|
|
<h3 style="margin-top: 0; color: #f5f7fb;">Ihre Bestellnummer:</h3>
|