Page 1 of 1

OC 3.0.2.0 - how to change sort order in Search results? + how to disable "search in descriptions"?

Posted: Thu Nov 23, 2017 4:45 am
by sitedeveloper999
OpenCart 3.0.2.0 + Journal2 theme.

Problem: when using the search function, the results are sorted by "Default" sort order.

How can I change it to sort by "Name A-Z" (ascending)?

I've found a couple of solutions on SO, but they relate to OC 2.x, not 3.x, and they didn't work when I tried to implement them.

Also, as a bonus, if anyone knows how to disable the "Search in product descriptions" by default, I would really appreciate it.

Re: OC 3.0.2.0 - how to change sort order in Search results? + how to disable "search in descriptions"?

Posted: Fri Dec 01, 2017 2:29 pm
by avarahvahin
you can remove search from descripition by commenting the code line.
$sql .= " OR pd.description LIKE '%" . $this->db->escape($data['filter_name']) . "%'";

from model file: catalog/model/catalog/product.php

If you need support please contact at: avarahvahin@gmail.com