Forums › Forums › Search & Filter Pro › Breadcrumb Navigation Issue
- This topic has 32 replies, 3 voices, and was last updated 9 years ago by
Anonymous.
-
Anonymous(Private) December 12, 2016 at 5:34 pm #75770
Hi,
I have discovered when using S&F Filter on a Product Category page if you click on a filter the breadcrumb navigation doesnt get updated.For example, if you visit: http://tinyurl.com/h8oss8m and then click on the Scales – analogue filter the breadcrumb navigation is still displaying Home / Products / Lures & baits.
I appreciate this is partly a Woocommerce/Theme/Template issue but is there anything that can be done to get around this?
Ross Moderator(Private) December 16, 2016 at 9:58 am #76960Hi Andrew
2 things to note:
1) only the area in the
results container(the area of the page that reloads using ajax) will be updated with new content, so to have that update via ajax, your results container would need to be larger or you would need to write some custom javascript code that triggers on this event (we have js events for detecting ajax finish)2) To test how the logic really works, it would be best to disable S&F. Then you will notice that all your breadcrumbs are lost with any search… because your breadcrumbs work based on the current taxonomy archive… but when S&F searches, it does not take you to the taxonomy archive (check the URL).
So, to get it working without ajax, you would need to faux implement the breadcrumbs and use this to get the current search data).
BTW, we are adding support for taxonomy archives in a future update, so this (without ajax) will no longer be an issue
Thanks
Anonymous(Private) December 16, 2016 at 5:05 pm #77104ok I understand. I tried changing the Results container class to .woocommerce_with_sidebar so it includes the breadcrumb navigation.
This seems to work when first clicking on a Product Category filter, it updates the Breadcrumb Navigation to just “Products” which is fine. However, when clicking on another Product Category or Brand the page doesnt get updated again.
Any idea why this is happening?Trevor(Private) December 16, 2016 at 5:27 pm #77115When your Ajax is performed the S&F form is replaced, which is why it only works once.
To re-initialize S&F on the form, use the
sf:ajaxfinishfunction (see our FAQ page) and then run –$('.searchandfilter')to increase your container to include the breadcrumbs, it will include the S&F form.I got this from Ross 😉
Anonymous(Private) December 16, 2016 at 5:48 pm #77127OK I added the following script to the theme but its still not working, there no console errors:
$j(document).on("sf:ajaxfinish", ".searchandfilter", function(){ console.log("ajax complete"); //so load your lightbox or JS scripts here again $j('.searchandfilter'); }); -
AuthorPosts