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)) { // Авторизованный пользователь и найден товар // Активация товара