Buttons of Toggle, Toggle auto-colsed, area clicable
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 planendario on October 17, 2019, 08:57I have 3 question that I cannot solve by my own:
- I want to change button toggle (see image1) which opens and close some specific filter. I have set an image in auto filter open/close design section but it doesn't work. And I want to set one icon to open other different to close. I've also tried the code, with no success:add_filter('woof_get_more_less_button_label', 'woof_get_more_less_button');
function woof_get_more_less_button($args)
{
$args['type'] = 'image';
$args['closed'] = 'https://larioja.planendario.com/wp-content/uploads/2019/10/pruebafelcha2.png';
$args['opened'] = 'https://larioja.planendario.com/wp-content/uploads/2019/10/pruebafelcha2.png';return $args;
}How should i do it?
- I want to make not only the button clickable to open the filter also the whole area, including name of taxonomy button and space between them, in terms of html the whole div which contains taxonomy name and button. How should i do it?
- I have checkboxes as filters, when in one specific taxonomy I unselect the last checkbox the toggle closes the filter. I want it to keep it open it. You can see this behavior in this url: How should i do it? https://larioja.planendario.com/planes-filtros-prueba/
I have 3 question that I cannot solve by my own:
- I want to change button toggle (see image1) which opens and close some specific filter. I have set an image in auto filter open/close design section but it doesn't work. And I want to set one icon to open other different to close. I've also tried the code, with no success:add_filter('woof_get_more_less_button_label', 'woof_get_more_less_button');
function woof_get_more_less_button($args)
{
$args['type'] = 'image';
$args['closed'] = 'https://larioja.planendario.com/wp-content/uploads/2019/10/pruebafelcha2.png';
$args['opened'] = 'https://larioja.planendario.com/wp-content/uploads/2019/10/pruebafelcha2.png';return $args;
}How should i do it?
- I want to make not only the button clickable to open the filter also the whole area, including name of taxonomy button and space between them, in terms of html the whole div which contains taxonomy name and button. How should i do it?
- I have checkboxes as filters, when in one specific taxonomy I unselect the last checkbox the toggle closes the filter. I want it to keep it open it. You can see this behavior in this url: How should i do it? https://larioja.planendario.com/planes-filtros-prueba/
Quote from Pablo Borysenco on October 17, 2019, 12:56Hello
1 Try this please in tab Design - https://c2n.me/4483wNN.png
2 You need customization of the code:
EXAMPLE:
In file: path/to/domain/wp-content/plugins/woocommerce-products-filter/js/front.js
1. Finde function woof_init_toggles() and comment it.
2. Then add this function after the previous comment function:function woof_init_toggles() {
jQuery('.woof_container_inner h4').life('click', function () {
if (jQuery(this).children().data('condition') == 'opened') {
jQuery(this).children().removeClass('woof_front_toggle_opened');
jQuery(this).children().addClass('woof_front_toggle_closed');
jQuery(this).children().data('condition', 'closed');
if (woof_toggle_type == 'text') {
jQuery(this).children().text(woof_toggle_closed_text);
} else {
jQuery(this).children().find('img').prop('src', woof_toggle_closed_image);
}
} else {
jQuery(this).children().addClass('woof_front_toggle_opened');
jQuery(this).children().removeClass('woof_front_toggle_closed');
jQuery(this).children().data('condition', 'opened');
if (woof_toggle_type == 'text') {
jQuery(this).children().text(woof_toggle_opened_text);
} else {
jQuery(this).children().find('img').prop('src', woof_toggle_opened_image);
}
}
jQuery(this).parent().find('.woof_block_html_items').toggle(500);
return false;
});
}3 Unfortunately I do not have a ready-made solution. You need customization of the code
Hello
1 Try this please in tab Design - https://c2n.me/4483wNN.png
2 You need customization of the code:
EXAMPLE:
In file: path/to/domain/wp-content/plugins/woocommerce-products-filter/js/front.js
1. Finde function woof_init_toggles() and comment it.
2. Then add this function after the previous comment function:
jQuery('.woof_container_inner h4').life('click', function () {
if (jQuery(this).children().data('condition') == 'opened') {
jQuery(this).children().removeClass('woof_front_toggle_opened');
jQuery(this).children().addClass('woof_front_toggle_closed');
jQuery(this).children().data('condition', 'closed');
if (woof_toggle_type == 'text') {
jQuery(this).children().text(woof_toggle_closed_text);
} else {
jQuery(this).children().find('img').prop('src', woof_toggle_closed_image);
}
} else {
jQuery(this).children().addClass('woof_front_toggle_opened');
jQuery(this).children().removeClass('woof_front_toggle_closed');
jQuery(this).children().data('condition', 'opened');
if (woof_toggle_type == 'text') {
jQuery(this).children().text(woof_toggle_opened_text);
} else {
jQuery(this).children().find('img').prop('src', woof_toggle_opened_image);
}
}
jQuery(this).parent().find('.woof_block_html_items').toggle(500);
return false;
});
}
Quote from planendario on October 26, 2019, 10:33Thanks for your question.
- Worked!
- It didn't work. Still is only clickable only the icon open/close of the toggle but not the whole div.
- Can you please tell me which and where is the function that controls that the toggle closes automatically when the last checkbox is unmarked?
Thanks in advance
Thanks for your question.
- Worked!
- It didn't work. Still is only clickable only the icon open/close of the toggle but not the whole div.
- Can you please tell me which and where is the function that controls that the toggle closes automatically when the last checkbox is unmarked?
Thanks in advance
Quote from Pablo Borysenco on October 28, 2019, 14:13Hello
2 Update cache. If no luck - you should hire a developer
3 in file - path/to/domain/wp-content/plugins/woocommerce-products-filter/js/front.js - function woof_init_toggles()
Hello
2 Update cache. If no luck - you should hire a developer
3 in file - path/to/domain/wp-content/plugins/woocommerce-products-filter/js/front.js - function woof_init_toggles()