Hello.
I am wondering how easy is to sort at admin area at Products listing by Date and not by name as it is now .
Using OC 3.0.3.6
I have bought a simple extension https://www.opencart.com/index.php?rout ... n_id=22186 but still I have to click to sort, and after import a product it gaves again sorting by name
Thanks
Contact extension developer.
Or change in the product controller and model: $sort = 'pd.name'; with $sort = 'p.date_added'; and ASC to DESC
Or change in the product controller and model: $sort = 'pd.name'; with $sort = 'p.date_added'; and ASC to DESC
Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer
admin/contoller/catalog/product.php -> function getList
find:
change to:
or:
admin/model/catalog/product.php -> function getProducts
change:
to:
find:
Code: Select all
if (isset($this->request->get['sort'])) {
$sort = $this->request->get['sort'];
} else {
$sort = 'pd.name';
}
Code: Select all
if (isset($this->request->get['sort'])) {
$sort = $this->request->get['sort'];
} else {
$sort = 'p.date_added'; // default sorting on date added
}
Code: Select all
if (isset($this->request->get['sort'])) {
$sort = $this->request->get['sort'];
} else {
$sort = 'p.date_modified'; // default sorting on date modified
}
admin/model/catalog/product.php -> function getProducts
change:
Code: Select all
$sort_data = array(
'pd.name',
'p.model',
'p.price',
'p.quantity',
'p.status',
'p.sort_order'
);
Code: Select all
$sort_data = array(
'pd.name',
'p.model',
'p.price',
'p.quantity',
'p.status',
'p.sort_order',
'p.date_added',
'p.date_modified'
);
Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces
“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.
Who is online
Users browsing this forum: No registered users and 388 guests