diff --git a/CHANGELOG.md b/CHANGELOG.md index b7227ec..27aeb17 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## v.2.2.3 +* Добавлена исключение при обработка исключений при обновлении пользователя + ## v.2.2.2 * Добавлена передача комментария клиента при создании заказа * Добавлена передача дополнительного номера телефона в заказе и клиенте при создании заказа diff --git a/VERSION b/VERSION index 7e541ae..6b4d157 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.2.2 \ No newline at end of file +2.2.3 \ No newline at end of file diff --git a/retailcrm/lib/RetailcrmHistory.php b/retailcrm/lib/RetailcrmHistory.php index 8eaf410..6c4d14e 100644 --- a/retailcrm/lib/RetailcrmHistory.php +++ b/retailcrm/lib/RetailcrmHistory.php @@ -50,7 +50,17 @@ class RetailcrmHistory $customer->email = $customerHistory['email']; } - $customer->update(); + try { + $customer->update(); + } catch (PrestaShopException $e) { + error_log( + '[' . date('Y-m-d H:i:s') . '] customerHistory: ' . $e->getMessage() . ' customer externalId '. $customerHistory['externalId'] . "\n", + 3, + _PS_ROOT_DIR_ . '/retailcrm.log' + ); + + continue; + } } else { $customer = new Customer(); diff --git a/retailcrm/retailcrm.php b/retailcrm/retailcrm.php index 71b6255..e9c6c5e 100644 --- a/retailcrm/retailcrm.php +++ b/retailcrm/retailcrm.php @@ -3,7 +3,7 @@ * @author Retail Driver LCC * @copyright RetailCRM * @license GPL - * @version 2.2.2 + * @version 2.2.3 * @link https://retailcrm.ru * */