Hi, i would like to implement my own bulk action function, like the one default in PS16 - change order status.
I was able to add a new button under the change order status, modified AdminOrdersController and added $this->bulk_actions my new action, but i can't figure out how to make own functions to process selected orders.
I think after clicking change order status is called function renderList() in AdminOrdersController.php to show options of statuses
public function renderList() { if (Tools::isSubmit('submitBulkupdateOrderStatus'.$this->table)) { if (Tools::getIsset('cancel')) Tools::redirectAdmin(self::$currentIndex.'&token='.$this->token); $this->tpl_list_vars['updateOrderStatus_mode'] = true; $this->tpl_list_vars['order_statuses'] = $this->statuses_array; $this->tpl_list_vars['REQUEST_URI'] = $_SERVER['REQUEST_URI']; $this->tpl_list_vars['POST'] = $_POST; } return parent::renderList(); }
and then function processBulkUpdateOrderStatus() to handle the selected.
Can somebody help me where can I add my own function or how to process the selected orders? Thx in advance for any help.