mirror of
https://github.com/retailcrm/prestashop-module.git
synced 2025-03-01 19:03:14 +03:00
Fix response status check for abandoned carts
This commit is contained in:
parent
683e00e851
commit
96f62b5e7e
@ -1,3 +1,6 @@
|
||||
## v3.4.14
|
||||
* Исправлен баг при передаче брошенных корзин.
|
||||
|
||||
## v3.4.13
|
||||
* Добавлена передача информации о модуле в CRM при его установке
|
||||
|
||||
|
@ -149,7 +149,8 @@ class RetailcrmCartUploader
|
||||
|
||||
$response = static::$api->ordersGet($cartExternalId);
|
||||
|
||||
if (!($response instanceof RetailcrmApiResponse)) {
|
||||
if ($response instanceof RetailcrmApiResponse) {
|
||||
if (empty($response['order'])) {
|
||||
// TODO
|
||||
// Extract address from cart (if exists) and append to customer?
|
||||
// Or maybe this customer will not order anything, so we don't need it's address...
|
||||
@ -165,11 +166,7 @@ class RetailcrmCartUploader
|
||||
$cart->date_upd = date('Y-m-d H:i:s');
|
||||
$cart->save();
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if (isset($response['order']) && !empty($response['order'])) {
|
||||
} elseif (!empty($response['order']['externalId'])) {
|
||||
$order = static::buildCartOrder($cart, $response['order']['externalId']);
|
||||
|
||||
if (empty($order)) {
|
||||
@ -181,6 +178,7 @@ class RetailcrmCartUploader
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static::restoreCurrentCart();
|
||||
static::restoreCurrentEmployee();
|
||||
|
@ -48,7 +48,7 @@ require_once dirname(__FILE__) . '/bootstrap.php';
|
||||
|
||||
class RetailCRM extends Module
|
||||
{
|
||||
const VERSION = '3.4.13';
|
||||
const VERSION = '3.4.14';
|
||||
|
||||
const API_URL = 'RETAILCRM_ADDRESS';
|
||||
const API_KEY = 'RETAILCRM_API_TOKEN';
|
||||
|
Loading…
x
Reference in New Issue
Block a user