]> _ Git - fluidbook-v3.git/commitdiff
wip #3753
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 25 Nov 2020 20:25:18 +0000 (20:25 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 25 Nov 2020 20:25:18 +0000 (20:25 +0000)
framework/application/controllers/AjaxController.php

index f56cc4bbfd9d777886b378d719f619d5687ee7b7..9a74856a6cea10624c5aacc723880446156a7aa0 100644 (file)
@@ -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.