orderCreate fix
This commit is contained in:
parent
03a72e37a3
commit
878a958ee3
@ -71,7 +71,7 @@ class ICrmOrderActions
|
|||||||
if (!$steps) {
|
if (!$steps) {
|
||||||
while ($arOrder = $dbOrder->GetNext()) { //here orders by id asc; with offset
|
while ($arOrder = $dbOrder->GetNext()) { //here orders by id asc; with offset
|
||||||
|
|
||||||
$result = self::orderCreate($arOrder['ID'], $api, $arParams);
|
$result = self::orderCreate($arOrder, $api, $arParams);
|
||||||
|
|
||||||
if (!$result['order'] || !$result['customer'])
|
if (!$result['order'] || !$result['customer'])
|
||||||
continue;
|
continue;
|
||||||
@ -111,7 +111,7 @@ class ICrmOrderActions
|
|||||||
|
|
||||||
while ($arOrder = $dbOrder->GetNext()) { // here orders by id asc
|
while ($arOrder = $dbOrder->GetNext()) { // here orders by id asc
|
||||||
|
|
||||||
$result = self::orderCreate($arOrder['ID'], $api, $arParams);
|
$result = self::orderCreate($arOrder, $api, $arParams);
|
||||||
|
|
||||||
if (!$result['order'] || !$result['customer'])
|
if (!$result['order'] || !$result['customer'])
|
||||||
continue;
|
continue;
|
||||||
@ -224,12 +224,10 @@ class ICrmOrderActions
|
|||||||
* @return boolean
|
* @return boolean
|
||||||
* @return array - array('order' = $order, 'customer' => $customer)
|
* @return array - array('order' = $order, 'customer' => $customer)
|
||||||
*/
|
*/
|
||||||
public static function orderCreate($orderId, $api, $arParams, $send = false) {
|
public static function orderCreate($arFields, $api, $arParams, $send = false) {
|
||||||
if(!$api || empty($arParams) || !$orderId) { // add cond to check $arParams
|
if(!$api || empty($arParams)) { // add cond to check $arParams
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$arFields = CSaleOrder::GetById($orderId);
|
|
||||||
|
|
||||||
if (empty($arFields)) {
|
if (empty($arFields)) {
|
||||||
//handle err
|
//handle err
|
||||||
|
Loading…
Reference in New Issue
Block a user