deliveryCost fix
This commit is contained in:
parent
31e1941f0b
commit
9218018b7c
@ -927,8 +927,8 @@ class ICrmOrderActions
|
|||||||
CSaleBasket::DeleteAll($userId);
|
CSaleBasket::DeleteAll($userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!isset($order['deliveryCost']))
|
if(!isset($order['delivery']) || !isset($order['delivery']['cost']))
|
||||||
$order['deliveryCost'] = $arFields['PRICE_DELIVERY'];
|
$order['delivery']['cost'] = $arFields['PRICE_DELIVERY'];
|
||||||
|
|
||||||
if(!isset($order['summ']) || (isset($order['summ']) && !$order['summ'] && $order['summ'] !== 0))
|
if(!isset($order['summ']) || (isset($order['summ']) && !$order['summ'] && $order['summ'] !== 0))
|
||||||
$order['summ'] = $arFields['PRICE'] - $arFields['PRICE_DELIVERY'];
|
$order['summ'] = $arFields['PRICE'] - $arFields['PRICE_DELIVERY'];
|
||||||
@ -958,7 +958,7 @@ class ICrmOrderActions
|
|||||||
|
|
||||||
// orderUpdate
|
// orderUpdate
|
||||||
$arFields = self::clearArr(array(
|
$arFields = self::clearArr(array(
|
||||||
'PRICE_DELIVERY' => $order['deliveryCost'],
|
'PRICE_DELIVERY' => $order['delivery']['cost'],
|
||||||
'PRICE' => $order['summ'] + (double) $order['delivery']['cost'],
|
'PRICE' => $order['summ'] + (double) $order['delivery']['cost'],
|
||||||
'DATE_MARKED' => $order['markDatetime'],
|
'DATE_MARKED' => $order['markDatetime'],
|
||||||
'USER_ID' => $userId, //$order['customer']
|
'USER_ID' => $userId, //$order['customer']
|
||||||
@ -1265,7 +1265,8 @@ class ICrmOrderActions
|
|||||||
$delivery = array(
|
$delivery = array(
|
||||||
'code' => $arParams['optionsDelivTypes'][$resultDeliveryTypeId],
|
'code' => $arParams['optionsDelivTypes'][$resultDeliveryTypeId],
|
||||||
'service' => ($arParams['optionsDelivTypes'][$resultDeliveryTypeId]) ? $deliveryService : '',
|
'service' => ($arParams['optionsDelivTypes'][$resultDeliveryTypeId]) ? $deliveryService : '',
|
||||||
'address' => $resOrderDeliveryAddress
|
'address' => $resOrderDeliveryAddress,
|
||||||
|
'cost' => $arFields['PRICE_DELIVERY']
|
||||||
);
|
);
|
||||||
|
|
||||||
if($arParams['optionsDelivTypes'][$resultDeliveryTypeId] == self::$MUTLISHIP_DELIVERY_TYPE) {
|
if($arParams['optionsDelivTypes'][$resultDeliveryTypeId] == self::$MUTLISHIP_DELIVERY_TYPE) {
|
||||||
@ -1281,7 +1282,6 @@ class ICrmOrderActions
|
|||||||
'number' => $arFields['ACCOUNT_NUMBER'],
|
'number' => $arFields['ACCOUNT_NUMBER'],
|
||||||
'phone' => $resOrder['phone'],
|
'phone' => $resOrder['phone'],
|
||||||
'email' => $resOrder['email'],
|
'email' => $resOrder['email'],
|
||||||
'deliveryCost' => $arFields['PRICE_DELIVERY'],
|
|
||||||
'summ' => $arFields['PRICE'],
|
'summ' => $arFields['PRICE'],
|
||||||
'markDateTime' => $arFields['DATE_MARKED'],
|
'markDateTime' => $arFields['DATE_MARKED'],
|
||||||
'externalId' => $arFields['ID'],
|
'externalId' => $arFields['ID'],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user