Skip Navigation

[Resolved] Product search won't filter correctly

This support ticket is created 7 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 5 replies, has 2 voices.

Last updated by tomA-4 7 years, 10 months ago.

Assisted by: Luo Yang.

Author
Posts
#407615
capture_003_15062016_130416.jpg
capture_002_15062016_130322.jpg
capture_001_15062016_125817.jpg

Hi,
I am excited that you released your big updates. Lots of great stuff. In particular I am eager to
setup a search on my product archive page. Especially since the Woocommerce filters I have been using no longer work since your update. so it seems I need to get your search working correctly.

I set up a view with a parametric search.
the first filter limits the products to the category of the current archive page.
Then I set up filters for different product attributes. As always everything almost works right. but there are issues.

Issue #1 some of the products do not show up when I filter. for example, If I go to the archive page for "monitor stands" and only 3 of the 4 monitor stands show up.
If I go to the archive page for "Bowls" again 1 is missing.
I checked the limits and offset setting in the search setup, and it is set to show everything.
When I look at the setup of the missing products everything looks like it is setup properly.

Issue#2 I have set the filters to only show terms which have posts that use them, but every search term is visible all the time. It looks extremely cluttered. I know it will look better after I style the search box, but I want to see if I can get things working properly before I start to style things.

I visited this URL:hidden link

any ideas?
tom a

#407619

I forgot issue #3
I would like to have the search use AJAX update when a visitor changes a value in the search.
That would make for a better UI
But this does not work. It always returns no product found until I refresh the page. I have to set it to full page refresh when the submit button is clicked.
tom A

#407793

Dear tom A,

Q1) Are you using Views wordpress archive to setup the parameter search form and search result?
If not, please follow our document to setup it to Taxonomy "Product Categories" Archives page:
https://toolset.com/documentation/user-guides/adding-parametric-search-wordpress-archives/

Q2) There isn't limits and offset setting in Views wordpress archive, there is only "Pagination options" in it, seems you are using normal view, please check the answer of Q1)

Q3) The normal view does not work as expected in wordpress archive page, same as Q1) you will need to setup the Views wordpress archive, please check the answer of Q1)

#407957
capture_005_16062016_093301.jpg
capture_004_16062016_092429.jpg

Thanks Luo,
You were right on target. All the search functions work great now that I made the change you suggested.

One new problem though, now for some reason the widgets in the sidebar no longer show on the side but are below the main content.

The archive page layout is a child of a parent layout that defines the header, footer and sidebar.
The archive page displays with space on the side for the sidebar widgets, but I cannot get them to show there.

Link to archive page:
hidden link

thanks for your help,
tom a

#408030

Luo,
after a lot of trial and error testing I can see that the problem lies with the search view itself. If I remove the search view the sidebar moves to the side.
Even if I strip out all my CSS and make the search view as bare bones as possible the sidebar remains on the bottom

#408059

Luo,
I fixed the problem.
It was an html thing.
I found a missing "/" from what was supposed to be a </div> tag.

thanks again
tom a

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.