Sorting results by number of sales or page views

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 Ernest Marcinko 8 months, 4 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #36164
    wildguitars06
    wildguitars06
    Participant

    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,
    Tom

    #36168
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi 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 :)


    #36170
    wildguitars06
    wildguitars06
    Participant

    Thank 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?

    #36172
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    I 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 :)


Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.