Added fields to preorder form

This commit is contained in:
Frank Schubert
2022-09-26 16:13:09 +02:00
parent 2da58d36d3
commit d103984d13
3 changed files with 68 additions and 6 deletions
@@ -152,6 +152,7 @@ class PreorderController extends mfBaseController {
$data['adb_wohneinheit_id'] = ($r->adb_wohneinheit_id) ? $r->adb_wohneinheit_id : null;
$data['termination_id'] = ($r->termination_id) ? $r->termination_id : null;
if($campaign->product_type != "setup_only") {
$data['product_id'] = $r->product_id;
}
@@ -178,6 +179,33 @@ class PreorderController extends mfBaseController {
break;
}
switch($r->connection_type) {
case "single-dwelling":
$data['connection_type'] = "single-dwelling";
break;
case "multi-dwelling":
$data['connection_type'] = "multi-dwelling";
break;
case "apartment-building":
$data['connection_type'] = "apartment-building";
break;
case "apartment":
$data['connection_type'] = "apartment";
break;
case "business":
$data['connection_type'] = "business";
break;
}
$data['accept_agb'] = 1;
$data['accept_dsgvo'] = 1;
$data['accept_withdrawal'] = 1;
$data['accept_marketing'] = 0;
if($r->accept_marketing == 1) {
$data['accept_marketing'] = 1;
}
$data['price'] = ($r->price) ? $r->price : 0;
$data['price_setup'] = ($r->price_setup) ? $r->price_setup : 0;
$data['price_nne'] = ($r->price_nne) ? $r->price_nne : 0;