This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Reply To: Doubt about preselected subcategory on archive page and problem

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Doubt about preselected subcategory on archive page and problem Reply To: Doubt about preselected subcategory on archive page and problem

#31672
Ernest MarcinkoErnest Marcinko
Keymaster

Hi,

It is actually possible to get pre-selected configurations with a single search. I will reference this reply for your case.

It is actually possible to preset the fields via this API call.

In short:
1. You open the developer console on each page where the search is present, for example https://web-temp.es/ecocesta/productos-ecologicos/alimentacion/ page, on most browsers it is the F12 button.
2. Change the filter states however you want them – check/uncheck the checkboxes etc..
3. Now, getting the state URI. Your search ID for that search bar is 1, so you type in to the console:

ASP.api(1, 'getStateURL')

and it will print out the page URL with some query arguments: https://i.imgur.com/Jdcekk7.png
4. Visiting that URL will preset the filters exactly as you changed them before. Use this for your desired button as the URL.
5. You can repeat this proces as many times as you want with as many different variations you need.

As for the checkbox issue, I cannot tell, I tried to log-in, but I can’t access that site back-end unfortunately.