Question about functions.js
-
Hi,
When i open quick view of related product slider woodmart theme quick view function runs and triggers wc_variation_form directly to variations_form class div. Because of this in popup that div also triggeres and variation images mess up while, into quick popup this will not trigger.
When I click on the quick view then in main themes functions.js one function is called which is (https://prnt.sc/roruuj). This function resets each div class “.variations_form” and then varation images fetch with main image new layout. My Woocommerce-additional-variation-images plugin should apply only on new layout of main product which is variable product but it adds on the popup box too.
Could you maybe give me some advice on the above issue?
In addition to my previous reply, I forgot to ask you if its possible to override theme functions.js using child theme.
Hello,
This functionality is required for our theme and, unfortunately, we don’t have any solution for you. JS files can’t be overridden in the child theme. But you can remove it completely using WordPress dequeue function and use your own JS.
Kind Regards
How can I dequeue that main js file because I have already tried and from main theme that js did not dequeue. Please check my screenshot, in child themes functions.php i already wrote that code:
https://prnt.sc/rpczqv
And when I enqueue child theme js, that gives console error: “woodmart_setting variable is not defined.”
Should I add your settings array before my code like mentioned on this older support ticket?
https://xtemos.com/forums/topic/functions-js-file/
If yes, could you send me the necessary full code?
Yes, you need to add the localization array as well. You can always get the actual version of the array in the functions.php file.
Where can I find it exactly please in the functions.php file?
Ok I finally found it, after testing with the localization array added, it seems to work fine now.
I already found it, it seems to work fine after adding the localization array as well.
Great, we are glad that you sorted it out.
The topic ‘Question about functions.js’ is closed to new replies.