diff --git a/controllers/admin/AdminGroupsController.php b/controllers/admin/AdminGroupsController.php index 54ea51ffd..8aa6af2a8 100644 --- a/controllers/admin/AdminGroupsController.php +++ b/controllers/admin/AdminGroupsController.php @@ -126,7 +126,7 @@ class AdminGroupsControllerCore extends AdminController public function initPageHeaderToolbar() { - if (empty($this->display)) { + if (empty($this->display) && Configuration::get('PS_GROUP_FEATURE_ACTIVE')) { $this->page_header_toolbar_btn['new_group'] = array( 'href' => self::$currentIndex.'&addgroup&token='.$this->token, 'desc' => $this->l('Add new group', null, null, false), @@ -542,6 +542,13 @@ class AdminGroupsControllerCore extends AdminController public function renderList() { + if (!Configuration::get('PS_GROUP_FEATURE_ACTIVE')) { + $this->displayWarning(sprintf( + $this->l('The feature Customer Groups has been disabled. You can enable it from %s page.'), + ''.$this->l('Advanced Parameters > Performance').'' + )); + } + $unidentified = new Group(Configuration::get('PS_UNIDENTIFIED_GROUP')); $guest = new Group(Configuration::get('PS_GUEST_GROUP')); $default = new Group(Configuration::get('PS_CUSTOMER_GROUP')); diff --git a/controllers/admin/AdminPPreferencesController.php b/controllers/admin/AdminPPreferencesController.php index 1ea8b3f50..eb5b36a45 100644 --- a/controllers/admin/AdminPPreferencesController.php +++ b/controllers/admin/AdminPPreferencesController.php @@ -400,8 +400,10 @@ class AdminPPreferencesControllerCore extends AdminController 'hint' => $this->l('Enable to display Amenities filter.'), 'validation' => 'isBool', 'cast' => 'intval', + 'disabled' => (bool) !Configuration::get('PS_FEATURE_FEATURE_ACTIVE'), 'required' => false, 'type' => 'bool', + 'desc' => (bool) !Configuration::get('PS_FEATURE_FEATURE_ACTIVE') ? 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/controllers/admin/AdminPerformanceController.php b/controllers/admin/AdminPerformanceController.php index 4a0b4b123..ac7f60298 100644 --- a/controllers/admin/AdminPerformanceController.php +++ b/controllers/admin/AdminPerformanceController.php @@ -212,27 +212,27 @@ class AdminPerformanceControllerCore extends AdminController 'type' => 'hidden', 'name' => 'features_detachables_up' ), - array( - 'type' => 'switch', - 'label' => $this->l('Combinations'), - 'name' => 'combination', - 'is_bool' => true, - 'disabled' => Combination::isCurrentlyUsed(), - 'values' => array( - array( - 'id' => 'combination_1', - 'value' => 1, - 'label' => $this->l('Yes'), - ), - array( - 'id' => 'combination_0', - 'value' => 0, - 'label' => $this->l('No') - ) - ), - 'hint' => $this->l('Choose "No" to disable Product Combinations.'), - 'desc' => Combination::isCurrentlyUsed() ? $this->l('You cannot set this parameter to No when combinations are already used by some of your products') : null - ), + // array( + // 'type' => 'switch', + // 'label' => $this->l('Combinations'), + // 'name' => 'combination', + // 'is_bool' => true, + // 'disabled' => Combination::isCurrentlyUsed(), + // 'values' => array( + // array( + // 'id' => 'combination_1', + // 'value' => 1, + // 'label' => $this->l('Yes'), + // ), + // array( + // 'id' => 'combination_0', + // 'value' => 0, + // 'label' => $this->l('No') + // ) + // ), + // 'hint' => $this->l('Choose "No" to disable Product Combinations.'), + // 'desc' => Combination::isCurrentlyUsed() ? $this->l('You cannot set this parameter to No when combinations are already used by some of your products') : null + // ), array( 'type' => 'switch', 'label' => $this->l('Features'), diff --git a/modules/wkhotelfilterblock/views/templates/hook/htlfilterblock.tpl b/modules/wkhotelfilterblock/views/templates/hook/htlfilterblock.tpl index 7db81900d..6e5a207a7 100644 --- a/modules/wkhotelfilterblock/views/templates/hook/htlfilterblock.tpl +++ b/modules/wkhotelfilterblock/views/templates/hook/htlfilterblock.tpl @@ -19,7 +19,7 @@