diff --git a/admin-dev/themes/default/template/helpers/options/options.tpl b/admin-dev/themes/default/template/helpers/options/options.tpl
index 89342beeb..d16783264 100644
--- a/admin-dev/themes/default/template/helpers/options/options.tpl
+++ b/admin-dev/themes/default/template/helpers/options/options.tpl
@@ -68,7 +68,7 @@
{else}
- {if $field['multishop_default'] && empty($field['no_multishop_checkbox'])}
+ {if !$categoryData['hide_multishop_checkbox'] && $field['multishop_default'] && empty($field['no_multishop_checkbox'])}
diff --git a/classes/controller/AdminController.php b/classes/controller/AdminController.php
index 2f9c6af5a..34fe903be 100644
--- a/classes/controller/AdminController.php
+++ b/classes/controller/AdminController.php
@@ -836,6 +836,7 @@ class AdminControllerCore extends Controller
$languages = Language::getLanguages(false);
+ $hide_multishop_checkbox = (Shop::getTotalShops(false, null) < 2) ? true : false;
foreach ($this->fields_options as $category_data)
{
if (!isset($category_data['fields']))
@@ -862,7 +863,7 @@ class AdminControllerCore extends Controller
foreach ($fields as $field => $values)
{
// We don't validate fields with no visibility
- if (Shop::isFeatureActive() && isset($values['visibility']) && ($values['visibility'] > Shop::getContext()))
+ if (!$hide_multishop_checkbox && Shop::isFeatureActive() && isset($values['visibility']) && $values['visibility'] > Shop::getContext())
continue;
// Check if field is required
@@ -897,10 +898,10 @@ class AdminControllerCore extends Controller
{
foreach ($fields as $key => $options)
{
- if (Shop::isFeatureActive() && isset($options['visibility']) && $options['visibility'] > Shop::getContext())
+ if (!$hide_multishop_checkbox && Shop::isFeatureActive() && isset($options['visibility']) && $options['visibility'] > Shop::getContext())
continue;
- if (Shop::isFeatureActive() && Shop::getContext() != Shop::CONTEXT_ALL && empty($options['no_multishop_checkbox']) && empty($_POST['multishopOverrideOption'][$key]))
+ if (!$hide_multishop_checkbox && Shop::isFeatureActive() && Shop::getContext() != Shop::CONTEXT_ALL && empty($options['no_multishop_checkbox']) && empty($_POST['multishopOverrideOption'][$key]))
{
Configuration::deleteFromContext($key);
continue;
diff --git a/classes/helper/HelperOptions.php b/classes/helper/HelperOptions.php
index 0429cb9f3..2974287ed 100644
--- a/classes/helper/HelperOptions.php
+++ b/classes/helper/HelperOptions.php
@@ -52,6 +52,7 @@ class HelperOptionsCore extends Helper
$languages = Language::getLanguages(false);
$use_multishop = false;
+ $hide_multishop_checkbox = (Shop::getTotalShops(false, null) < 2) ? true : false;
foreach ($option_list as $category => $category_data)
{
if (!is_array($category_data))
@@ -66,7 +67,7 @@ class HelperOptionsCore extends Helper
$category_data['hide_multishop_checkbox'] = true;
foreach ($category_data['fields'] as $key => $field)
{
- if (empty($field['no_multishop_checkbox']))
+ if (empty($field['no_multishop_checkbox']) && !$hide_multishop_checkbox)
$category_data['hide_multishop_checkbox'] = false;
// Set field value unless explicitly denied