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

Attachments

data_array_oc2.jpg

data_array_oc2.jpg (160.55 KiB) Viewed 1545 times


I am no longer active around here, to reach me, contact: jti@jacob.ch
My latest Freeware Opencart LIGHT Testsite, available on demand: http://www.ebikes.li/shop/
My 888 FREE OC Extension-Repositories - from OC v.1.5.x up,
on the largest OC Extension Github Site: https://github.com/IP-CAM
Image


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 7 guests