Forums › Forums › Search & Filter Pro › Ajax Event only fires second time on category archive
- This topic has 1 reply, 2 voices, and was last updated 10 years, 9 months ago by
Ross.
-
Anonymous(Private) February 5, 2016 at 7:24 am #36302
Hi, can you help me understand why the following only fires the second time I use the range slider filter, but not the first time, when viewing a product category archive?
$(document).on(‘sf:ajaxfinish’, ‘.searchandfilter’, function() {
console.log(‘done’);
});I’m using the filter at http://advanced968.inmotionhosting.com/~onadrape/drapery/curtain-rod-finials/iron-finials/iron-finials-for-12-rods/. If I use the filter at http://advanced968.inmotionhosting.com/~onadrape/shop, it fires the first time.
Secondly, and perhaps this is related, I don’t want the URL to change to http://advanced968.inmotionhosting.com/~onadrape/shop anytime someone uses the range slider. I want people to stay on the original category archive, and I want the results to only apply to the original category archive. When someone applies a filter while viewing category A, I don’t want results from category B to suddenly appear. I have dozens of categories, so I would hope I don’t have to create dozens of search filters. How do I set this up?
Thanks!
Ross Moderator(Private) February 5, 2016 at 4:36 pm #36344Hi Robert
I checkout the ajax event and it seems to work as expected.
If you go to the shop:
http://advanced968.inmotionhosting.com/~onadrape/shop/
And test there, it will be fired every time.
The only thing I can think of, is that when you are testing you ajax functionality from:
The first submission/interaction with the slider is not an ajax request, it is a redirect to shop page.
I’m testing in chrome.
RE the second point, this is a feature that I am working on.
S&F is designed to work on a single results page, which is why when you interact with the form you get a redirect.
Essentially, it will be possible to use S&F to filter taxonomy archive in a future update.
Thanks
-
AuthorPosts