Link

Tuesday, 25 October 2016

Open Cart how to display shipping_method in the backend recent orders

Good day everyone

im using open cart 2.2 in my backend page "admin/index.php?route=common/dashboard" theres a table of recent_orders i also want to display the shipping_method(see attached pic).

i think this 2 file below that i needed to edit to get what im trying to do..

heres the recent.php] : came from admin/controler/dashboard

<?php
class ControllerDashboardRecent extends Controller {
public function index() {
$this->load->language('dashboard/recent');

$data['heading_title'] = $this->language->get('heading_title');

$data['text_no_results'] = $this->language->get('text_no_results');

$data['column_order_id'] = $this->language->get('column_order_id');
$data['column_customer'] = $this->language->get('column_customer');
$data['column_status'] = $this->language->get('column_status');
$data['column_date_added'] = $this->language->get('column_date_added');
$data['column_total'] = $this->language->get('column_total');
$data['column_action'] = $this->language->get('column_action');

$data['button_view'] = $this->language->get('button_view');

$data['token'] = $this->session->data['token'];

// Last 5 Orders
$data['orders'] = array();

$filter_data = array(
'sort' => 'o.date_added',
'order' => 'DESC',
'start' => 0,
'limit' => 5
);

$results = $this->model_sale_order->getOrders($filter_data);

foreach ($results as $result) {
$data['orders'][] = array(
'order_id' => $result['order_id'],
'customer' => $result['customer'],
'status' => $result['order_status'],
'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])),
'total' => $this->currency->format($result['total'], $result['currency_code'], $result['currency_value']),
'view' => $this->url->link('sale/order/info', 'token=' . $this->session->data['token'] . '&order_id=' . $result['order_id'], true),
);
}

return $this->load->view('dashboard/recent', $data);
}
}

No comments:

Post a Comment