Answer the question
In order to leave comments, you need to log in
How to organize sorting in pdoPage?
Last year I already solved this problem now I can’t remember what I did at all.
The essence of the problem:
it sorts the
subcategory
100 rubles.
102 rub.
103 rub.
subcategory
99 rub.
100 rub.
subcategory
88 rub.
100 rub.
How to make subcategories not affect sorting?
those. so
88 rubles.
99 rub.
100 rub.
102 rub.
103 rub.
I bring it out like this
$sort = $_GET['sort'];
if($sort == '') {
$output='&sortby=`{"editedon":"DESC"}`';
} else {
$output = '&sortby=`{"'.$sort.'":"'.$_GET['dir'].'"}`';
}
return $output;
Answer the question
In order to leave comments, you need to log in
Figured out the answer, found it in old questions, I was stupid, the price should have had a price type and not a text
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question