Forums › Forums › Search & Filter Pro › AND Field relashionship not working
Tagged: ajax, Field relationships
- This topic has 3 replies, 2 voices, and was last updated 5 years, 8 months ago by Anonymous.
-
Anonymous(Private) February 8, 2019 at 2:34 pm #201701
Hello !
I’ve set up the filters on this page : http://chaboud.connivence-poleweb.fr/categorie-produit/louer/
When I selection “Occasion” in vehicules”, it works fine.
Now if I add a filter that doesn’t exist (say “Manuelle” in “Boite de vitesse”, since the only result for “Occasion” has a “Automatic” in “Boite de vitesse”), is doesn’t do anything (like say there are no products).However if I then reload the page with the filters in the URL (http://chaboud.connivence-poleweb.fr/categorie-produit/louer/?_sft_pa_vehicule=occasion&_sft_pa_boite-de-vitesse=manuelle&_sfm_Ann%C3%A9e=1999+2019&_sfm_Kilometrage=5000+125000&_sfm__regular_price=200+55000&orderby=popularity) it works so it must have something to do with Ajax.
Trevor(Private) February 8, 2019 at 4:09 pm #201726It is indeed because of Ajax. The WooCommerce method relies on the the theme or WooCommerce template file for the page. That does not detect the no results scenario under Ajax, and that is not something we have control over. There are three options for you:
#1 Disable Ajax in our form.
#2 Enable Auto Count and in each field select Hide Empty (this removes any invalid choices)
#3 Edit the template file in use to provide extra logic around the results container (where there should be an IF to check if there are any posts). -
AuthorPosts