From: vincent@cubedesigners.com Date: Wed, 25 Nov 2020 20:25:18 +0000 (+0000) Subject: wip #3753 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=12930f907c26309f0f45f7d9059cbb067928268c;p=fluidbook-v3.git wip #3753 --- diff --git a/framework/application/controllers/AjaxController.php b/framework/application/controllers/AjaxController.php index f56cc4b..9a74856 100644 --- a/framework/application/controllers/AjaxController.php +++ b/framework/application/controllers/AjaxController.php @@ -22,14 +22,10 @@ class AjaxController extends CubeIT_Controller_AjaxController if (isset(Bootstrap::getInstance()->getSession()->gclid)) { $data['gclid'] = Bootstrap::getInstance()->getSession()->gclid; } - $url = 'https://workshop.fluidbook.com/ajax/demandeDevis?devis_form=' . base64_encode(json_encode($data)); - $xml = simplexml_load_file($url); - $xml_alert = $xml->xpath('//alert'); - $okmessage = array_pop($xml_alert); - if (null !== $okmessage) { - $okmessage = (string)$okmessage->content; - } + $url = 'https://toolbox.fluidbook.com/fluidbook-quote/create-from-website?data=' . base64_encode(json_encode($data)); + $json = json_decode(file_get_contents($url)); + $okmessage = $json->message; // If we're processing the popup form, the success message will replace the whole section including the text // Otherwise, just the form itself is replaced.