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

load order problems

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #24862
    skempenaarskempenaar
    Participant

    Hi when i type in my searchbar “reflect leven” alot of other results load before the product that i try to find.

    order is set to
    relevance
    date desc

    it looks like
    1: grouping is static on alphabet
    2: product content load weight is higher than title.

    ive allready set the order to this value which imo should load the title that i enter popup first.
    any idea what might be the cause of this?

    example 1:
    https://cl.ly/9835950d8102/example%2525201.png

    example 2:
    https://cl.ly/76b86515ecbc/example%2525202.png

    #24873
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    Thank you for all the details, it helps a lot!

    Okay, the issue here is the results grouping. The “Reflect Leven” would be very likely returned first, but there is a taxonomy grouping enabled. The taxonomy “Binnenkort” alphabetically is above the “Boeken”, as you already suggested.

    There was a similar issue about a month ago. I am plannig to add an option to the grouping panel, that allows automatically re-ordering the groups by the most relevant items per each group. It should be available within the next upcoming release.

    #24874
    skempenaarskempenaar
    Participant

    Hi Ernest,

    thx ill disable grouping untill next release then.

    #27651
    skempenaarskempenaar
    Participant

    Hi Ernest,

    Im unable to reply on your call in other topic. but on our live server it works correct Im receiving a 0.

    https://www.royaljongbloed.com/wp-admin/admin-ajax.php
    also on
    http://rjvps.development.bladewp.com/wp-admin/admin-ajax.php

    I believe I know where my problem agenda 2021 was part of. We have products that are on backorder and ajax search pro sees that as sold out.
    So I like 2 use this code. But there is somehting that needs to be changed to it. Now when a product is on backorder it is put below other products
    Not related to the search simple because they are instock. Could you please change it that.

    If in stock and if backorder than put on top. If out of stock put to bottum.

    code

    // —- Ajax SEARCH PRO -put to bottom —-

    add_filter(‘asp_results’, ‘asp_order_out_of_scock’, 10, 1);
    function asp_order_out_of_scock($results) {
    $first = array();
    $last = array();
    foreach ( $results as $k => &$r ) {
    if ( get_post_meta($r->id, ‘_stock_status’, true) == ‘instock’ ) {
    $first[] = $r;
    } else {
    $last[] = $r;
    }
    }
    return array_merge($first, $last);
    }

    #27655
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    I checked the 403 error body response, and it contains something about Sucuri Firewall – possibly an IP block, or IP range block. We are behind a VPN and sucuri probably blocks it.

    Your tickets are automatically closing, because your support period was expired over 30 days ago.

    You can try the variation below, but I don’t know how exactly WooCommerce handles the back-order statuses, so this may not work:

    add_filter('asp_results', 'asp_order_out_of_scock', 10, 1);
    function asp_order_out_of_scock($results) {
    	$first = array();
    	$last = array();
    	foreach ( $results as $k => &$r ) {
    		if ( in_array( get_post_meta($r->id, '_stock_status', true), 
    		array('instock', 'backorder', 'onbackorder', 'onrequest') ) ) {
    			$first[] = $r;
    		} else {
    			$last[] = $r;
    		}
    	}
    	return array_merge($first, $last);
    }
Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘load order problems’ is closed to new replies.