From 82019a40329c01246f081e8b51120a757de028a3 Mon Sep 17 00:00:00 2001 From: boherm Date: Fri, 10 Jan 2025 14:28:01 +0100 Subject: [PATCH] Fix disabling multistore when more than 1 store in database --- .../Admin/Configure/ShopParameters/General/PreferencesType.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PrestaShopBundle/Form/Admin/Configure/ShopParameters/General/PreferencesType.php b/src/PrestaShopBundle/Form/Admin/Configure/ShopParameters/General/PreferencesType.php index 2e58cca86cd86..c8bec7ae4a0ae 100644 --- a/src/PrestaShopBundle/Form/Admin/Configure/ShopParameters/General/PreferencesType.php +++ b/src/PrestaShopBundle/Form/Admin/Configure/ShopParameters/General/PreferencesType.php @@ -206,7 +206,8 @@ public function buildForm(FormBuilderInterface $builder, array $options) ), ]) ->add('multishop_feature_active', SwitchType::class, [ - 'disabled' => !$this->isContextDependantOptionEnabled(), + // Disable the checkbox if multistore feature is active and at least 2 shops exist (@see PrestaShop/PrestaShop/Adapter/Feature/MultistoreFeature) + 'disabled' => $this->isMultistoreUsed, 'label' => $this->trans('Enable Multistore', 'Admin.Shopparameters.Feature'), 'help' => $this->trans( 'The multistore feature allows you to manage several front offices from a single back office. If this feature is enabled, a Multistore page is available in the Advanced Parameters menu.',