diff --git a/mirzaev/skillparts/system/models/Product.php b/mirzaev/skillparts/system/models/Product.php index 2d83270..36d5de7 100644 --- a/mirzaev/skillparts/system/models/Product.php +++ b/mirzaev/skillparts/system/models/Product.php @@ -600,6 +600,6 @@ class Product extends Document $analogs = ProductEdgeProduct::searchConnections(self::searchByCatn($catn)->_key, $limit); - return ; + return []; } } diff --git a/mirzaev/skillparts/system/web/js/notification.js b/mirzaev/skillparts/system/web/js/notification.js index db6187d..bc3556f 100644 --- a/mirzaev/skillparts/system/web/js/notification.js +++ b/mirzaev/skillparts/system/web/js/notification.js @@ -8,14 +8,20 @@ function notification_last() { 'last': 1 }, success: notification_response_success, - error: notification_response_error + error: notification_response_error, + statusCode: { + 403: function () { + // Отмена отправки запросов чтения всплывающих уведомлений + clearInterval(notificationsInterval); + } + } }); return false; }; // Проверка уведомлений -setInterval(notification_last, 3000); +let notificationsInterval = setInterval(notification_last, 3000); function notification_popup_create(html, id) { // Инициализация