• Resolved omigosh

    (@omigosh)


    If I enter the search term for a product that has been excluded by entering its category number in the Disallowed Categories box, the search message indicates there are no results. But if I then click Return, the product is displayed in the main content area, even though it shouldn’t be found.

    Any ideas?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author YummyWP

    (@yummy-wp)

    Hi there,

    Could you please provide examples of search words, that should return nothing, and also a screenshots of widget settings?

    Thank you
    Stanislav

    Thread Starter omigosh

    (@omigosh)

    Go here: https://new.nothinfancy.ca

    Enter “Another test” in the search box.

    (The Woocommerce test product “Another Test” is in the category “Deleted Jan 15 2019”. That category, number 388, is the first item of several in the Disallowed Products Categories box under Items to Search Through in the Woocommerce Default Product Search tab. Therefore it should not be searchable.)

    Don’t click return, just wait for it to process. It should say “Nothing Found”.

    Now click Return. You should see an image of a guy on a couch and the headline Another Test. This is the product that has been excluded.

    I can give you admin access to the site if you wish.

    Thanks

    Plugin Author YummyWP

    (@yummy-wp)

    Hello,
    It seems that WooCommerce redirects it before Smart Search modifies query. If there is only one search result then WooCommerce will redirect you directly to the product page.

    To disable this redirect please add next code to the functions.php file.
    add_filter( 'woocommerce_redirect_single_search_result', '__return_false' );

    Best
    Stanislav

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Restrictions on search not effective’ is closed to new replies.