Page 1 of 1

Sort products by date - admin

Posted: Wed Aug 07, 2013 12:15 am
by baronen
Hello.
How do I configure productpanel in admin to sort by date and not by name?
I've tried some extensions that didn't work and I've tried to change in the php file without luck.

How is we supposed to get controll over new products if they are not sorted by date?

Re: Sort products by date - admin

Posted: Fri Aug 09, 2013 10:48 pm
by butte
In phpMyAdmin you can sort the table by date (last two fields on the right).

Re: Sort products by date - admin

Posted: Thu Nov 07, 2013 4:44 am
by matte2k
Is there an answer to this. Im not at all comfortable with phpMyAdmin

Re: Sort products by date - admin

Posted: Thu Nov 07, 2013 5:49 am
by butte
What are your version and theme?

Re: Sort products by date - admin

Posted: Thu Nov 07, 2013 5:52 am
by matte2k
butte wrote:What are your version and theme?
OC 1.5.5.1 with theme MetroShop

Re: Sort products by date - admin

Posted: Thu Nov 07, 2013 7:37 am
by butte
Does admin still have the same look and feel that it did before you installed the MetroShop theme, that is, admin is nothing like the MetroShop storefront?

Re: Sort products by date - admin

Posted: Thu Nov 07, 2013 1:38 pm
by matte2k
Yes. The admin has still default theme.

Re: Sort products by date - admin

Posted: Fri Nov 15, 2013 11:28 am
by khurrum
In the file admin/controller/catalog/product.php

Find the following code:

Code: Select all

	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:

Code: Select all

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
);

Re: Sort products by date - admin

Posted: Sun Sep 25, 2016 3:30 pm
by Mahakal
I did it,it is not working.

Re: Sort products by date - admin

Posted: Tue Sep 27, 2016 4:35 am
by victorj

Re: Sort products by date - admin

Posted: Thu Jun 15, 2017 4:24 pm
by nihal31
replace 'pd.name' with 'p.date_added'

Re: Sort products by date - admin

Posted: Fri Jun 16, 2017 6:09 am
by kuebantall
Is there a free module for this function?

Re: Sort products by date - admin

Posted: Fri Jun 16, 2017 6:23 am
by victorj

Re: Sort products by date - admin

Posted: Sun Jun 18, 2017 5:16 pm
by sdsoftware
You can check the module victorj mentioned which is free and seems nice.

Or you can check my module Admin Category/Manufacturer/Attribute Filter that CAN sort by date added as well among others!

Re: Sort products by date - admin

Posted: Fri Jul 19, 2019 2:27 am
by williamino
victorj wrote:
Tue Sep 27, 2016 4:35 am
working module to sort products

http://www.opencart.com/index.php?route ... _license=0
we need current version of this somebody please!

Re: Sort products by date - admin

Posted: Fri Jul 19, 2019 2:30 am
by williamino
we need this for OC. 3.03 etc please!