PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

Change color of container when it's toggled

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 please
If 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.
12

Hello,

In the past I've added some code to change to background color of a container when it's toggled. Unfortunately this isn't working anymore.
Can you tell me how to fix this? See my custom CSS below:

.sidebar-filter .widget-woof .woof_container_inner h4.opened{color:#FFF;background-color:#283346 !important}

 

Greetings,

Hello

Please drop me exact link to the issue

Hi Pablo,

Here's a link: https://www.wielenhuis.nl/product-categorie/losse-wielen/rubber-grijs/

Hello

Please paste your license key here - https://share.pluginus.net/image/i20230222134241.png -> https://share.pluginus.net/image/i20230222134511.png

Update the plugin to latest version - https://products-filter.com/how-to-make-auto-update-for-wordpress-plugins-and-themes-bought-on-envato

I've provided the requested information and updated the plugin to the latest version.

Hello

your code will only work with JS code customization.

By default this won't work

If you have programming experience, I can tell you how to customize JS

Hi Pablo,

Strange, because it did work in the past.
Can you tell me how to customize JS to make this possible again?

Greetings,

Hello

Try in  file  - wp-content\plugins\woocommerce-products-filter\js\front.js  add  this  code - https://share.pluginus.net/image/i20240308114528.png

jQuery(this).parents('.woof_container_inner').find('h4').addClass(jQuery(this).data('condition'));

Hi Pablo,

Unfortunately this doesn't work.

See the my added code:
https://i.postimg.cc/QNBG5Qf0/Screenshot-2024-03-08-at-11-56-42.png

https://i.postimg.cc/mDXXknxB/Screenshot-2024-03-08-at-11-55-22.png

 

 

please disable this option -  https://share.pluginus.net/image/i20240308133650.png

Hi Pablo,

Thank you for your reaction. This helps partially. The background color changes after the toggle, but the background color doesn't change back when I close the filter.

Greetings,

Hello

ok change this code in  \wp-content\plugins\woocommerce-products-filter\js\front.js to  - https://share.pluginus.net/image/i20240312125853.png

jQuery(this).parents('.woof_container_inner').find('h4').removeClass('opened');

 

jQuery(this).parents('.woof_container_inner').find('h4').addClass('opened');

Hi Pablo,

Thank you. This solved the problem. Should I place this in my child theme folder to prevent overwriting of the code when updating the plugin?

 

Greetings,

Hello

Unfortunately no. But you can completely override this function in a child theme

Hi Pablo,

Thank you for your reply.

Today I've noticed 1 thing that isn't working. After choosing an option in the filter, the background color changes back to white instead (even though the filter is toggled). See this screenshot: https://i.postimg.cc/GpPPjt0X/Screenshot-2024-03-18-at-16-24-42.png

Can you help me fix this?

Hello

please add this code - https://c2n.me/4kx2ab9.png

jQuery('.woof_front_toggle_opened').parent().addClass('opened');

Hi Pablo,

Unfortunately this didn't solve the issue. See the image: https://postimg.cc/wyTXxZBX

Hello

You didn't paste this code

your file - https://share.pluginus.net/image/i20240325134525.png

to customize the code you should hire a developer

Hi Pablo,

I've added the code as you can see: https://postimg.cc/B8FGyMD4
The problem occurs after an AJAX request. The class 'opened' is being removed after that.

Hello

Here is the actual code for your file - https://c2n.me/4kzGTPv.png

It looks like you didn't clear the cache or you didn't paste this code correctly

12