fixed service bug
This commit is contained in:
parent
6fb591c39b
commit
80e9a279f1
@ -1004,10 +1004,13 @@ class RetailCrmHistory
|
|||||||
if (isset($orderCrm['delivery']['service']['code'])) {
|
if (isset($orderCrm['delivery']['service']['code'])) {
|
||||||
$deliveryCode = \Bitrix\Sale\Delivery\Services\Manager::getCodeById($deliveryId);
|
$deliveryCode = \Bitrix\Sale\Delivery\Services\Manager::getCodeById($deliveryId);
|
||||||
$serviceCode = $orderCrm['delivery']['service']['code'];
|
$serviceCode = $orderCrm['delivery']['service']['code'];
|
||||||
$services = \Bitrix\Sale\Delivery\Services\Manager::getService($deliveryId)->getProfilesList();
|
$service = \Bitrix\Sale\Delivery\Services\Manager::getService($deliveryId);
|
||||||
if (!array_key_exists($serviceCode, $services)) {
|
if (is_object($service)) {
|
||||||
$serviceCode = strtoupper($serviceCode);
|
$services = $service->getProfilesList();
|
||||||
$serviceCode = str_replace(array('-'), "_", $serviceCode);
|
if (!array_key_exists($serviceCode, $services)) {
|
||||||
|
$serviceCode = strtoupper($serviceCode);
|
||||||
|
$serviceCode = str_replace(array('-'), "_", $serviceCode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ($deliveryCode) {
|
if ($deliveryCode) {
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user