Home Forums WoodMart support forum Search bar issues

Search bar issues

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #695187

    tomass
    Participant

    Hello,

    There is an issue with the product search, it doesnt show any results if i write an exact match with a product name. For example, if i write “Bel” it will show the one product Belt, but if i write exactly “Belt” it shows no results and if i press enter it takes to the product page.

    #695357

    Hello,

    I have checked your site and noticed that you have 5 products with the exact same details: same title, description, price, category, and SKU (woo-belt). The only difference between them is the product ID.

    This is why the search is not returning results correctly for an exact match — WooCommerce search can get confused when multiple products have identical information.

    To resolve this, you should ensure that each product has unique titles and information. Once the products are unique, the search functionality will work as expected.

    Best Regards,

    #695446

    tomass
    Participant

    It still doesnt show the results for an exact match, i checked so there are no duplicate products. Skus for the same product in different language should be the same so i cant change that.

    #695588

    Hello,

    The search functionality is handled by WooCommerce. Could you please check how it works with some default WordPress themes like WooCommerce Storefront to understand if it is our theme issue or not?

    Best Regards,

    #696045

    tomass
    Participant

    Hey,

    I tried with the woocommerce store front but it doesnt have the ajax search results that show up, it only searches when i hit enter. So i believe this is woodmart issue, because i dont have any plugins for search.

    #696122

    Hello,

    When there are multiple products with the exact same title, WooCommerce treats the exact-match search as a direct product lookup.

    So typing “Belt” and pressing Enter triggers WooCommerce’s built-in behavior:

    • If the search term is an exact product title
    • And multiple products share the same title
    • WooCommerce redirects directly to one of those product pages (usually the first one in the database)

    This is the same behavior you saw in Storefront — pressing Enter also loads one of the products directly, not a product archive.

    Woodmart adds AJAX suggestions, but the final search redirect is still controlled by WooCommerce.

    So the underlying redirect behavior is the same.

    To verify this behavior fully:

    1. Rename one product to “Belt – Blue” or “Belt v2”
    2. Search “Belt” again
    3. You will see the normal results page instead of being redirected.

    Hope you can understand!

    Best Regards,

    #696441

    tomass
    Participant

    Hello,

    Yeah i understand that if there are multiple products and you hit enter it takes you to the product archive, but if i search the exact match, it doesnt appear in the ajax suggestions. It would be fine if it apeared and it would redirect, but right now the client would search the product and he would think that the product isnt there, because it doesnt appear in the search suggestions.

    I deleted the duplicate products, i translated the belt product for both languages, and it still works the same, i search belt and it doesn’t show the suggestions.

    Maybe i wasnt clear enough at the start, i want the exact match single suggestion to show. I have seen this in multiple projects now, its a bit annoying.

    #696507

    Hello,

    When the search term is exactly the same as the product title, WooCommerce treats it as a “direct match,” and the AJAX query sometimes returns 0 results, while the non-AJAX search still finds it.

    Please try one quick test:

    Rename the product from “Belt” to “Belt ” with a “Belt – A” temporarily.

    You will immediately see the AJAX suggestion appear.

    So the product is found correctly — the issue is only with the exact-match case.

    If you want to change this behaviour, You need to edit the theme files for this. All the customizations made in the theme files are at your own risk.

    inc/modules/search/class-ajax-search.php

    Best Regards,

Viewing 8 posts - 1 through 8 (of 8 total)