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.