Page 1 of 1

Display latest products in category page.

Posted: Tue Nov 29, 2016 7:56 pm
by Vindojeens
Hi folks,

I wanted to change the order the products are displayed on the category page.
I read a post where it says you have to change:

catalog/controller/product/category.php.

Replace $sort = 'p.sort_order'; with $sort = 'p.date_added'; and so on.

Here is the post:

viewtopic.php?f=20&t=100340

It's from 2013 so maybe it isn't working with Opencart 2.3 (what I use).

When I make all the changes, it does nothing.

Can someone tell me how to change the default order in which products are displayed on the category page to newest first?

Thanks a lot!

Re: Display latest products in category page.

Posted: Tue Nov 29, 2016 11:34 pm
by thekrotek
If you followed the solution from that post from 2013 and found all mentioned strings in all mentioned files, then it should work. Not much has changed in this part since than. If you've made a changed right in the core files and have VQMod installed, then you might want to refresh you vqmod/modification cache. At a first glance, given solution looks legit.

Re: Display latest products in category page.

Posted: Wed Nov 30, 2016 1:23 am
by IP_CAM
possibly exept for this, found after a short look into the VqMod:

Code: Select all

$this->data['sorts'][] = array(
wich should look like this, in later OC-2 Versions:

Code: Select all

$data['sorts'][] = array(
Ernie