Update working of options Features and Customer Groups

This commit is contained in:
Abhishek Kumar
2023-09-20 19:10:11 +05:30
parent c4d30a80ee
commit dab830fcce
5 changed files with 33 additions and 23 deletions

View File

@@ -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.'),
'<a href="'.$this->context->link->getAdminLink('AdminPerformance').'#fieldset_2_2" target="_blank">'.$this->l('Advanced Parameters > Performance').'</a>'
));
}
$unidentified = new Group(Configuration::get('PS_UNIDENTIFIED_GROUP'));
$guest = new Group(Configuration::get('PS_GUEST_GROUP'));
$default = new Group(Configuration::get('PS_CUSTOMER_GROUP'));