Bestellformular gefixxed
This commit is contained in:
parent
f99c8d11ab
commit
6f8f4f65ba
@ -164,6 +164,7 @@
|
|||||||
|
|
||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
// Bestellung erfolgreich -> Weiterleitung
|
// Bestellung erfolgreich -> Weiterleitung
|
||||||
|
warenkorbLeeren();
|
||||||
window.location.href = "/bestellung";
|
window.location.href = "/bestellung";
|
||||||
} else {
|
} else {
|
||||||
alert('Fehler: ' + result.message);
|
alert('Fehler: ' + result.message);
|
||||||
@ -297,6 +298,12 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function warenkorbLeeren() {
|
||||||
|
localStorage.removeItem('warenkorb'); // Oder: localStorage.setItem('warenkorb', '[]');
|
||||||
|
ladeWarenkorb(); // Aktualisiert die Ansicht
|
||||||
|
if (window.zeigeWarenkorbAnzahl) zeigeWarenkorbAnzahl(); // Optional: Warenkorb-Zähler im Header aktualisieren
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<!-- Footer wird dynamisch geladen -->
|
<!-- Footer wird dynamisch geladen -->
|
||||||
<div id="footer"></div>
|
<div id="footer"></div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user