Looking for support? You can access the support system via your account.
- This topic has 12 replies, 2 voices, and was last updated 3 years, 5 months ago by .
You must be logged in to reply to this topic.
Looking for support? You can access the support system via your account.
Forums › Forums › Search & Filter Pro › “hide if empty” filter with AJAX functionality
Tagged: ajax
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!
Hide 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?
Good afternoon,
Sure, here’s a link:
https://crescentgarstg.wpengine.com/shop
On 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,
Regards
Try again please, i disabled the beautiful loading spinner
Sure. Let me try that and get back to you.
Thanks a lot
Hello 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:/
I 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?
Sure. I have it bare on another test site with no javascript:
https://crestg.wpengine.com/shop/
Thanks again
You must be logged in to reply to this topic.
© 2024 Search & Filter Support. All Rights Reserved.
This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.
We also use cookies to store items in your cart as well as allowing your to login on the site.
You can adjust all of your cookie settings by navigating the tabs on the left hand side.
By continuing to use this site, you also agree to our Privacy Policy.
Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.
*Other cookies used for logging in and cart functions will only be used when you use those features and cannot be disabled.
If you disable these cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.
This website uses Google Analytics to collect anonymous information such as the number of visitors to the site, and the most popular pages.
Keeping this cookie enabled helps us to improve our website.
Please enable Strictly Necessary Cookies first so that we can save your preferences!
More information about our Cookie Policy