Forums › Forums › Search & Filter Pro › Problem with Woocommerce page filter behaviour
- This topic has 21 replies, 2 voices, and was last updated 5 years, 2 months ago by
Trevor.
-
Trevor(Private) April 2, 2020 at 5:27 pm #238818
Instead of placing the shortcode on the page, what if you enable the sidebar on the shop page:
https://www.screencast.com/t/bR4S35MtxN
and then edit the sidebar here, remove the category widget and our form widget:
https://www.screencast.com/t/e2bPwetZvqH
and
https://www.screencast.com/t/YfkmnDnBS9and then enable the sidebar on the archive page also:
Trevor(Private) April 3, 2020 at 3:30 pm #238956The title is most likely output by PHP in the theme template that is OUTSIDE the ajax container (it is outside the page content area, in the subheader), and thus that would not get refreshed.
We DO have a script that you could launch an Ajax trigger to refresh the title background, maybe, but the code you need would be very complex I think, and would require the services of a third party coder.
You might ask the author of the theme if they could give you the jQuery to refresh that subheader using Ajax, then it could go inside this script:
<script>(function ( $ ) { "use strict"; $(document).on("sf:ajaxfinish", ".searchandfilter", function(){ // call your ajax script here }); }(jQuery));</script>
Anonymous(Private) April 20, 2020 at 4:53 pm #240685Hi Trevor,
Finally managed to make this work.
I have one more question: Do you see any easy way to make the S&F filters contextual? What I mean is, if I select one filter, I would like to Ajax-reloaded page to display only those other filters which, when combined with the already-selected one, display a minimum of 1 result.
Thanks,
ThomasAnonymous(Private) April 21, 2020 at 3:46 pm #240801I do have them enabled, but it seems to apply only on to other search form fields. If I select one product category, for instance, I would expect the filters to only display that category and its children.
Right now other categories remain visible.
-
AuthorPosts