- Posts: 217
- Thank you received: 4
Trigger when filtering is done
- FilipHradil
-
Topic Author
- Offline
Less
More
7 years 1 month ago #311553
by FilipHradil
Trigger when filtering is done was created by FilipHradil
-- HikaShop version -- : 4.2.3
Hello!
I would like to ask you for help. I need to trigger javascript after filtering is done. Please, could you advise me in what file on what line can I add my code?
I need to scroll up after filtering is done – I can manage this, I only need to know, where I can execute this code.
Thank you in advance many times!
Filip
Hello!
I would like to ask you for help. I need to trigger javascript after filtering is done. Please, could you advise me in what file on what line can I add my code?
I need to scroll up after filtering is done – I can manage this, I only need to know, where I can execute this code.
Thank you in advance many times!
Filip
Please Log in or Create an account to join the conversation.
7 years 1 month ago #311555
by kyratn
Replied by kyratn on topic Trigger when filtering is done
Hi,
There is a trigger filters.updated which you can use.
You can find more about this in this topic: www.hikashop.com/forum/filters-search/89...iltering.html#308760
Hope that helps.
Thans
There is a trigger filters.updated which you can use.
Code:
window.Oby.registerAjax("filters.updated",function(params){
....Your function here....
});
You can find more about this in this topic: www.hikashop.com/forum/filters-search/89...iltering.html#308760
Hope that helps.
Thans
The following user(s) said Thank You: nicolas, FilipHradil
Please Log in or Create an account to join the conversation.
- FilipHradil
-
Topic Author
- Offline
Less
More
- Posts: 217
- Thank you received: 4
7 years 1 month ago #311561
by FilipHradil
Replied by FilipHradil on topic Trigger when filtering is done
Thank you so much for advice! It works perfectly. I resolved my issue thanks to your solution.
If somebody needs to scroll up to 1st product after filtering (for example: if you have filters in sidebar as me), here is my code:
Thank you, once again!
F.
If somebody needs to scroll up to 1st product after filtering (for example: if you have filters in sidebar as me), here is my code:
Code:
window.Oby.registerAjax("filters.updated",function(params){
jQuery('html, body').animate({
scrollTop: jQuery('.hikashop_products').offset().top
}, 1000, 'easeOutExpo' );
});
Thank you, once again!
F.
The following user(s) said Thank You: kyratn
Please Log in or Create an account to join the conversation.
7 years 1 month ago #311560
by nicolas
Replied by nicolas on topic Trigger when filtering is done
Hi,
We actually have added an option to the filter module to do that for the next version of HikaShop which is to be released soon.
So I would recommend to wait for a few more days and just activate that.
We actually have added an option to the filter module to do that for the next version of HikaShop which is to be released soon.
So I would recommend to wait for a few more days and just activate that.
Please Log in or Create an account to join the conversation.
- FilipHradil
-
Topic Author
- Offline
Less
More
- Posts: 217
- Thank you received: 4
7 years 1 month ago #311682
by FilipHradil
Replied by FilipHradil on topic Trigger when filtering is done
Thank you for information.
Have a nice day,
Filip
Have a nice day,
Filip
Please Log in or Create an account to join the conversation.
Time to create page: 0.056 seconds