class fixes
This commit is contained in:
parent
28ccea77e7
commit
1d611ef2f7
@ -198,8 +198,8 @@ class ICrmOrderActions
|
|||||||
|
|
||||||
// pushing existing orders
|
// pushing existing orders
|
||||||
foreach ($orderHistory as $order) {
|
foreach ($orderHistory as $order) {
|
||||||
|
|
||||||
var_dump($order);
|
var_dump($order);
|
||||||
continue;
|
|
||||||
|
|
||||||
if(!isset($order['externalId']) && !$order['externalId']) {
|
if(!isset($order['externalId']) && !$order['externalId']) {
|
||||||
|
|
||||||
@ -238,13 +238,12 @@ class ICrmOrderActions
|
|||||||
if(isset($order['externalId']) && $order['externalId']) {
|
if(isset($order['externalId']) && $order['externalId']) {
|
||||||
$arFields = CSaleOrder::GetById($order['externalId']);
|
$arFields = CSaleOrder::GetById($order['externalId']);
|
||||||
|
|
||||||
var_dump($arFields);
|
|
||||||
|
|
||||||
// incorrect order
|
// incorrect order
|
||||||
if(!$arFields || empty($arFields))
|
if(!$arFields || empty($arFields))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
$userId = $arFields['USER_ID'];
|
$userId = $arFields['USER_ID'];
|
||||||
|
if(isset($order['customer']) && $order['customer']) $userId = $order['customer'];
|
||||||
$LID = $arFields['LID'];
|
$LID = $arFields['LID'];
|
||||||
|
|
||||||
$rsOrderProps = CSaleOrderPropsValue::GetList(array(), array('ORDER_ID' => $arFields['ID']));
|
$rsOrderProps = CSaleOrderPropsValue::GetList(array(), array('ORDER_ID' => $arFields['ID']));
|
||||||
@ -403,17 +402,19 @@ class ICrmOrderActions
|
|||||||
}*/
|
}*/
|
||||||
|
|
||||||
// orderUpdate
|
// orderUpdate
|
||||||
$arFields = array(
|
$arFields = self::clearArr(array(
|
||||||
'PRICE_DELIVERY' => $order['deliveryCost'],
|
'PRICE_DELIVERY' => $order['deliveryCost'],
|
||||||
'PRICE' => $order['summ'],
|
'PRICE' => $order['summ'],
|
||||||
'DATE_MARKED' => $order['markDatetime'],
|
'DATE_MARKED' => $order['markDatetime'],
|
||||||
'USER_ID' => $order['customer'],
|
'USER_ID' => $userId, //$order['customer']
|
||||||
'PAY_SYSTEM_ID' => $optionsPayTypes[$order['paymentType']],
|
'PAY_SYSTEM_ID' => $optionsPayTypes[$order['paymentType']],
|
||||||
'PAYED' => $optionsPayment[$order['paymentStatus']],
|
'PAYED' => $optionsPayment[$order['paymentStatus']],
|
||||||
'PERSON_TYPE_ID' => $optionsOrderTypes[$order['orderType']],
|
'PERSON_TYPE_ID' => $optionsOrderTypes[$order['orderType']],
|
||||||
'DELIVERY_ID' => $optionsDelivTypes[$order['deliveryType']],
|
'DELIVERY_ID' => $optionsDelivTypes[$order['deliveryType']],
|
||||||
'STATUS_ID' => $optionsPayStatuses[$order['status']]
|
'STATUS_ID' => $optionsPayStatuses[$order['status']]
|
||||||
);
|
));
|
||||||
|
|
||||||
|
var_dump($arFields);
|
||||||
|
|
||||||
CSaleOrder::Update($order['externalId'], $arFields);
|
CSaleOrder::Update($order['externalId'], $arFields);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user