mirror of
https://github.com/retailcrm/prestashop-module.git
synced 2025-03-02 19:33:14 +03:00
fixed incorrect response processing bug in RetailcrmHistory
This commit is contained in:
parent
1400687814
commit
9ff3f10866
@ -23,7 +23,7 @@ class RetailcrmHistory
|
|||||||
|
|
||||||
$history = self::$api->customersHistory($filter);
|
$history = self::$api->customersHistory($filter);
|
||||||
|
|
||||||
if ($history->isSuccessful() && count($history->history)) {
|
if ($history && count($history->history)) {
|
||||||
$historyChanges = $history->history;
|
$historyChanges = $history->history;
|
||||||
$end = end($historyChanges);
|
$end = end($historyChanges);
|
||||||
$sinceid = $end['id'];
|
$sinceid = $end['id'];
|
||||||
@ -167,7 +167,7 @@ class RetailcrmHistory
|
|||||||
$orderFix = array();
|
$orderFix = array();
|
||||||
$history = self::$api->ordersHistory($filter);
|
$history = self::$api->ordersHistory($filter);
|
||||||
|
|
||||||
if ($history->isSuccessful() && count($history->history) > 0) {
|
if ($history && count($history->history) > 0) {
|
||||||
$historyChanges = $history->history;
|
$historyChanges = $history->history;
|
||||||
$end = end($historyChanges);
|
$end = end($historyChanges);
|
||||||
$sinceId = $end['id'];
|
$sinceId = $end['id'];
|
||||||
@ -187,7 +187,7 @@ class RetailcrmHistory
|
|||||||
if (!array_key_exists('externalId', $order_history)) {
|
if (!array_key_exists('externalId', $order_history)) {
|
||||||
$responce = self::$api->ordersGet($order_history['id'], 'id');
|
$responce = self::$api->ordersGet($order_history['id'], 'id');
|
||||||
|
|
||||||
if ($responce->isSuccessful()) {
|
if ($responce) {
|
||||||
$order = $responce['order'];
|
$order = $responce['order'];
|
||||||
} else {
|
} else {
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user