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:
@@ -67,6 +67,10 @@ class website_cashdesk {
|
||||
if (isset($_GET['order'])) {
|
||||
$this->layout_object->assign('order_number', $_GET['order']);
|
||||
}
|
||||
// 27.09.2026: Erfolgsseite ohne Navigation, wie Warenkorb und Kasse der neuen Ansicht
|
||||
if (!$this->alte_ansicht()) {
|
||||
$this->layout_object->assign('site_type', 'full_width');
|
||||
}
|
||||
// Success-Template anzeigen - auch bei Reload!
|
||||
return $this->layout_object->_fetch('content_cash_desk/completed.tpl');
|
||||
}
|
||||
@@ -362,12 +366,13 @@ class website_cashdesk {
|
||||
// "Bestellen" als denselben Vorgang erkennbar (siehe save_order()).
|
||||
$this->layout_object->assign('checkout_nonce', $this->checkout_nonce_holen());
|
||||
|
||||
// 18.09.2026 -- Entwurf der neuen Kassenansicht zum Anschauen: /Kasse/?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_cash_desk_neu.tpl');
|
||||
// 27.09.2026 -- die neue Kasse (content_cash_desk_neu.tpl) ist Standard.
|
||||
// Rueckfall auf das alte Template: /Kasse/?ansicht=alt (siehe alte_ansicht()).
|
||||
if ($this->alte_ansicht()) {
|
||||
return $this->layout_object->_fetch('content_cash_desk.tpl');
|
||||
}
|
||||
return $this->layout_object->_fetch('content_cash_desk.tpl');
|
||||
$this->layout_object->assign('site_type', 'full_width'); // ohne Navigation, mehr Breite (Tom, 18.09.)
|
||||
return $this->layout_object->_fetch('content_cash_desk_neu.tpl');
|
||||
|
||||
} else if (isset($_GET['token']) && $_GET['token']) {
|
||||
return $this->change_order('paypal');
|
||||
@@ -382,6 +387,18 @@ class website_cashdesk {
|
||||
|
||||
// end run
|
||||
|
||||
/**
|
||||
* Rueckfall auf die alte Kassen-/Warenkorbansicht (27.09.2026, Go-Live der neuen Ansicht):
|
||||
* ?ansicht=alt schaltet fuer die Sitzung auf die alten Templates, ?ansicht=neu hebt das auf.
|
||||
* Dieselbe Weiche steht in website_shoppingcart.php.
|
||||
*/
|
||||
private function alte_ansicht() {
|
||||
if (isset($_GET['ansicht'])) {
|
||||
$_SESSION['easyshop']['ansicht_alt'] = ($_GET['ansicht'] === 'alt') ? 1 : 0;
|
||||
}
|
||||
return !empty($_SESSION['easyshop']['ansicht_alt']);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------ Express
|
||||
|
||||
/** Start aus dem Warenkorb: /Kasse/?payment_express_start=<modul> */
|
||||
@@ -886,8 +903,10 @@ class website_cashdesk {
|
||||
$this->has_gift_certificate = false;
|
||||
}
|
||||
|
||||
// 27.09.2026: Korbsumme 0 (Artikel ohne Preis) teilte hier durch null -> HTTP 500 in der Kasse
|
||||
$sum_gross = (float)$this->shoppingcart_data['price_sum_gross'];
|
||||
foreach ($this->shoppingcart_data['tax_values'] as $key => $value) {
|
||||
$this->shoppingcart_data['tax_values'][$key]['gift']['percent'] = $percent = round(($value['gross'] / $this->shoppingcart_data['price_sum_gross'] * 100), 2);
|
||||
$this->shoppingcart_data['tax_values'][$key]['gift']['percent'] = $percent = $sum_gross > 0 ? round(($value['gross'] / $sum_gross * 100), 2) : 0;
|
||||
$this->shoppingcart_data['tax_values'][$key]['gift']['gross'] = $new_gross = $this->shoppingcart_data['price_sum_gross'] / 100 * $percent;
|
||||
$this->shoppingcart_data['tax_values'][$key]['gift']['net'] = $new_net = $new_gross / (100 + $key) * 100;
|
||||
$this->shoppingcart_data['tax_values'][$key]['gift']['vat'] = $new_gross - $new_net;
|
||||
|
||||
Reference in New Issue
Block a user