- This topic has 5 replies, 3 voices, and was last updated 3 months, 2 weeks ago by Leo.
June 4, 2020 at 7:09 am #1314098Katherine
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!June 4, 2020 at 8:16 am #1314375DavidStaffCustomer SupportJune 4, 2020 at 8:59 am #1314435Katherine
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.June 4, 2020 at 2:10 pm #1314751LeoStaffCustomer SupportJune 5, 2020 at 1:12 pm #1316095Katherine
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.June 5, 2020 at 1:14 pm #1316098
- You must be logged in to reply to this topic.