feat(kasse, warenkorb): neue Ansicht ist Standard, Rueckfall ?ansicht=alt per Session
- Weiche in website_shoppingcart.php / website_cashdesk.php gedreht: content_*_neu.tpl ist Standard, ?ansicht=alt schaltet die Sitzung auf die alten Templates, ?ansicht=neu zurueck - Parameter ansicht=neu aus Form-Actions und Links der neuen Templates entfernt - Erfolgsseite completed.tpl und payment_result.tpl (theme2) im Stil der neuen Kasse (Schrittleiste 3 Fertig, Karte, Bestellnummer, Text aus cash_desk_order_completed) - Erfolgsseite ohne Navigation (site_type full_width) wie Warenkorb/Kasse - sticky Bestellkasten unter dem klebenden Theme-Kopf (top 105px statt 16px) - fix: Korbsumme 0 teilte in manage_gift_certificate() durch null (HTTP 500)
This commit is contained in:
@@ -66,8 +66,8 @@ class website_shoppingcart {
|
||||
}
|
||||
// Post-Redirect-Get fuer die neue Ansicht: nach Mengen-/Anmerkungsaenderung per GET neu
|
||||
// laden, sonst fragt ein Reload "Formular erneut senden" und schickt die Mengen doppelt.
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['cart_goto']) && isset($_GET['ansicht']) && $_GET['ansicht'] === 'neu') {
|
||||
header('Location: /Warenkorb/?ansicht=neu');
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['cart_goto']) && !$this->alte_ansicht()) {
|
||||
header('Location: /Warenkorb/');
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -84,15 +84,30 @@ class website_shoppingcart {
|
||||
// Angezeigt, wenn der Anbieter Express kann und seine Zahlart aktiv ist.
|
||||
$this->layout_object->assign('express_providers', $this->express_providers());
|
||||
|
||||
// 18.09.2026 -- Entwurf der neuen Warenkorb-Ansicht zum Anschauen: /Warenkorb/?ansicht=neu
|
||||
if (isset($_GET['ansicht']) && $_GET['ansicht'] === 'neu') {
|
||||
$this->layout_object->assign('site_type', 'full_width'); // ohne Navigation, mehr Breite (Tom, 18.09.)
|
||||
return $this->layout_object->_fetch('content_shoppingcart_neu.tpl');
|
||||
// 27.09.2026 -- die neue Ansicht (content_shoppingcart_neu.tpl) ist Standard.
|
||||
// Rueckfall auf das alte Template: /Warenkorb/?ansicht=alt (siehe alte_ansicht()).
|
||||
if ($this->alte_ansicht()) {
|
||||
return $this->layout_object->_fetch('content_shoppingcart.tpl');
|
||||
}
|
||||
return $this->layout_object->_fetch('content_shoppingcart.tpl');
|
||||
$this->layout_object->assign('site_type', 'full_width'); // ohne Navigation, mehr Breite (Tom, 18.09.)
|
||||
return $this->layout_object->_fetch('content_shoppingcart_neu.tpl');
|
||||
} // end show_shoppingcart
|
||||
|
||||
|
||||
/**
|
||||
* Rueckfall auf die alte Warenkorb-/Kassenansicht (27.09.2026, Go-Live der neuen Ansicht):
|
||||
* ?ansicht=alt schaltet fuer die Sitzung auf die alten Templates, ?ansicht=neu hebt das auf.
|
||||
* Haelt ueber die Formular-POSTs hinweg, weil die alten Templates keinen Parameter mitschicken.
|
||||
* Dieselbe Weiche steht in website_cashdesk.php.
|
||||
*/
|
||||
private function alte_ansicht() {
|
||||
if (isset($_GET['ansicht'])) {
|
||||
$_SESSION['easyshop']['ansicht_alt'] = ($_GET['ansicht'] === 'alt') ? 1 : 0;
|
||||
}
|
||||
return !empty($_SESSION['easyshop']['ansicht_alt']);
|
||||
}
|
||||
|
||||
|
||||
/** @return array<int,array{module:string,label:string}> */
|
||||
private function express_providers() {
|
||||
$out = array();
|
||||
|
||||
Reference in New Issue
Block a user