Home Forums WoodMart support forum Question about functions.js

Question about functions.js

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #183089

    d_ch
    Participant

    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?

    #183093

    d_ch
    Participant

    In addition to my previous reply, I forgot to ask you if its possible to override theme functions.js using child theme.

    #183101

    Artem Temos
    Keymaster

    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

    #183298

    d_ch
    Participant

    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?

    #183368

    Artem Temos
    Keymaster

    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.

    #183448

    d_ch
    Participant

    Where can I find it exactly please in the functions.php file?

    #183590

    d_ch
    Participant

    Ok I finally found it, after testing with the localization array added, it seems to work fine now.

    #183482

    Artem Temos
    Keymaster
    #184593

    d_ch
    Participant

    I already found it, it seems to work fine after adding the localization array as well.

    #184617

    Artem Temos
    Keymaster

    Great, we are glad that you sorted it out.

Viewing 10 posts - 1 through 10 (of 10 total)

The topic ‘Question about functions.js’ is closed to new replies.