[Support request] WooCommerce product search directs to home page

Home Forums Support WooCommerce product search directs to home page

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1314098
    Katherine

    Hello – we are preparing to launch a WooCommerce site that uses GeneratePress for the theme. Customizations have been made via elementor pro, and the home page is a product archive that directs to the shop page.

    We are trying to finalize the item search functionality, and want to use the woocommerce_product_search function over the standard wordpress search to give product search results. I have created a page for the theme in elementor that is a “search results” instance.

    On our test page, there are two search bars for testing, a WooCommerce product search bar on the left, and on the right is a search bar included with the theme.

    When I search (for example, scissors) via the [woocommerce_product_search] shortcode, I am redirected back to the main shop page. The URL includes “?s=scissors&post_type=product” which I believe should point me to results from WooCommerce in a product view.

    If I search using the native search bar on the right, I am redirected to the search results page that was created in elementor, but it doesn’t actually filter the results that are shown – it only takes me to a results page with all products. The URL for that page shows up as “/?s=scissors” and doesn’t include any post type to search. The results page includes a [woocommerce_product_filter] box on the right side, which appears to correctly filter products once I’m on the search results page.

    Is there something I’m missing to be able to get the [woocommerce_product_search] piece to show my search results? I’m not able to figure out what is getting in the way and directing me back to the shop page.

    Thanks!

    #1314375
    David
    Staff
    Customer Support

    Hi there,

    does the search work if the default GP Search archive is used ?

    #1314435
    Katherine

    After removing the elementor-created search results page and testing, I see the following:

    -The WC product search still takes me back to the main shop page
    -The non-woocommerce product search takes me to the default search archive, and shows the correct search results, but results come out looking more like a list of posts than a product listing with full size images

    I’ve tried search boxes with both the included elementor widgets (both woocommerce and generic) as well as entering the shortcode in a text widget. Ideally, I would like to use woocommerce_product_search, since that appears to match what I’m looking for. Unfortunately, searches using that box are just going back to the main shop page.

    #1314751
    Leo
    Staff
    Customer Support

    Can you disable all plugins and custom functions to test?

    If that still doesn’t work, what happens if you use a twenty series WP theme?

    #1316095
    Katherine

    After disabling plugins, it looks like this may be related to elementor pro. If we leave that plugin disabled, all of the various search bars go to the expected search page. We’re opening a ticket with elementor to see if they can help find the issue.

    #1316098
    Leo
    Staff
    Customer Support
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.