Post by lauraderoeck » Wed Jan 07, 2015 8:41 pm

Hi,

I want the products on my category page to display from new to old by default.
Can someone please tell me how to do this?

Thank you!

Laura

Newbie

Posts

Joined
Wed Jan 07, 2015 8:39 pm

Post by PatrickTT » Mon Jan 19, 2015 8:19 pm

Hi Laura, I just had to do this myself.

Open /catalog/controller/product/category.php

On or around line 21, change the code from:

Code: Select all

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

Code: Select all

if (isset($this->request->get['sort'])) {
	$sort = $this->request->get['sort'];
} else {
	$sort = 'p.date_added';
}
then on or around line 27, change

Code: Select all

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

Code: Select all

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

My OpenCart Store: http://www.daiisyboutique.com.au


Newbie

Posts

Joined
Fri Jan 16, 2015 12:22 am

Post by leandromello » Thu Jun 11, 2015 10:13 pm

I'm trying to do this by quantity.
I want the Out Stock to end of list...

How can i get this?

New member

Posts

Joined
Fri Oct 28, 2011 3:29 am
Who is online

Users browsing this forum: No registered users and 52 guests