Forums › Forums › Search & Filter Pro › “hide if empty” filter with AJAX functionality
Tagged: ajax
- This topic has 12 replies, 2 voices, and was last updated 4 years ago by Trevor.
-
Anonymous(Private) October 21, 2020 at 7:51 pm #263685
Hello, the “hide if empty” feature inside a filter does not seem to work if done via AJAX.
it works fine the regular way.
“Enable auto count” is activated.
Could you please let me know if that functionality works with AJAX? If i refresh the URL, it hides the field properly, however, the ajax doesn’t seem able to retrieve the data.
Thanks!Trevor(Private) October 22, 2020 at 11:56 am #263719Hide Empty applies to the field terms, and not to the field itself. So, even if no terms are showing, the field will still appear. Is that what you mean?
If not, are you able to send me a live link/URL to your search page so I can take a look?
Can you give me a search to do that will show me the issue, and explain why what you see is wrong?
Anonymous(Private) October 22, 2020 at 9:45 pm #263790Good afternoon,
Sure, here’s a link:
https://crescentgarstg.wpengine.com/shopOn the sidebar, if you select “category”: planters, “material”: Leather and open “Color”, you will see all the colors listed. Despite having “hide if empty” in the backend set.
If you refresh the page, and open “color”, you will see the correct set up. Only Brown will appear since the other colors are empty.
Let me know,
RegardsAnonymous(Private) October 23, 2020 at 9:03 pm #263923Hello again,
I tried it:
https://crescentgarstg.wpengine.com/It’s still not working with AJAX with the latest plugin update.
If you access the page with the filters directly, it will successfully hide the colors. But using ajax filters doesn’t hide the colors:/Trevor(Private) October 23, 2020 at 9:05 pm #263925I can see that you have made some changes to the form so that the headings act as Accordion close/open. I wonder if that is interfering with our plugin, which uses JavaScript to make the changes? Are you able to temporarily disable the changes you made to test this?
Anonymous(Private) October 23, 2020 at 10:48 pm #263928Sure. I have it bare on another test site with no javascript:
https://crestg.wpengine.com/shop/Thanks again
-
AuthorPosts