A
A
Andrey2019-11-05 23:46:44
Sphinx
Andrey, 2019-11-05 23:46:44

Items out of stock at the end of the list on opencart for sphinx?

Good afternoon!
Faced such a problem, there is a site on opencart 2.3, sphinx is installed on it. It turns out that sorting is now configured on it, everything is indexed, it sorts everything as it should. But there is one thing, when sorting goods that are not available are displayed sorted at the beginning. How can sphinx make sure that products that are not available in the quantity field are always at the end of the list?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
djnick, 2019-11-15
@Andrey_Tech

It seems that you can write the order for each field
: $sphinx->SetSortMode(SPH_SORT_EXTENDED, 'available DESC, priced DESC, @weight DESC')

P
Puma Thailand, 2019-11-06
@opium

In the same SQL, just do a reverse sort

C
Chimaira, 2019-11-19
@Chimaira

I solved this issue through the Batch Editor - all products with a quantity of "not 0" - sort order 0, and those with a quantity of "0" - sort order 3. Thus, I have all the goods that are in stock - always at the beginning list and then they are sorted alphabetically

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question