Lets Improve filters!
7 years 2 months ago - 7 years 2 months ago #308961
by kyratn
Lets Improve filters! was created by kyratn
Hi,
I would like to suggest few improvements for filters.
1. It would great if we could have "FILTER", "RESET" buttons per each filter and not one for all. This would allow to apply changes only for that particular filter. As example we could reset "color" filter but keep changes on filter "size". Now you can delete only everything....
Right now we have "deletable filter" setings but it just allows you to select one filter and other not selected are hidden after refresh, which i don't think is very useful. Usually people want to select few filters based on they needs....
2. Using Filter type list. Now if one of this filter values are selected there is no indication for that value that it is selected. Would be great to have some class here like "filter_selected" or something. So we could make some css styling for it. Small change but very useful!
Also it would be great if you could select more filters not only one...while using filter type list.
Thanks
I would like to suggest few improvements for filters.
1. It would great if we could have "FILTER", "RESET" buttons per each filter and not one for all. This would allow to apply changes only for that particular filter. As example we could reset "color" filter but keep changes on filter "size". Now you can delete only everything....
Right now we have "deletable filter" setings but it just allows you to select one filter and other not selected are hidden after refresh, which i don't think is very useful. Usually people want to select few filters based on they needs....
2. Using Filter type list. Now if one of this filter values are selected there is no indication for that value that it is selected. Would be great to have some class here like "filter_selected" or something. So we could make some css styling for it. Small change but very useful!
Also it would be great if you could select more filters not only one...while using filter type list.
Thanks
Last edit: 7 years 2 months ago by kyratn.
Please Log in or Create an account to join the conversation.
7 years 2 months ago #308963
by nicolas
Replied by nicolas on topic Lets Improve filters!
Hi,
1. I don't think adding a reset / filter button for all the filters make sense. You already have the submit on click for that. I guess it only makes sense when you want to allow the user to select several things in the filter and this only apply to checkbox and multiple select filters. So adding this for them could be interesting.
2. That's a good idea yes.
We'll note that down on our end. Thanks !
1. I don't think adding a reset / filter button for all the filters make sense. You already have the submit on click for that. I guess it only makes sense when you want to allow the user to select several things in the filter and this only apply to checkbox and multiple select filters. So adding this for them could be interesting.
2. That's a good idea yes.
We'll note that down on our end. Thanks !
The following user(s) said Thank You: kyratn
Please Log in or Create an account to join the conversation.
7 years 2 months ago #309078
by kyratn
Replied by kyratn on topic Lets Improve filters!
Hi,
Regarding price filter using nouislider.
When you try to adjust price, the refresh of filter starts instantly after stop of adjusting slider. It's a bit annoying if using mouse for dragging ( same for mobile ), as soon as you stop it refresh filters. Sometimes You can't adjust it with just one drag... Wouldn't be better to use touchend mouseup events here? Or maybe a little delay would be good here too...
Thanks
Regarding price filter using nouislider.
When you try to adjust price, the refresh of filter starts instantly after stop of adjusting slider. It's a bit annoying if using mouse for dragging ( same for mobile ), as soon as you stop it refresh filters. Sometimes You can't adjust it with just one drag... Wouldn't be better to use touchend mouseup events here? Or maybe a little delay would be good here too...
Thanks
The following user(s) said Thank You: n00bster
Please Log in or Create an account to join the conversation.
7 years 2 months ago #309118
by nicolas
Replied by nicolas on topic Lets Improve filters!
Hi,
Indeed, I was able to reproduce the issue and added a patch on our end for that.
Update and it should work better.
Indeed, I was able to reproduce the issue and added a patch on our end for that.
Update and it should work better.
The following user(s) said Thank You: n00bster
Please Log in or Create an account to join the conversation.
7 years 3 days ago #311197
by kyratn
Replied by kyratn on topic Lets Improve filters!
Hi,
Is there a way to detect if filter is active per each filter? The idea is to add some css class if that filter is in use.
Here is what i am looking for:
<?php echo '<div class="active hikashop_filter_'.$filters[$count]->filter_namekey.'">'.$html[$count].'</div>'; ?>
There is a "$filterActivated" variable inside filter.php but that does check if any of the filters are in use.
Any help would be appreciated.
Maybe it would be good to have it by default for additional styling?
Thank you
Is there a way to detect if filter is active per each filter? The idea is to add some css class if that filter is in use.
Here is what i am looking for:
<?php echo '<div class="active hikashop_filter_'.$filters[$count]->filter_namekey.'">'.$html[$count].'</div>'; ?>
There is a "$filterActivated" variable inside filter.php but that does check if any of the filters are in use.
Any help would be appreciated.
Maybe it would be good to have it by default for additional styling?
Thank you
Please Log in or Create an account to join the conversation.
7 years 3 days ago #311217
by nicolas
Replied by nicolas on topic Lets Improve filters!
Hi,
Instead of the line:
You could have the code:
That way, in
you would know if the filter has been selected or not.
We'll add a modification for that for the next release.
Instead of the line:
Code:
$selected[] = $this->filterTypeClass->display($filter, '', $this);
Code:
$data = $this->filterTypeClass->display($filter, '', $this);
$selected[] = $data;
if(!empty($data) && !in_array($data, array(' ', 'none'))) {
$filter->filterActive = true;
$filterActivated = true;
}
Code:
$filters[$count]->filterActive
We'll add a modification for that for the next release.
The following user(s) said Thank You: kyratn
Please Log in or Create an account to join the conversation.
7 years 3 days ago #311221
by kyratn
Replied by kyratn on topic Lets Improve filters!
Hi,
Thank you Nicolas. That worked!
Have a great day
Thank you Nicolas. That worked!
Have a great day
Please Log in or Create an account to join the conversation.
7 years 3 days ago #311223
by kyratn
Replied by kyratn on topic Lets Improve filters!
I was a bit hurry as usual, my bad....
The code changes you provided gives a bit issues. Here is what happening.
As example i have 2 filters, "SIZE" and "COLOR"
1. I filter by "size", the "$filters[$count]->filterActive" returns 1 to this filter. Seems OK
2. Then i filter by "color", the "$filters[$count]->filterActive" returns 1 to this filter too. Seems all ok.
3. I remove filtering by "size", the "$filters[$count]->filterActive" still return 1 to this filter....
4.I remove filtering by "color", the "$filters[$count]->filterActive" is empty on this filter and on "size" filter too.
Is there a way to fix it?
Thank you
The code changes you provided gives a bit issues. Here is what happening.
As example i have 2 filters, "SIZE" and "COLOR"
1. I filter by "size", the "$filters[$count]->filterActive" returns 1 to this filter. Seems OK
2. Then i filter by "color", the "$filters[$count]->filterActive" returns 1 to this filter too. Seems all ok.
3. I remove filtering by "size", the "$filters[$count]->filterActive" still return 1 to this filter....
4.I remove filtering by "color", the "$filters[$count]->filterActive" is empty on this filter and on "size" filter too.
Is there a way to fix it?
Thank you
Please Log in or Create an account to join the conversation.
7 years 3 days ago #311224
by kyratn
Replied by kyratn on topic Lets Improve filters!
Also, after using sort filter, "$filters[$count]->filterActive" will return 1 to all filters.
Please Log in or Create an account to join the conversation.
7 years 2 days ago #311227
by kyratn
Replied by kyratn on topic Lets Improve filters!
Please ignore. All working fine! It was my mistake with using the code not properly...
However i still need one more help.
I am trying to return values of the characteristics selected per each filter.
Now this return the ID's:
How do i get the values/names of characteristics?
Thank you
However i still need one more help.
I am trying to return values of the characteristics selected per each filter.
Now this return the ID's:
Code:
<?php echo var_dump($selected[$count]);?>
How do i get the values/names of characteristics?
Thank you
Please Log in or Create an account to join the conversation.
7 years 2 days ago #311236
by nicolas
Replied by nicolas on topic Lets Improve filters!
Hi,
You would have to run a MySQL query on the hikashop_characteristic table to get the values/names.
You would have to run a MySQL query on the hikashop_characteristic table to get the values/names.
The following user(s) said Thank You: kyratn
Please Log in or Create an account to join the conversation.
Time to create page: 0.206 seconds