Добавлена передача поля link для брошенных корзин (#223)

This commit is contained in:
Uryvskiy Dima 2024-07-17 15:50:13 +03:00 committed by GitHub
parent d6862bad58
commit d0782028ee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 15 additions and 2 deletions

View File

@ -1,3 +1,6 @@
## v3.6.6
* Добавлена передача поля link при выгрузке брошенных корзин
## v3.6.5
* Исправлено дублирование товаров при обратной синхронизации

View File

@ -1 +1 @@
3.6.5
3.6.6

View File

@ -263,6 +263,7 @@ class RetailcrmCartUploader
'customer' => ['externalId' => $cart->id_customer],
'clearAt' => null,
'createdAt' => DateTimeImmutable::createFromFormat('Y-m-d H:i:s', $cart->date_add)->format(static::$crmCartDateFormat),
'link' => self::generateCartLink(),
];
if (!$isExistExternalId) {
@ -447,4 +448,13 @@ class RetailcrmCartUploader
{
self::$context->employee = $employee;
}
public static function generateCartLink()
{
return sprintf(
'%s://%s/index.php?controller=cart&action=show',
!empty($_SERVER['HTTPS']) ? 'https' : 'http',
$_SERVER['HTTP_HOST']
);
}
}

View File

@ -48,7 +48,7 @@ require_once dirname(__FILE__) . '/bootstrap.php';
class RetailCRM extends Module
{
const VERSION = '3.6.5';
const VERSION = '3.6.6';
const API_URL = 'RETAILCRM_ADDRESS';
const API_KEY = 'RETAILCRM_API_TOKEN';