instock and dynamic recount
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page pleaseIf you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.
Quote from conradude on November 26, 2024, 17:39Hello,
first of all thanks for all your previous help.
We're approaching something but I faced something and wanted to see with you if there could be a solution.- I have added the snippet to display only instock filters/products and hide_empty true.
- I've set "dynamic recount" to yes (which btw set "show count" to yes too)
- Turbo mode (the one in extensions, the checkbox) is set to on.=> Everything works great. Only issue is that it's really long to load, especially when filtering by multiple attributes.
I wanted to set dynamic recount and show count to off, which is ok for me but the issue is that it doesn't take into account the snippet to display only instock.
question 1: Is there a way to keep instock=true even with dynamic/show count set to off ?question 2: afterwards, I discovered that in advanced there was a tab "turbo mode" so I tried and activated it after my question 1. I've updated the file, it's noted as updated in uploads/uploads_woof_turbo_mode/ but when trying on the front office, I've got an error : "Oh no! It looks like the filter can't open the search file. Please try generating a new file in Advanced -> Turbo mode -> [Update now!]." which I tried but nothing changed. The console dislay this error from turbo_mode.js "I can not access files! Please create data file OR check .htaccess settings". What should I do (checked that htaccess chmod is 644 and tried to save the permalinks page in WP and all went ok). Should I create the directory myself ?
Btw, I'm on a multisite, all is up to date.
Any idea ? Any of the two solutions are ok for me (forcing the instock=true even with count set to no or activating turbo mode).
thanks a lot !
Hello,
first of all thanks for all your previous help.
We're approaching something but I faced something and wanted to see with you if there could be a solution.
- I have added the snippet to display only instock filters/products and hide_empty true.
- I've set"dynamic recount" to yes (which btw set"show count" to yes too)
- Turbo mode (the one in extensions, the checkbox) is set to on.
=> Everything works great. Only issue is that it's really long to load, especially when filtering by multiple attributes.
I wanted to set dynamic recount and show count to off, which is ok for me but the issue is that it doesn't take into account the snippet to display only instock.
question 1: Is there a way to keep instock=true even with dynamic/show count set to off ?
question 2: afterwards, I discovered that in advanced there was a tab"turbo mode" so I tried and activated it after my question 1. I've updated the file, it's noted as updated in uploads/uploads_woof_turbo_mode/ but when trying on the front office, I've got an error :"Oh no! It looks like the filter can't open the search file. Please try generating a new file in Advanced -> Turbo mode -> [Update now!]." which I tried but nothing changed. The console dislay this error from turbo_mode.js"I can not access files! Please create data file OR check .htaccess settings". What should I do (checked that htaccess chmod is 644 and tried to save the permalinks page in WP and all went ok). Should I create the directory myself ?
Btw, I'm on a multisite, all is up to date.
Any idea ? Any of the two solutions are ok for me (forcing the instock=true even with count set to no or activating turbo mode).
thanks a lot !
Quote from conradude on November 26, 2024, 18:00Update : I tried creating the folder myself but it doesn't work (the file is not created in the folder).
Also, The file turbo_mode.js is looking for has a final / in the end after the .json and I guess that's a part of the problem.
The ?v=XXXX (you can see it in the url posted in the hidden post info) is because I've set Default customer location : Golocate (with page caching support) in Woocommerce > settings > general.
Just letting you know, in case that helps.Edit : I changed the folder to 'plugins\woocommerce-products-filter\ext\turbo_mode\data' and it works. But it show categories with 0 products meaning it doesn't take into account the snippets.
These are the ones I use.add_filter('woof_get_terms_args', function ($args) {
$args['hide_empty'] = true; // hide empty
return $args;
});add_filter('woof_get_request_data', 'my_woof_get_request_data');
function my_woof_get_request_data($data){
$data['stock']='instock';
return $data;
}So yes, turbo mode or not, the idea is to be able to have something that loads faster (with the count is ok) and yet take into account these snippets.
Thanks.
Update : I tried creating the folder myself but it doesn't work (the file is not created in the folder).
Also, The file turbo_mode.js is looking for has a final / in the end after the .json and I guess that's a part of the problem.
The ?v=XXXX (you can see it in the url posted in the hidden post info) is because I've set Default customer location : Golocate (with page caching support) in Woocommerce > settings > general.
Just letting you know, in case that helps.
Edit : I changed the folder to 'plugins\woocommerce-products-filter\ext\turbo_mode\data' and it works. But it show categories with 0 products meaning it doesn't take into account the snippets.
These are the ones I use.
add_filter('woof_get_terms_args', function ($args) {
$args['hide_empty'] = true; // hide empty
return $args;
});add_filter('woof_get_request_data', 'my_woof_get_request_data');
function my_woof_get_request_data($data){
$data['stock']='instock';
return $data;
}
So yes, turbo mode or not, the idea is to be able to have something that loads faster (with the count is ok) and yet take into account these snippets.
Thanks.
Quote from Pablo Borysenco on November 27, 2024, 11:38Hello
Q 1: One does not depend on the other. In order for the filter to show only relevant elements, you need these options - https://share.pluginus.net/image/i20241127113340.png
$args['hide_empty'] = true; // hide empty - this snippet doesn't make sense
Hello
Q 1: One does not depend on the other. In order for the filter to show only relevant elements, you need these options - https://share.pluginus.net/image/i20241127113340.png
$args['hide_empty'] = true; // hide empty - this snippet doesn't make sense
Quote from conradude on November 27, 2024, 11:51Hello and thank you for your quick answer :
Q1 : You're saying "one does not depend on the other" yet when I activate show count or dynamic count it always activate the other. How can I use show count and dynamic count set to off and has the plugin still showing only categories/attribute with in stock products ?
The snippet comes from you FAQ : https://products-filter.com/how-to-hide-empty-countsThanks
Hello and thank you for your quick answer :
Q1 : You're saying"one does not depend on the other" yet when I activate show count or dynamic count it always activate the other. How can I use show count and dynamic count set to off and has the plugin still showing only categories/attribute with in stock products ?
The snippet comes from you FAQ : https://products-filter.com/how-to-hide-empty-counts
Thanks
Quote from Pablo Borysenco on November 27, 2024, 13:14To make customizations you should hire a developer.
yet when I activate show count or dynamic count it always activate the other. -Yes, and this is correct behavior, in order to hide empty terms you need dynamic recalculation. For dynamic recalculation you need to display the counter - https://share.pluginus.net/image/i20241127130842.png But you can hide the counter - Options -> Advanced - https://clip2net.com/s/4lTbTUN
How can I use show count and dynamic count set to off and has the plugin still showing only categories/attribute with in stock products ? - this is impossible! in order to determine empty terms you need dynamic recalculation
The snippet comes from you FAQ : https://products-filter.com/how-to-hide-empty-counts - Ok! This has nothing to do with dynamic recalculation. This only hides initially empty taxonomies.
To make customizations you should hire a developer.
yet when I activate show count or dynamic count it always activate the other. -Yes, and this is correct behavior, in order to hide empty terms you need dynamic recalculation. For dynamic recalculation you need to display the counter - https://share.pluginus.net/image/i20241127130842.png But you can hide the counter - Options -> Advanced - https://clip2net.com/s/4lTbTUN
How can I use show count and dynamic count set to off and has the plugin still showing only categories/attribute with in stock products ? - this is impossible! in order to determine empty terms you need dynamic recalculation
The snippet comes from you FAQ : https://products-filter.com/how-to-hide-empty-counts - Ok! This has nothing to do with dynamic recalculation. This only hides initially empty taxonomies.
Quote from conradude on November 27, 2024, 13:38Ok thank you for your explanations. I get it now.
Some questions though, about Turbo mode.
- If TM is activated, is ajax mode set to true automatically ?
- When activated TM, it didn't take into account "show count", "dynamic count" and "empty terms". It kept on displaying all categories/attributes despite of the out of stock set to true. Can we use TM and not displaying out of stock attr/cat ? (If yes, I maybe made a mistake while setting up the plugin. I'd like a recap on how to set it correctly please).Again, thank you !
Ok thank you for your explanations. I get it now.
Some questions though, about Turbo mode.
- If TM is activated, is ajax mode set to true automatically ?
- When activated TM, it didn't take into account"show count","dynamic count" and"empty terms". It kept on displaying all categories/attributes despite of the out of stock set to true. Can we use TM and not displaying out of stock attr/cat ? (If yes, I maybe made a mistake while setting up the plugin. I'd like a recap on how to set it correctly please).
Again, thank you !
Quote from Pablo Borysenco on November 28, 2024, 11:03Hello
- Yes. Turbo mode works only in Ajax, so the ajax option is turned on automatically along with turbo mode
- Please paste your license key here - https://share.pluginus.net/image/i20230222134241.png -> https://share.pluginus.net/image/i20230222134511.png and wp-admin access - https://share.pluginus.net/image/i20230222134615.png - I will check it
Hello
- Yes. Turbo mode works only in Ajax, so the ajax option is turned on automatically along with turbo mode
- Please paste your license key here - https://share.pluginus.net/image/i20230222134241.png -> https://share.pluginus.net/image/i20230222134511.png and wp-admin access - https://share.pluginus.net/image/i20230222134615.png - I will check it
Quote from conradude on November 28, 2024, 12:07Hello and thank you.
1- Makes sense.
2- Unfortunately we don't have a license yet as we don't know if the plugins will work the way we want.
I'll try to start again and activate turbo mode with "show count" and "dynamic count". So far it was working like "show count" and "dynamic count" were turned off.First I have to make some changes because the ajax mode brakes the pages. I'll try and find how to fix this.
Hello and thank you.
1- Makes sense.
2- Unfortunately we don't have a license yet as we don't know if the plugins will work the way we want.
I'll try to start again and activate turbo mode with"show count" and"dynamic count". So far it was working like"show count" and"dynamic count" were turned off.
First I have to make some changes because the ajax mode brakes the pages. I'll try and find how to fix this.
Quote from Pablo Borysenco on November 28, 2024, 12:45What plugin version number are you using?
What plugin version number are you using?
Quote from conradude on November 28, 2024, 13:03Version 1.3.6.4
Version 1.3.6.4
Quote from Pablo Borysenco on November 29, 2024, 11:47Hello
Ok! Hide empty terms - This is not available in the free version
Hello
Ok! Hide empty terms - This is not available in the free version
Quote from conradude on November 29, 2024, 13:16Hello,
But it works when I'm not in Turbo Mode and have "show count" and "dynamic count" activated. Only when I activate the turbo mode it doesn't work. I need pro to make it work with TM ?
Hello,
But it works when I'm not in Turbo Mode and have"show count" and"dynamic count" activated. Only when I activate the turbo mode it doesn't work. I need pro to make it work with TM ?
Quote from Pablo Borysenco on December 2, 2024, 11:58Hello
This shouldn't work in any mode. Only for initial filter loading, after any filtering or on the category page it will not work correctly
Hello
This shouldn't work in any mode. Only for initial filter loading, after any filtering or on the category page it will not work correctly
Quote from conradude on December 2, 2024, 12:36Hello,
oh, alright. Thanks for the info
Hello,
oh, alright. Thanks for the info