SOLVED: Search results template doesn't work for product searches

I’ve created a template to show the search results of products. I’ve created a template of type “Woocommerce - product archive”:
Screenshot 2023-07-31 at 3.08.33 PM

…and set the conditions to “Search results”:

The search is actually executed with the Fibosearch plugin. The problem is that when searching for products, for example https://istana.infinitemonkeys.ca/?s=nec&post_type=product, the search results template is not used—it instead uses my template that is set up for the posts archive, for some strange reason. The conditions of that one are:

I don’t believe this is functioning properly, but maybe I don’t understand how to create a product search results template.

Even if I specifically include product archives in the conditions of my search results template, and specifically EXCLUDE product archives in the conditions of my post template, it still always uses the post template, it won’t use the search results template.

Hi Eric,

Could you please try implementing this functionality using a search results template type:
Screenshot from 2023-08-01 19-29-28

Or is there something that prevents you from doing this with Fibosearch? I may be understanding your situation incorrectly if that’s the case.

Let me know :slight_smile:

Best regards,
Charaf

Hi Charaf,

I changed my “Search Results” template (that was a “Woocommerce product archive” template type) to be a “Search results” template type.

Same issue occurs.

Hi Eric,

Thank you for giving it a try. Seems like this is related to this bug WIP: Search page not compatible with Relevanssi Premium which is a WIP at this moment. Seems like all search plugins are affected by this bug.

Thank you so much for your report.

Best regards,
Charaf

No this case is not related to mine. That case has nothing to do with the wrong template being used for Woocommerce search results. It is also unconclusive and not conformed as a bug (and it’s almost a year old).

My bug is present whether I use the Fibosearch plugin or not. Just entering the URL of a standard WooCommerce search directly, ex. “nec - Istana UAE”, the search results template is not used.

It’s the same underlying code causing the bug for both instances despite the different cases, which is why I didn’t flag this as a duplicate. We’re working on this now :slight_smile: I’ve added this thread to the ticket as well.

Ok, so just to confirm…this is an acknowledged bug with Bricks, and it a fix is in active development?

Can you provide a workaround in the meantime? This is the only thing holding up the deployment of this site which the customer is eagerly awaiting.

Hi @ainom ,

I am sorry that no workaround for this as it requires a big code change in Bricks core.
Is it possible to setup a staging site with admin access and send it to help@bricksbuilder.io?
Would like to test with a potential fix. Kindly include this forum thread URL as a reference as well.
Thank you very much and appreciate your help.

Regards,
Jenn

Hi Eric,
We’ve fixed this issue in Bricks 1.9.1/1.9.1.1, now available as a one-click update in your WordPress Dashboard.

Please let us know if you are still experiencing issues.

Best regards,
timmse

While this WAS working fine last time I tested it (with v.1.9) I just checked the Fibosearch operation again, and it’s no longer working. I now have the same symptom as I had before with version 1.8.4. Did this get broken in 1.9.1 or 1.9.2?

The site is istana.infinitemonkeys.ca.

The current symptom (again) is:

  • in FiboSearch search field, enter a keyword, like “bracelet”
  • click “see all products”

It goes to URL “brace - Istana UAE”, but the template that is shown is my blog template, not the search results template. If I remove “&post_type=product&dgwt_wcas=1” from the URL so it’s just “brace - Istana UAE” then the search results template shows, with the correct search query.

My Search Results template is set with “Seqarch Results” condition, and my query loop for displaying products is set as “main query”.

Screenshot 2023-10-26 at 11.32.40 PM

Hi Eric, would you be so kind as to send temporary login credentials and a link to this thread to help@bricksbuilder.io using the email address you used during the purchase?

Is this solved in 1.9.2? I just noticed this today. Also going to homepage when typing something to search and pressing enter. I did follow the same steps. I have also a search results template.

@ainom Did you found a solution?

@Nolfy Not resolved in 1.9.2 yet, still a WIP.

Thanks for the update. I wanted to try newer versions (still on 1.8 for that website), but had an issue with another plugin (not Bricks fault).

Hi guys,
We’ve fixed this issue in Bricks 1.9.3, now available as a one-click update in your WordPress Dashboard.

Changelog: Changelog – Bricks

Please let us know if you are still experiencing issues.

Best regards,
timmse

1 Like

@ainom This was solved, but i am having this issue again in Bricks 1.9.5 (i skipped 1.9.4). Is this still working for you in latest versions?
Mine is going to homepage when searching something in Fibosearch and pressing enter instead of search results template.

Would love to know if this is only something on my end. I saw demo website isn’t live anymore and couldn’t find website in portfolio. If you could check, let me know (but don’t update Bricks to check :slight_smile: )

It’s still working for me with 1.9.5 installed. Here’s the production site of the same example site above: https://istanauae.com/

@ainom Thanks for your info! Yeah that works great.
That’s a bummer for me. Time to investigate.

If anyone has a problem with this in later versions, check if you have a page set in Woocommerce settings > Products > General > Shop page.
Unset the shop page and see if this solves it.

In my case the webshop isn’t setup in a “normal” way with storefront page. Like the frontpage is a product archive template. I looked at permalinks before, but i skimped over this setting in Woocommerce and didn’t know i can leave it empty/unset. This probably saves some debugging time.

Thanks for this workaround, but I need to have the Shop page set. Did anyone find a way to make this work without having to unset the ‘Shop’ Page?

1 Like