Issue with Global Search Query Filter in Header

This topic has 4 replies, 2 voices, and was last updated 9 months, 2 weeks ago ago by Rose Tyler

  • Avatar: EW
    EmporioWeb
    Participant
    March 8, 2024 at 16:07

    Problem Description:
    When I enter a specific keyword in the search field located in the header, the displayed search results include products that are not relevant to the entered keyword. For instance, when typing the word “USB,” the search results include unrelated items such as two trolleys and a Bluetooth speaker.

    Additionally, when performing a search on the Shop page, pressing the search icon reveals 124 results. However, with only one USB product (available in 8 colors), the initial results include USB product variants, but subsequent results feature unrelated items like backpacks, keychains, etc.

    This issue persists even when entering the brand name in the search field.

    We expect the search functionality to display accurate and relevant results based on the entered keyword, ensuring that unrelated products and variants are not included in the search results.

    Current Filter Settings:
    Ajax Search: On
    Search By: Product
    Search By SKU: On
    Search By Category: On
    Search Product Variations: Off

    Could you please check and provide a solution.

    Thank you,

    Please, contact administrator
    for this information.
    3 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    March 8, 2024 at 16:49

    Hello, EmporioWeb,

    Thank you for reaching out to us with your concerns regarding the search functionality on your website.

    Please downgrade the PHP version to 8.0 or 8.1.
    After completing this step, please proceed to test the search feature to see if the issue has been resolved.

    Should you continue to experience difficulties or if the problem persists, please do not hesitate to get back to us for further assistance.

    Best Regards,
    8Theme’s Team

    Avatar: EW
    EmporioWeb
    Participant
    March 8, 2024 at 17:44

    Thank you for your quick response and guidance. We followed your instructions and downgraded the PHP version as suggested. However, we regret to inform you that the issue with the global filter still persists.

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    March 11, 2024 at 09:10

    Hello, EmporioWeb,

    We have begun investigating potential inaccuracies by reviewing the active options you have enabled. Currently, you have activated “Variations as simple products (beta)” -> [(https://prnt.sc/CXOeIS-Sk6sq%5D, indicating that product variations are displayed individually as separate, simple products on product archive pages. The fact that we label it as Beta implies that this option may encounter conflicts. Hence, you are experiencing an abundance of products found after a successful search -> [https://prnt.sc/zdhOxJUtoD-x]. Disabling this option would result in the same number of Ajax search results compared to page results -> [https://prnt.sc/XSEXDS8-4ogb].

    In the header search settings, you have the “Search product variations” option disabled, meaning that the number of variable products (not variations) displayed in Ajax search results is currently 5 items for the search term “usb” -> [https://prnt.sc/rxn4MIUJUwH-].

    Once we activate the “Search product variations” option in header search settings but deactivate the “Variations as simple products (beta)” option, you can observe that the results for the search term “usb” are now accurate -> [https://prnt.sc/HzCQcQBVI9Ff]. It appears that these options conflict in the code.

    Additionally, we noticed that the count displayed next to the product title is slightly incorrect (currently displaying 12 products while WooCommerce indicates 13 as the total of all items displayed on the page) -> [https://prnt.sc/VABE2DzwRizd]. As a workaround for this issue, we suggest hiding the product count on the search results page using the following custom CSS:

    .search-results .content-page .products-title span:first-child:not(:only-child) {
        display: none;
    }

    To summarize, the solutions we implemented for you are as follows:
    1. Activated the “Search product variations” option in header search settings.
    2. Deactivated “Variations as simple products (beta)” in WooCommerce -> Shop -> Products Design.
    3. Added custom CSS to your Theme Options -> Theme Custom CSS -> Global CSS -> [Screenshot](https://prnt.sc/0vlNHOX2U7At).

    The results for searching the test word “usb” are now accurate: [Ajax search](https://prnt.sc/VpuLbCAADujm) + [Search page](https://prnt.sc/TS56PldGmWig).

    We hope this information is helpful.

    Best Regards,
    8Theme’s Team

  • Viewing 4 results - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.