K
K
kk952019-05-17 12:59:33
CMS
kk95, 2019-05-17 12:59:33

How to change the sorting of products that drop out when requested from the search box (opencart 2.3)?

How to change sorting in product categories is clear. And how to change the way of sorting products that appear on demand from the search box. There are a lot of accessories, and it turns out that you drive iphone 8 into the search field and on the first page there are only accessories and spare parts, and the smartphone itself is on some n-th page. As I understand it, there is a default sorting alphabetically. And it is necessary that it was by the "sort order" parameter or by cost.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
zoozag, 2019-05-17
@zoozag

Most likely you have some module for ajax search.
See the controller to which it refers.
It usually contains an array with search data:
$filter_data
It has a 'order' field, set it to 'p.sort_order' or 'p.price'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question