From e1fa1c1f5a577b49e0a4e72ea9430a0c5790bd52 Mon Sep 17 00:00:00 2001 From: Arsen Mirzaev Tatyano-Muradovich Date: Thu, 14 Apr 2022 09:59:17 +1000 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mirzaev/skillparts/system/models/Product.php | 2 +- mirzaev/skillparts/system/models/Supply.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mirzaev/skillparts/system/models/Product.php b/mirzaev/skillparts/system/models/Product.php index 591dd13..542cb95 100644 --- a/mirzaev/skillparts/system/models/Product.php +++ b/mirzaev/skillparts/system/models/Product.php @@ -776,7 +776,7 @@ class Product extends Document */ public function activate(): bool { - $this->stts = 'activate'; + $this->stts = 'active'; if ($this->update() > 0) return true; diff --git a/mirzaev/skillparts/system/models/Supply.php b/mirzaev/skillparts/system/models/Supply.php index d9c13e4..a2088ea 100644 --- a/mirzaev/skillparts/system/models/Supply.php +++ b/mirzaev/skillparts/system/models/Supply.php @@ -648,7 +648,7 @@ class Supply extends Product implements ProductInterface, OfferInterface $error = true; } - if (isset($product) && Account::isMinimalAuthorized($account)) { + if ((isset($product) || $product = Product::searchByCatnAndProd($supply->catn, $supply->prod)) && Account::isMinimalAuthorized($account)) { // Авторизованный пользователь и найден товар // Активация товара