Skip to content

Commit cd3e449

Browse files
author
ellynoize
committed
bump
1 parent 29e36c8 commit cd3e449

File tree

5 files changed

+31
-5
lines changed

5 files changed

+31
-5
lines changed

intaro.retailcrm/classes/general/user/RetailCrmUser.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ public static function updateLoyaltyAccountIds(): bool
332332
}
333333
}
334334

335-
if ($actualLoyalty !== null && $user['UF_LP_ID_INTARO'] !== $actualLoyalty['id']) {
335+
if ($actualLoyalty !== null && $user['UF_LP_ID_INTARO'] != $actualLoyalty['id']) {
336336
$updateUser = new CUser;
337337
$cardNumber = isset($actualLoyalty['cardNumber']) ? $actualLoyalty['cardNumber'] : '';
338338

@@ -360,4 +360,11 @@ public static function updateLoyaltyAccountIds(): bool
360360

361361
return $status;
362362
}
363+
364+
public static function updateLoyaltyAccountIdsAgent()
365+
{
366+
self::updateLoyaltyAccountIds();
367+
368+
return "";
369+
}
363370
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
70

intaro.retailcrm/description.ru

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
- Обновлен тип данных у стоимости доставки
1+
- Добавлена опция обновления участий программы лояльности
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

33
$arModuleVersion = [
4-
'VERSION' => '6.7.4',
5-
'VERSION_DATE' => '2025-08-29 9:30:00'
4+
'VERSION' => '6.7.5',
5+
'VERSION_DATE' => '2025-09-26 9:30:00'
66
];

intaro.retailcrm/lib/controller/adminpanel.php

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,25 @@ public function createTemplateAction(array $templates, string $donor, string $re
9494
*/
9595
public function updateIdsAction(): array
9696
{
97-
$success = RetailCrmUser::updateLoyaltyAccountIds();
97+
// Устанавливаем разовый агент
98+
$agentName = "RetailCrmUser::updateLoyaltyAccountIdsAgent();";
99+
100+
// Сначала удаляем существующего агента (если есть)
101+
\CAgent::RemoveAgent($agentName, "intaro.retailcrm");
102+
103+
// Добавляем нового агента для выполнения через 1 минуту
104+
$agentId = \CAgent::AddAgent(
105+
$agentName,
106+
"intaro.retailcrm", // модуль
107+
"N", // не периодический (разовый)
108+
20, // интервал в секундах (1 минута)
109+
"", // дата начала
110+
"Y", // активность
111+
date("d.m.Y H:i:s", time() + 10), // дата следующего запуска (через 1 минуту)
112+
30 // приоритет
113+
);
114+
115+
$success = ($agentId !== false);
98116

99117
return ['success' => $success];
100118
}

0 commit comments

Comments
 (0)