Undo changes in Features option and Update Groups option
This commit is contained in:
@@ -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.'),
|
||||
'<a href="'.$this->context->link->getAdminLink('AdminPerformance').'#fieldset_2_2" target="_blank">'.$this->l('Advanced Parameters > Performance').'</a>'
|
||||
));
|
||||
|
||||
$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.'),
|
||||
'<a href="'.$this->context->link->getAdminLink('AdminPerformance').'#fieldset_2_2" target="_blank">'.$this->l('Advanced Parameters > Performance').'</a>'
|
||||
));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$unidentified = new Group(Configuration::get('PS_UNIDENTIFIED_GROUP'));
|
||||
|
||||
@@ -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.'), '<a href="'.$this->context->link->getAdminLink('AdminPerformance').'#fieldset_2_2" target="_blank">'.$this->l('Advanced Parameters > Performance').'</a>') : '',
|
||||
),
|
||||
'SHOW_PRICE_FILTER' => array(
|
||||
'title' => $this->l('Show Price filter'),
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
<div id="filter_results" class="row block">
|
||||
<div class="col-sm-12">
|
||||
{if isset($config) && $config['PS_FEATURE_FEATURE_ACTIVE'] && $config['SHOW_AMENITIES_FILTER']}
|
||||
{if isset($config) && $config['SHOW_AMENITIES_FILTER']}
|
||||
<div class="row margin-lr-0 layered_filter_cont">
|
||||
<div class="col-sm-12 layered_filter_heading">
|
||||
<div class="row margin-lr-0">
|
||||
|
||||
@@ -153,7 +153,6 @@ class wkhotelfilterblock extends Module
|
||||
return array(
|
||||
'SHOW_AMENITIES_FILTER' => Configuration::get('SHOW_AMENITIES_FILTER'),
|
||||
'SHOW_PRICE_FILTER' => Configuration::get('SHOW_PRICE_FILTER'),
|
||||
'PS_FEATURE_FEATURE_ACTIVE' => Feature::isFeatureActive(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user