[-] BO : fixed filters on statuses tab #PSCFV-5763
This commit is contained in:
@@ -261,7 +261,7 @@ class HelperListCore extends Helper
|
||||
$path_to_image = _PS_IMG_DIR_.$params['image'].'/'.Image::getImgFolderStatic($tr['id_image']).(int)$tr['id_image'].'.'.$this->imageType;
|
||||
$this->_list[$index][$key] = ImageManager::thumbnail($path_to_image, $this->table.'_mini_'.$item_id.'.'.$this->imageType, 45, $this->imageType);
|
||||
}
|
||||
elseif (isset($params['icon']) && (isset($params['icon'][$tr[$key]]) || isset($params['icon']['default'])))
|
||||
elseif (isset($params['icon']) && isset($tr[$key]) && (isset($params['icon'][$tr[$key]]) || isset($params['icon']['default'])))
|
||||
{
|
||||
if (isset($params['icon'][$tr[$key]]) && is_array($params['icon'][$tr[$key]]))
|
||||
$this->_list[$index][$key] = array(
|
||||
|
||||
@@ -50,7 +50,7 @@ class AdminStatusesControllerCore extends AdminController
|
||||
if (Tools::isSubmit('updateorder_return_state'))
|
||||
$this->display = 'edit';
|
||||
|
||||
parent::init();
|
||||
return parent::init();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -114,7 +114,6 @@ class AdminStatusesControllerCore extends AdminController
|
||||
'width' => 120
|
||||
)
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -142,10 +141,6 @@ class AdminStatusesControllerCore extends AdminController
|
||||
'color' => 'color'
|
||||
)
|
||||
);
|
||||
|
||||
// call postProcess() for take care about actions and filters
|
||||
$this->postProcess();
|
||||
$this->toolbar_title = $this->l('Return statuses');
|
||||
}
|
||||
|
||||
protected function initOrderReturnsForm()
|
||||
@@ -193,8 +188,14 @@ class AdminStatusesControllerCore extends AdminController
|
||||
$lists = parent::renderList();
|
||||
|
||||
//init and render the second list
|
||||
$this->_filter = false;
|
||||
$this->initOrdersReturnsList();
|
||||
|
||||
// call postProcess() to take care of actions and filters
|
||||
$this->postProcess();
|
||||
$this->toolbar_title = $this->l('Return statuses');
|
||||
$this->checkFilterForOrdersReturnsList();
|
||||
|
||||
parent::initToolbar();
|
||||
$lists .= parent::renderList();
|
||||
|
||||
@@ -393,7 +394,6 @@ class AdminStatusesControllerCore extends AdminController
|
||||
return $helper->generateForm($this->fields_form);
|
||||
}
|
||||
|
||||
|
||||
protected function getTemplates($iso_code)
|
||||
{
|
||||
$array = array();
|
||||
@@ -410,7 +410,6 @@ class AdminStatusesControllerCore extends AdminController
|
||||
return $array;
|
||||
}
|
||||
|
||||
|
||||
public function postProcess()
|
||||
{
|
||||
if (Tools::isSubmit($this->table.'Orderby') || Tools::isSubmit($this->table.'Orderway'))
|
||||
@@ -501,6 +500,13 @@ class AdminStatusesControllerCore extends AdminController
|
||||
else
|
||||
return parent::postProcess();
|
||||
}
|
||||
|
||||
protected function filterToField($key, $filter)
|
||||
{
|
||||
if ($this->table == 'order_state')
|
||||
$this->initOrderStatutsList();
|
||||
elseif ($this->table == 'order_return_state')
|
||||
$this->initOrdersReturnsList();
|
||||
return parent::filterToField($key, $filter);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user