Post by Vindojeens » Tue Nov 29, 2016 7:56 pm

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!

Newbie

Posts

Joined
Sun Nov 20, 2016 12:49 am

Post by thekrotek » Tue Nov 29, 2016 11:34 pm

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.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by IP_CAM » Wed Nov 30, 2016 1:23 am

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

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland
Who is online

Users browsing this forum: No registered users and 42 guests