Answer the question
In order to leave comments, you need to log in
How can I get the shipping method in the order_list?
Good afternoon, as far as you can see, one controller is responsible for order_list and order_info. BUT how in order_list (, you can get the shipping method
Answer the question
In order to leave comments, you need to log in
In the index method of the order.php controller after the lines -
$data['orders'][] = array(
'order_id' => $result['order_id'],
'name' => $result['firstname'] . ' ' . $result['lastname'],
'status' => $result['status'],
'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])),
'products' => ($product_total + $voucher_total),
'total' => $this->currency->format($result['total'], $result['currency_code'], $result['currency_value']),
'view' => $this->url->link('account/order/info', 'order_id=' . $result['order_id'], true),
);
$totals = $this->model_account_order->getOrderTotals($result['order_id']);
foreach ($totals as $total) {
if($total['code'] == 'shipping'){
$data['shipping'] = array(
'title' => $total['title'],
'value' => $total['value'],
);
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question