Advertisement:

Author Topic: Custom query search with asc/desc sort order or min/max price range sorting  (Read 183 times)

Resta

  • Sr. Member
  • ****
  • Posts: 285
Hello,

Is it possible to use custom query search with ability to sort listings by ascending/descending order or min/max price sorting? If so, please provide some details as to how to do this.

Thanks!

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1527
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Re: Custom query search with asc/desc sort order or min/max price range sorting
« Reply #1 on: September 11, 2018, 10:31:26 pm »
Min max price order is already implemented.

Resta

  • Sr. Member
  • ****
  • Posts: 285
Re: Custom query search with asc/desc sort order or min/max price range sorting
« Reply #2 on: September 12, 2018, 01:35:35 am »
No information at - https://doc.osclass.org/Display_only_certain_type_of_listings

So, which one do I use for the array to limit max price?

"sPriceMax" =>

or

"price_max" =>
« Last Edit: September 12, 2018, 08:22:42 am by Resta »

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1527
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Re: Custom query search with asc/desc sort order or min/max price range sorting
« Reply #3 on: September 12, 2018, 09:43:14 pm »
/search/sOrder,dt_pub_date/iOrderType,desc/sPriceMax,200

Resta

  • Sr. Member
  • ****
  • Posts: 285
Re: Custom query search with asc/desc sort order or min/max price range sorting
« Reply #4 on: September 13, 2018, 02:37:38 am »
Marius,

Isn't what you posted above is for regular search? 

I am looking for a solution with osc_custom_query as I linked above. Thanks!

fog

  • Hero Member
  • *****
  • Posts: 989
Re: Custom query search with asc/desc sort order or min/max price range sorting
« Reply #5 on: September 13, 2018, 08:35:02 pm »
About internal function: osc_query_item();

Exist a limited list of available keywords to use ($params), on osclass code.

The list is there in the end of page:

https://doc.osclass.org/Display_only_certain_type_of_listings#List_of_available_keywords

If that list was not upadated so far, is the only available to use at this moment.

I know you asked, but why you think with this internal function you will sort results to order type to min/max price?

Unless you need explain better what you trying to do.

Regards