Forums › Forums › Search & Filter Pro › Reset button and product categories
- This topic has 11 replies, 2 voices, and was last updated 8 years, 9 months ago by Ross.
-
Anonymous(Private) January 28, 2016 at 3:25 am #35527
Hello! Recently purchased your plugin, enjoyed it’s flexibility, had a bit of pain setting it up, since it wasn’t designed for products in first place.
Now filters work well, BUT since there is no other way to limit filtering to one product category but to add a filter with product_cat, I’ve encountered a problem, which I’m sure any woocommerce user would encounter with this plugin.
Reset button resets not just the filters like color, size etc – it “resets” the categories as well.
There is no telling what my disappointment was, when I discovered this after sleepless night of experimenting with plugin settings, because such a critical flaw in a reset button renders the whole plugin useless for any e-shop with lots of filters.
Tried searching the forum for workarounds, but haven’t found anything.
And we absolutely need at least a workaround for this, a way to exclude product_cat from resetting with the rest of the filters, since it’s not implemented as a feature yet, because it’s so crutial.
Could you please post here some code to make this work or even give me a hint which places in your code should I edit to make this work?
Looking forward for your response!Ross Moderator(Private) January 28, 2016 at 11:02 am #35547Hey Igor
I’m not sure I follow you.
Reset should clear the form.
Can you explain a little more, do you have a link that would help explain your example?
Thanks
Anonymous(Private) January 28, 2016 at 2:03 pm #35575Hey Ross
Thanks for your quick response. Sorry for a rather complicated post.
Here is a link http://www.fs7.com.ua/shop/?_sft_product_cat=remni&_sft_pa_brend=armaniAs you can see here I selected a category “remni” and a brand attribute.
The issue is, if I press Reset, It redirects here http://www.fs7.com.ua/shop/
Which is a page that contains all the products in all the categories.But if you are running an e-shop with lots of filters, this is surely not the way you want Reset to work. It should reset the filters, but NOT the category, therefore we should still be inside product_cat=remni after pressing it.
Yeah, I know that your plugin treats categories as if they were product tags, but I’m sure there should be some way to work this around.
I have some skills with coding, so if you at least give me some hints how this could be accomplished and in what places in your code should I look into – I hope we could find a solution.Thank you.
Ross Moderator(Private) January 28, 2016 at 7:18 pm #35613Hey Igor
So to get this straight, you want a reset button that doesn’t change the results, just clears the search form?
Whereas the current implementation, reset also includes resetting the results.
Thanks
Anonymous(Private) January 28, 2016 at 8:07 pm #35637Hey Ross
I want a reset button that doesn’t get me out of a category I’m in. If I’m in “Man’s sport shoes”, I want to remain in “Man’s sport shoes” after pressing Reset. Thought that would be pretty intuitive(
Sorry if my english is not that perfect, though.Anonymous(Private) January 29, 2016 at 2:22 am #35661Okay, for the sake of saving you the trouble of asking me to clarify my question another time, I’ve already found a way to do it : )
For anyone who may be reading these posts in the future – if you want to force Reset button not to reset categories, a simple way to do this is to set the categories filter to be in a dropdown, hide it with css if necessary, and then delete the JQuery part, which resets dropdown filters.
Basically I had to open
search-filter-build.min.js
in your plugin, find a resetForm() function in it and on line 1448 delete the folowing exact part of code:
t.find("select:not([multiple='multiple']) > option:first-child").prop("selected", !0), t.find("select[multiple='multiple'] > option").prop("selected", !1),
It covers all dropdown filters, since they are made as <select> boxes. Now dropdown filters won’t be resetting along with all others.
Anonymous(Private) January 29, 2016 at 2:41 am #35662There is however one more thing in your on the whole nice plugin that surprised me in a negative way, namely the price filter.
I noticed that it can determine maximum price only by looking in the database for the maximum price out of all products in the shop, not just the products that are filtered.
If I untick the option to use the highest value in a database, price filter won’t work at all.Therefore I will always get the same enormous price range, no matter which product category I’m in or which filters are currently selected, which can be pretty useless in most of cases.
Here’s a good example: only 2 prices and a huge price range, which in a case like this won’t be really functional at all:
http://www.fs7.com.ua/shop/?_sft_product_cat=remni&_sfm__regular_price=1+5500&_sft_pa_kolir=krasnijCan price filter’s code somehow be slightly altered so it would get maximum price from the prices of currently filtered products? Can you give me a hint where exactly is the code I can edit to try to make it work? Ideally, of course, if you’d be so kind as to do it yourself.
After all that’s what a price filter’s fuctionality should look like.
Thanks.Ross Moderator(Private) January 30, 2016 at 1:31 am #35779Thanks for the update, I follow what you mean.
RE the price slider, would you believe that this is the first time this has come up?
Its actually not something I’ve considered before either. For me the price (range sliders) remaining fixed would be ideal – eg:
http://www.asos.com/men/sale/jackets-coats/cat/pgecategory.aspx?cid=2112&ctaref=shop|salehub|jacketsandcoats#parentID=Rf989&pge=0&pgeSize=36&sort=-1&state=Rf989%3D4865
Imagine I want a coat, and I know I have a £30 budget – and I want to filter through some options such as styles etc – one thing I would certainly not expect is for the price slider to be jumping around on my searches, possibly even jumping out of the range I’ve set.
But I do like the idea!
I’ll give it some thought on how I could implement it and how complex it would be to do – but as no one else has asked for it it there are other updates that will be taking priority for now.
Thanks
Anonymous(Private) January 30, 2016 at 12:24 pm #35799Hey Ross, thanks for answering, though it doesn’t clarify much.
I imagine the plugin was adapted for Woo not that long ago, because other filters I’ve used worked the way I described here.
I’ll see what I can do with the code myself or with a help of fellow programmers.
If I’ll come up with a solution – I’ll be sure to post it here too.Ross Moderator(Private) February 1, 2016 at 10:52 pm #35976Hey Igor
Thanks for the update, let me know if you find anything and I’ll update when there has been some movement with this.
Thanks
-
AuthorPosts