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

fix: basket -> order refresh at first step in the order process

Übergeordneter 5e987963
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
Keine zugehörigen Merge Requests gefunden
......@@ -85,6 +85,19 @@ public function __construct($orderHash, $User = false)
}
}
/**
* refresh the basket
* - import the order stuff to the basket
*/
public function refresh()
{
try {
$this->readOrder();
} catch (QUI\Exception $Exception) {
QUI\System\Log::writeDebugException($Exception);
}
}
/**
* imports the order data into the basket
*
......@@ -96,6 +109,7 @@ public function __construct($orderHash, $User = false)
protected function readOrder()
{
$this->Order = QUI\ERP\Order\Handler::getInstance()->getOrderByHash($this->hash);
$this->Order->refresh();
$data = $this->Order->getArticles()->toArray();
$articles = $data['articles'];
......
......@@ -64,7 +64,7 @@ public function getBody()
'products' => $View->getProducts()
]);
return $Engine->fetch(dirname(__FILE__).'/Basket.html');
return $Engine->fetch(\dirname(__FILE__).'/Basket.html');
}
//region project
......
......@@ -93,11 +93,7 @@ public function validate()
*/
public function showNext()
{
if (!$this->Basket->count()) {
return false;
}
return true;
return (bool)$this->Basket->count();
}
/**
......@@ -107,6 +103,10 @@ public function showNext()
*/
public function getBody()
{
if ($this->Basket instanceof QUI\ERP\Order\Basket\BasketOrder) {
$this->Basket->refresh();
}
$Engine = QUI::getTemplateManager()->getEngine();
if (!$this->Basket->count()) {
......
0% Lade oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren