diff --git a/classes/helper/HelperList.php b/classes/helper/HelperList.php index b7deb6e3d..1df950daa 100644 --- a/classes/helper/HelperList.php +++ b/classes/helper/HelperList.php @@ -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( diff --git a/controllers/admin/AdminStatusesController.php b/controllers/admin/AdminStatusesController.php index 35ed6c7c5..aa1f49146 100644 --- a/controllers/admin/AdminStatusesController.php +++ b/controllers/admin/AdminStatusesController.php @@ -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); + } } - -