diff --git a/application/Preorder/Preorder.php b/application/Preorder/Preorder.php index 9471d498d..ac8a59889 100644 --- a/application/Preorder/Preorder.php +++ b/application/Preorder/Preorder.php @@ -1134,7 +1134,7 @@ class Preorder extends mfBaseModel { $campaign = $this->getProperty("campaign"); $cifcableurl = $campaign->cifcableurl; - str_replace("{{}}", $this->ciftoken, $cifcableurl); + str_replace("{{CIFTOKEN}}", $this->ciftoken, $cifcableurl); return $cifcableurl; } diff --git a/application/Preorderlogistics/PreorderlogisticsController.php b/application/Preorderlogistics/PreorderlogisticsController.php index b53c2d262..eee34b7f3 100644 --- a/application/Preorderlogistics/PreorderlogisticsController.php +++ b/application/Preorderlogistics/PreorderlogisticsController.php @@ -207,16 +207,18 @@ class PreorderlogisticsController extends mfBaseController { /* * generate QR code */ - if(!$preorder->ciftoken) { - $preorder->createCiftoken(); - $preorder->cifurl = "https://pro.ichwillglasfaser.at/ClientSubmit/finishedInstallationWork?c=".$preorder->ciftoken; - $preorder->save(); - } - - if(!$preorder->cifcableurl) { - $preorder->cifcableurl = "https://www.deineglasfaser.at/kundinnen/leerrohr-nachbestellung/"; - $preorder->save(); - } + if(!$preorder->ciftoken) { + $preorder->createCiftoken(); + $preorder->save(); + } + if(!$preorder->cifurl) { + $preorder->cifurl = $preorder->generateCifUrl(); + $preorder->save(); + } + if(!$preorder->cifcableurl) { + $preorder->cifcableurl = $preorder->generateCifCableUrl(); + $preorder->save(); + } $plog = PreorderlogisticsModel::getFirst(["preorder_id" => $preorder->id]);