This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

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

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #36164
    wildguitars06wildguitars06
    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 MarcinkoErnest 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

    #36170
    wildguitars06wildguitars06
    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 MarcinkoErnest 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.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.