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

Forum Replies Created

Viewing 15 posts - 16 through 30 (of 41 total)
  • Author
    Posts
  • in reply to: Product tags not working anymore #29773
    skempenaarskempenaar
    Participant

    nevermind i found that problem is caused by this line being disabled. this is really powerfull feuture.

    Override the default WordPress search results with results from this search instance?

    in reply to: load order problems #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);
    }

    in reply to: Product doesn't show up #27621
    skempenaarskempenaar
    Participant

    Hi,

    i cant find my product “max lucado agenda 2021”.

    ive checked if it has something to do with exclude products but thats not the case
    rerun the index did not fix it.

    in reply to: show out of stock label in results #27471
    skempenaarskempenaar
    Participant

    Hi ernst,

    quick question about the following code. we have products in backorder that
    load below the products that are instock. i would like it to function only if it is out of stock.

    // —- 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);
    }

    in reply to: Products attributes in the resultbox #26061
    skempenaarskempenaar
    Participant

    done!

    in reply to: Products attributes in the resultbox #26059
    skempenaarskempenaar
    Participant

    yet again! works like a charm:D

    in reply to: Products attributes in the resultbox #26048
    skempenaarskempenaar
    Participant

    allright one last question:) are woocommerce star reviews even possible?

    in reply to: Products attributes in the resultbox #26047
    skempenaarskempenaar
    Participant

    im sorry did look that up in the docs. thx!!!!

    in reply to: Products attributes in the resultbox #26043
    skempenaarskempenaar
    Participant

    Thx works like a charm!. what if i want to have a separator between it but only displayed when there is content.

    in reply to: Hide out of stock (only in resultbox) #25809
    skempenaarskempenaar
    Participant

    absolutly love you!!!! this works like a charm!

    my solution did not work on “max lucado” since the title was provided with max lucado

    in reply to: Hide out of stock (only in resultbox) #25804
    skempenaarskempenaar
    Participant

    Hi Ernst,

    found a solution. we add a tag (name of the author) of the book author if the product is in stock. our books are being imported overnight so with the following code our in stock products get reordered in ajax search pro. simply because the tag is present.

    function set_author_to_tag($ProductAvailability, $value) {
    if($ProductAvailability == ’21’ )
    print_r($value);
    if($ProductAvailability == ’22’ )
    print_r($value);
    if($ProductAvailability == ’23’ )
    print_r($value);
    if($ProductAvailability == ’10’ )
    print_r($value);
    if($ProductAvailability == ’30’ )
    print_r($value);
    if($ProductAvailability == ’32’ )
    print_r($value);
    }
    function author_select($ProductAvailability, $type, $data){
    $roles = [‘auteur’ => ‘A01′,’illustrator’ => ‘A12′,’vertaler’ => ‘B06′,’redacteur’ => ‘B01’,];
    $currentRole = $roles[$type];
    $contributors = [];

    foreach ($data as $key => $contributor) {
    $role = $contributor[0];
    $first_name = $contributor[1];
    $prefix = $contributor[2];
    $last_name = $contributor[3];

    if ($role === $currentRole) {
    $prefix = ($prefix) ? $prefix . ‘ ‘ : ”;

    // We have a winner
    $contributors[$first_name . ‘ ‘ . $prefix . $last_name . ‘; ‘] = $key;
    }
    }
    $value = implode(array_flip($contributors));
    set_author_to_tag($ProductAvailability, $value);
    }

    in reply to: Hide out of stock (only in resultbox) #25802
    skempenaarskempenaar
    Participant

    You cannot access this content.

    in reply to: Hide out of stock (only in resultbox) #25800
    skempenaarskempenaar
    Participant

    You cannot access this content.

    in reply to: Hide out of stock (only in resultbox) #25788
    skempenaarskempenaar
    Participant

    Hi ernst,

    yes that’s it indeed. relevance must be primairy and that does fits our needs for the most. stock status as secondary doesn’t do the trick.
    its not possible to lower the relevance if a product is out of stock?

    cheers.

    in reply to: Hide out of stock (only in resultbox) #25772
    skempenaarskempenaar
    Participant

    Hi Ernst,

    great. this indeed fixed that. sadly, id does create new one. check image.

    the book title isn’t populating with this setting.

    https://www.royaljongbloed.com/nl/product/kom-en-zie/

Viewing 15 posts - 16 through 30 (of 41 total)