Okay
  Public Ticket #2878739
Search plugin to show only visible products
Closed

Comments

  •  5
    Andreas started the conversation

    Hello there,

    We are facing an issue using search plugins, as the are not compatible with B2B plugin. The plugins are showing products that are hiden to some users and this is not something that we want on our eshop.
    Do you know any ajax search plugin to suggest that can show only the products that are visible to the current user?

    Thanks in advance

  •  2,218
    WebWizards replied

    Hi Andreas,

    When you use AJAX search plugins, please make sure to enable the following settings:

    B2BKing -> Settings -> Other -> Product Visibility Cache

    That setting can often make it work with AJAX searches


    Another point to make: Please make sure that when you test this, you do not test with a user that is admin or shop manager. For some technical reasons the plugin does not hide products in ajax for admin/shop manager users.



    With the 2 points above, many ajax search plugins should work. To give you an example, I know for sure this plugin can work https://wordpress.org/plugins/ajax-search-lite/, but many others should work as well.


    Kind regards,

    Stefan


  •   Andreas replied privately
  •  2,218
    WebWizards replied

    Ahh, I apologize, I confused that plugin with another one ...

    AJAX search lite can work also but it needs a modification in the code and there is no hook for itfrown.png 


    I wanted to suggest Ivory Search: https://wordpress.org/plugins/add-search-to-menu/

    I tested with it now. To configure it:

    1)

    First, go to Menu Search -> enable it in the menu

    5443771523.png

    also, scroll down and choose "default search form"

    6763869213.png

    Then go to Search Forms -> AJAX - enable ajax search

    6320726370.png

    In Search -> Post Types you can choose only Products:

    2632759726.png


    In custom CSS you can add:

    .is-ajax-search-details{
    display:none !important;
    }
    


    2)

    You should see something like:

    8350467217.png

    Also works with B2BKing visibility