1
0
Fork 0
mirror of synced 2025-04-04 14:23:33 +03:00

ajax is string

This commit is contained in:
anton 2024-10-25 09:35:01 +03:00
parent 693bd17439
commit 39ab3f9cd3

View file

@ -85,7 +85,7 @@ if (method_exists(RCrmActions::class, 'customOrderPropList')
}
//ajax update deliveryServices
if (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && (strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest') && isset($_POST['ajax']) && ($_POST['ajax'] == 1)) {
if (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && (strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest') && isset($_POST['ajax']) && ($_POST['ajax'] === '1')) {
$api_host = COption::GetOptionString($mid, Constants::CRM_API_HOST_OPTION, 0);
$api_key = COption::GetOptionString($mid, Constants::CRM_API_KEY_OPTION , 0);
$api = new RetailCrm\ApiClient($api_host, $api_key);