Передача профилей модуля Почты России (#370)
This commit is contained in:
parent
317a30b682
commit
d25c7fc484
@ -1,3 +1,6 @@
|
||||
## 2024-10-24 v6.5.36
|
||||
- Добавлена передача профилей доставки Официального модуля Почты России
|
||||
|
||||
## 2024-10-22 v6.5.35
|
||||
- Исправлена подписка модуля на событие сохранения заказа
|
||||
|
||||
|
@ -995,7 +995,9 @@ class RetailCrmOrder
|
||||
}
|
||||
if ($delivery['PARENT_ID']) {
|
||||
$service = explode(':', $delivery['CODE']);
|
||||
$shipment = ['id' => $delivery['PARENT_ID'], 'service' => $service[1]];
|
||||
$shipment = $delivery['CLASS_NAME'] === '\Sale\Handlers\Delivery\RussianpostProfile'
|
||||
? ['id' => $delivery['PARENT_ID'], 'service' => 'bitrix-' . $delivery['ID']]
|
||||
: ['id' => $delivery['PARENT_ID'], 'service' => $service[1]];
|
||||
} else {
|
||||
$shipment = ['id' => $delivery['ID']];
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
- Исправлена подписка модуля на событие сохранения заказа
|
||||
- Добавлена передача профилей доставки Официального модуля Почты России
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
$arModuleVersion = [
|
||||
'VERSION' => '6.5.35',
|
||||
'VERSION_DATE' => '2024-10-22 17:00:00'
|
||||
'VERSION' => '6.5.36',
|
||||
'VERSION_DATE' => '2024-10-24 15:00:00'
|
||||
];
|
||||
|
@ -18,7 +18,7 @@ namespace Intaro\RetailCrm\Component;
|
||||
*/
|
||||
class Constants
|
||||
{
|
||||
public const MODULE_VERSION = '6.5.35';
|
||||
public const MODULE_VERSION = '6.5.36';
|
||||
public const CRM_PURCHASE_PRICE_NULL = 'purchasePrice_null';
|
||||
public const BITRIX_USER_ID_PREFIX = 'bitrixUserId-';
|
||||
public const CRM_USERS_MAP = 'crm_users_map';
|
||||
|
@ -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);
|
||||
@ -108,7 +108,7 @@ if (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && (strtolower($_SERVER['HTTP_X_RE
|
||||
|
||||
foreach ($optionsDelivTypes as $key => $deliveryType) {
|
||||
foreach ($arDeliveryServiceAll as $deliveryService) {
|
||||
if ($deliveryService['PARENT_ID'] != 0 && $deliveryService['PARENT_ID'] === $key) {
|
||||
if ($deliveryService['PARENT_ID'] != 0 && $deliveryService['PARENT_ID'] == $key) {
|
||||
try {
|
||||
$api->deliveryServicesEdit(RCrmActions::clearArr([
|
||||
'code' => 'bitrix-' . $deliveryService['ID'],
|
||||
|
Loading…
Reference in New Issue
Block a user