Fixed showing all orders

This commit is contained in:
Frank Schubert
2021-11-12 09:42:05 +01:00
parent afb6167501
commit fed80790a6

View File

@@ -146,12 +146,15 @@ class OrderController extends mfBaseController {
$o = new Order($order->id);
foreach($o->products as $p) {
$attribs = $p->product->attributes;
if(is_array($attribs) && count($attribs)
&& array_key_exists(TT_ATTRIB_TERMINATION_REQUIRED_NAME, $attribs)
if(is_array($attribs) && count($attribs)) {
if(array_key_exists(TT_ATTRIB_TERMINATION_REQUIRED_NAME, $attribs)
&& $attribs[TT_ATTRIB_TERMINATION_REQUIRED_NAME]->value == 0) {
$this->log->debug("found additional order where termination_required 0");
$this->log->debug("found additional order where termination_required 0");
$lonelyOrders[$order->id] = $order;
break;
}
} else {
$lonelyOrders[$order->id] = $order;
break;
}
}