From 81d7c6d32c1620a9ef3981902025233d61e936d5 Mon Sep 17 00:00:00 2001 From: Smirnow Aleksey Date: Thu, 19 Sep 2024 13:09:25 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20minishop2.class.php?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Добавление возможности изменить покупателя по своей логике на событие msOnBeforeGetOrderCustomer Необходимо иногда убирать стандартный метод определения ID пользователя и заменять на свой. Предложено одно из решений. --- core/components/minishop2/model/minishop2/minishop2.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/components/minishop2/model/minishop2/minishop2.class.php b/core/components/minishop2/model/minishop2/minishop2.class.php index 66c938b5..6154502b 100644 --- a/core/components/minishop2/model/minishop2/minishop2.class.php +++ b/core/components/minishop2/model/minishop2/minishop2.class.php @@ -703,6 +703,8 @@ public function getCustomerId() ]); if (!$response['success']) { return $response['message']; + } else { + $customer = $response['data']['customer'] ?? null; } if (!$customer) {