Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Sorting results by number of sales or page views
This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko 1 year, 2 months ago.
- AuthorPosts
- January 4, 2022 at 8:16 am #36164
Hi Ernest,
I hope you’re doing well! Happy New Year, my friend.
I’ve reached the conclusion that I’m not entirely satisfied with the current order of the search results. Is it possible to sort the results according to number of sales or number of page views? I could not find these options in the “Relevance options” page.Thanks,
TomJanuary 4, 2022 at 12:54 pm #36168Hi Tom,
Thank you, I wish you a Happy New Year too!
I believe the page view is not counted in any field, but the sales number is tracked in WooCommerce. For that you can use this setup: https://i.imgur.com/wjkuNDJ.png
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
January 4, 2022 at 12:57 pm #36170Thank you for the prompt reply, Ernest! And for providing the requested setup.
Page views would have been the ideal ordering for my situation, it’s a shame it isn’t possible.
If I set it up according to sales number, what will happen if for example none of the search results have sold through the website?January 4, 2022 at 1:22 pm #36172I honestly don’t know. The “total_sales” custom field is set by the Woocommerce plugin. If there were no sales, then that number should be 0, and in that case (and in every case where the numbers are equal) the secondary ordering is used, which you can also set on that same page.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.