Flattr this!

Modify Sort Order by Recent Date for Products on Admin Panel, Opencart:

In the file admin/controller/catalog/product.php

Find the following code:

	if (isset($this->request->get['sort'])) {
			$sort = $this->request->get['sort'];
		} else {
			$sort = 'pd.name';
		}

		if (isset($this->request->get['order'])) {
			$order = $this->request->get['order'];
		} else {
			$order = 'ASC';
		}

Replace with following code:

if (isset($this->request->get['sort'])) {
 $sort = $this->request->get['sort'];
 } else {
 $sort = 'p.date_added';
 }

 if (isset($this->request->get['order'])) {
 $order = $this->request->get['order'];
 } else {
 $order = 'DESC';
 }

In the file admin/model/catalog/product.php add the red marked code

$sort_data = array(
				'pd.name',
				'p.model',
				'p.price',
				'p.quantity',
				'p.status',
				'p.sort_order',
 'p.date_added' //add this column name
			);