1
0
mirror of synced 2024-11-22 05:16:09 +03:00

fixed delivery service bug

This commit is contained in:
Konstantin 2019-04-18 09:52:35 +03:00
parent f41d04fb0e
commit 8b1c130ba6

View File

@ -994,12 +994,12 @@ class RetailCrmHistory
if (isset($orderCrm['delivery']['service']['code'])) {
$deliveryCode = \Bitrix\Sale\Delivery\Services\Manager::getCodeById($deliveryId);
$serviceCode = $orderCrm['delivery']['service']['code'];
$services = \Bitrix\Sale\Delivery\Services\Manager::getService($deliveryId)->getProfilesList();
if (!array_key_exists($serviceCode, $services)) {
$serviceCode = strtoupper($serviceCode);
$serviceCode = str_replace(array('-'), "_", $serviceCode);
}
$serviceCode = $orderCrm['delivery']['service']['code'];
$services = \Bitrix\Sale\Delivery\Services\Manager::getService($deliveryId)->getProfilesList();
if (!array_key_exists($serviceCode, $services)) {
$serviceCode = strtoupper($serviceCode);
$serviceCode = str_replace(array('-'), "_", $serviceCode);
}
if ($deliveryCode) {
try {
$deliveryService = \Bitrix\Sale\Delivery\Services\Manager::getObjectByCode($deliveryCode . ':' . $serviceCode);