简体   繁体   中英

Opencart 2.3 order history comment in order list

Task: need to show last admin comment (order history) to a order list page. Add to a admin/controller/sale in function getList() $data['orders'][] = array code

'admin_comments'     => $this->model_sale_order->getOrderHistories('sale/order_history', 'token=' . $this->session->data['token'] . '&order_id=' . $result['order_id'])

But it does not work. How do I correctly get an array with the history of each order? Thanks in advance

You are confusing building a URL with calling a function. You just need the latter.

'admin_comments'     => $this->model_sale_order->getOrderHistories(
                           $result['order_id']); 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM