Cpeprovisioning/add setup box

This commit is contained in:
Luca Haid
2025-12-10 09:52:05 +00:00
parent 682b645d53
commit 00f49cb946
2 changed files with 29 additions and 4 deletions

View File

@@ -451,8 +451,22 @@ class CpeprovisioningController extends mfBaseController {
$attrs = $prod->product->attributes ?? [];
if (empty($attrs) || !is_array($attrs)) continue;
if ($attrs['hw_only']->value ?? false) $orderInfo['hw'][] = (int)$prod->amount . "x " . $prod->product->name;
if ($attrs['addon']->value ?? false) $orderInfo['hw'][] = $prod->product->name;
if ($attrs['bras_type']->value ?? false) continue;
$added = false;
if ($attrs['hw_only']->value ?? false) {
$orderInfo['hw'][] = (int)$prod->amount . "x " . $prod->product->name;
$added = true;
}
if ($attrs['addon']->value ?? false) {
$orderInfo['hw'][] = $prod->product->name;
$added = true;
}
if (!$added && in_array($prod->product->productgroup_id, [6, 4, 8])) {
$orderInfo['hw'][] = (int)$prod->amount . "x " . $prod->product->name;
}
if ($attrs['voip_chan']->value ?? false) $orderInfo['voip'] = true;
if ($attrs['vot']->value ?? false) $orderInfo['vot'] = true;
}