Skip to content
Code-Schnipsel Gruppen Projekte
Commit 195f99ff erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

fix: handle exception in toOrderInProcess.php

In the ajax/frontend/basket/toOrderInProcess.php:
- The QUI\ERP\Order\Factory class was imported.
- In the event of an exception, a new order in process is created instead of just logging the
error. This change should improve the user experience by preventing any disruption in the order
process due to unexpected errors.
Übergeordneter ca954d77
No related branches found
No related tags found
2 Merge Requests!141Update 'next-3.x' with latest changes from 'main',!140fix: handle exception in toOrderInProcess.php
Pipeline #14689 mit Warnungen bestanden mit Phase
in 2 Minuten und 23 Sekunden
......@@ -4,6 +4,8 @@
* This file contains package_quiqqer_order_ajax_frontend_basket_toOrderInProcess
*/
use QUI\ERP\Order\Factory;
/**
* Saves the basket to the temporary order
*
......@@ -35,8 +37,8 @@ function ($basketId, $orderHash) {
if ($Order === null) {
try {
$Order = $OrderHandler->getLastOrderInProcessFromUser($User);
} catch (QUI\Exception $Exception) {
QUI\System\Log::writeDebugException($Exception);
} catch (QUI\Exception) {
$Order = Factory::getInstance()->createOrderInProcess();
}
}
......
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren