Okay
  Public Ticket #2964852
Search form for product display "hidden" products
Closed

Comments

  •  8
    benoitfouc33 started the conversation

    Hello there, since one of the last update of salient, we can now configure the header search form to limit search by post type. 

    I've set in to Products because it's a WooCommerce website :f0e7a82825400a5ef46a076e07e2a8b1.png


    That is working, that display only products from ajax display318417bdd2625451ffa21bd0646879c6.png


    BUT, as you can see on this example, there is product to 0€, it's normal it's my hidden products. i've configure these product to NOT SHOWING on shop and search results : 

    a8ddd5b685563dfc05311dc2f920e6a2.png


    But this new feature show the hidden product on ajax search (search preview results). I know it's a new feature so it's normal to have some issues like that, a fix can be possible ? :)


    have a great day, from france 🌞

  •  1,882
    Judith replied

    Hi There,

    Thanks for keeping in touch,

    Please allow me to escalate this to the developer to respond further.

    Thanks.

  •  1,077
    ThemeNectar replied

    Hey benoitfouc33smile.png

    Thanks for mentioning this - I'll be including the fix in the upcoming minor release.

    If you'd like to make the change on your end now, you can add the following snippet to your child theme functions.php file:

    add_filter('nectar_quick_search_query','salient_child_ajax_search_mod');
    function salient_child_ajax_search_mod($arr) {
      $arr['tax_query'] = array(
        array(
          'taxonomy' => 'product_visibility',
          'field'    => 'name',
          'terms'    => 'exclude-from-catalog',
          'operator' => 'NOT IN',
        ),
      );
      return $arr;
    }
    

    Kind regards,

  •  8
    benoitfouc33 replied

    Hello there, thanks for reply. 

    If the next minor release come soon, i will wait 😊

    Thanks for the fix,

    regards