Order: Fixed not being able to save product whithout termination even if

product doesnt need it
This commit is contained in:
Frank Schubert
2021-10-12 19:26:05 +02:00
parent f3c70679e5
commit 7237f372dc
2 changed files with 3 additions and 2 deletions

View File

@@ -403,7 +403,7 @@
<?php if(
(is_array($product->product->attributes) && count($product->product->attributes))
&& (array_key_exists(TT_ATTRIB_TERMINATION_REQUIRED_NAME, $product->product->attributes)
&& $product->product->attributes[TT_ATTRIB_TERMINATION_REQUIRED_NAME] == 1)
&& $product->product->attributes[TT_ATTRIB_TERMINATION_REQUIRED_NAME]->value == 1)
|| $product->termination_id
): ?>
<div class="row mt-1 mb-2" id="termination_id-<?=$product->id?>-line">

View File

@@ -476,7 +476,8 @@ class OrderController extends mfBaseController {
$require_term = false;
if(array_key_exists(TT_ATTRIB_TERMINATION_REQUIRED_NAME, $prod->attributes) && $prod->attributes[TT_ATTRIB_TERMINATION_REQUIRED_NAME] == 1) {
if(array_key_exists(TT_ATTRIB_TERMINATION_REQUIRED_NAME, $prod->attributes) && $prod->attributes[TT_ATTRIB_TERMINATION_REQUIRED_NAME]->value == 1) {
//var_dump($prod->attributes);
$require_term = true;
if(!$p['termination_id']) {
$this->layout()->setFlash("Ein oder mehrere Produkte erfordern Anschluss.", "warn");