diff --git a/controllers/admin/AdminGroupsController.php b/controllers/admin/AdminGroupsController.php index 4c4e4596e..2be4a8c85 100644 --- a/controllers/admin/AdminGroupsController.php +++ b/controllers/admin/AdminGroupsController.php @@ -148,8 +148,32 @@ class AdminGroupsControllerCore extends AdminController parent::initProcess(); } + public function initContent() + { + if (!Group::isFeatureActive()) { + parent::initContent(); + + $content = $this->displayWarning(sprintf( + $this->l('The feature Customer Groups has been disabled. You can enable it from %s page.'), + ''.$this->l('Advanced Parameters > Performance').'' + )); + + $this->context->smarty->assign(array( + 'content' => $content, + )); + + return; + } + + parent::initContent(); + } + public function postProcess() { + if (!Group::isFeatureActive()) { + return; + } + if (isset($_POST['submitResetcustomer_group'])) { $this->processResetFilters('customer_group'); } @@ -547,6 +571,8 @@ class AdminGroupsControllerCore extends AdminController $this->l('The feature Customer Groups has been disabled. You can enable it from %s page.'), ''.$this->l('Advanced Parameters > Performance').'' )); + + return; } $unidentified = new Group(Configuration::get('PS_UNIDENTIFIED_GROUP')); diff --git a/controllers/admin/AdminPPreferencesController.php b/controllers/admin/AdminPPreferencesController.php index e671522e2..1ea8b3f50 100644 --- a/controllers/admin/AdminPPreferencesController.php +++ b/controllers/admin/AdminPPreferencesController.php @@ -400,10 +400,8 @@ class AdminPPreferencesControllerCore extends AdminController 'hint' => $this->l('Enable to display Amenities filter.'), 'validation' => 'isBool', 'cast' => 'intval', - 'disabled' => (bool) !Feature::isFeatureActive(), 'required' => false, 'type' => 'bool', - 'desc' => (bool) !Feature::isFeatureActive() ? sprintf($this->l('The feature Features/Amenities has been disabled. You can enable it from %s page.'), ''.$this->l('Advanced Parameters > Performance').'') : '', ), 'SHOW_PRICE_FILTER' => array( 'title' => $this->l('Show Price filter'), diff --git a/modules/wkhotelfilterblock/views/templates/hook/htlfilterblock.tpl b/modules/wkhotelfilterblock/views/templates/hook/htlfilterblock.tpl index 6e5a207a7..7db81900d 100644 --- a/modules/wkhotelfilterblock/views/templates/hook/htlfilterblock.tpl +++ b/modules/wkhotelfilterblock/views/templates/hook/htlfilterblock.tpl @@ -19,7 +19,7 @@