?> </span> </td> </tr> <? if (!empty($arDeliveryName)): ?> <tr> <td><?php echo GetMessage("SOD_DELIVERY_SERVICE_NAME"); ?> :</td> <td><? echo "[".htmlspecialcharsEx($arDeliveryName[1])."] ".htmlspecialcharsEx($arDeliveryData["PROFILES"][$arDeliveryName[1]]["TITLE"]); ?></td> </tr> <? $arDeliveryExtraParams = CSaleDeliveryHandler::GetHandlerExtraParams($arDeliveryData["SID"], $arDeliveryName[1], $arOrder); $depList = \Bitrix\Sale\Delivery\OrderDeliveryTable::getList(array( 'filter'=>array('=ORDER_ID'=>$ID), )); if($dep = $depList->fetch()) { $depParams = unserialize($dep["PARAMS"]); foreach($arDeliveryExtraParams as $paramId => $paramOptions) { if(isset($depParams[$paramId])) { if(isset($paramOptions["VALUES"]) && isset($paramOptions["VALUES"][$depParams[$paramId]])) { $value = $paramOptions["VALUES"][$depParams[$paramId]]; }
foreach ($arDeliveryServiceAll as $arDeliveryService) { foreach ($arDeliveryService["PROFILES"] as $profile_id => $arDeliveryProfile) { if ($arDeliveryProfile["ACTIVE"] == "Y" && (count($arP2D[$arUserResult["PAY_SYSTEM_ID"]]) <= 0 || in_array($arDeliveryService["SID"], $arP2D[$arUserResult["PAY_SYSTEM_ID"]]) || empty($arD2P[$arDeliveryService["SID"]]))) { $delivery_id = $arDeliveryService["SID"]; $arProfile = array("SID" => $profile_id, "TITLE" => $arDeliveryProfile["TITLE"], "DESCRIPTION" => $arDeliveryProfile["DESCRIPTION"], "FIELD_NAME" => "DELIVERY_ID"); if (strlen($arUserResult["DELIVERY_ID"]) > 0 && $arUserResult["DELIVERY_ID"] == $delivery_id . ":" . $profile_id) { $arProfile["CHECKED"] = "Y"; $arUserResult["DELIVERY_ID"] = $delivery_id . ":" . $profile_id; $bSelected = true; $arOrderTmpDel = array("PRICE" => $arResult["ORDER_PRICE"], "WEIGHT" => $arResult["ORDER_WEIGHT"], "DIMENSIONS" => $arResult["ORDER_DIMENSIONS"], "LOCATION_FROM" => COption::GetOptionInt('sale', 'location'), "LOCATION_TO" => $arUserResult["DELIVERY_LOCATION"], "LOCATION_ZIP" => $arUserResult["DELIVERY_LOCATION_ZIP"], "ITEMS" => $arResult["BASKET_ITEMS"], "EXTRA_PARAMS" => $arResult["DELIVERY_EXTRA"]); $arDeliveryPrice = CSaleDeliveryHandler::CalculateFull($delivery_id, $profile_id, $arOrderTmpDel, $arResult["BASE_LANG_CURRENCY"]); } if (empty($arResult["DELIVERY"][$delivery_id])) { $arResult["DELIVERY"][$delivery_id] = array("SID" => $delivery_id, "SORT" => $arDeliveryService["SORT"], "TITLE" => $arDeliveryService["NAME"], "DESCRIPTION" => $arDeliveryService["DESCRIPTION"], "PROFILES" => array()); } $arDeliveryExtraParams = CSaleDeliveryHandler::GetHandlerExtraParams($delivery_id, $profile_id, $arOrderTmpDel, SITE_ID); if (!empty($arDeliveryExtraParams)) { $_SESSION["SALE_DELIVERY_EXTRA_PARAMS"][$delivery_id . ":" . $profile_id] = $arDeliveryExtraParams; $arResult["DELIVERY"][$delivery_id]["ISNEEDEXTRAINFO"] = "Y"; } else { $arResult["DELIVERY"][$delivery_id]["ISNEEDEXTRAINFO"] = "N"; } if ($arDeliveryPrice["RESULT"] == "ERROR") { $arResult["ERROR"][] = $arDeliveryPrice["TEXT"]; } else { $arResult["DELIVERY_PRICE"] = roundEx($arDeliveryPrice["VALUE"], SALE_VALUE_PRECISION); $arResult["PACKS_COUNT"] = $arDeliveryPrice["PACKS_COUNT"]; } if (!empty($arUserResult["DELIVERY_ID"]) && strpos($arUserResult["DELIVERY_ID"], ":") !== false) { if ($arUserResult["DELIVERY_ID"] == $delivery_id . ":" . $profile_id) { $bFound = true;