Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1261048

    Hi, I’m using Enfold and FacetWP. Enfold shows the quantity selector of Woocommerce with beautiful Plus and Minus buttons beside the quantity field (see https://weingut-bischof.at/wein-shop/). But if I activate a facet filter, the template changes to the Woocoomerce Up and Down arrows.

    The FacetWP support wrote to me:
    FacetWP’s refresh works by destroying + rebuilding the result listing. The side effect is that any javascript attached to those listing items (like the JS that generates the +/- buttons) will need to get re-initialized.
    Any chance you could reach out to the Enfold team to find out which code is responsible for generating those (+/-) buttons? And if possible, maybe they could also point us to instructions on how to re-initialize it.
    I think the buttons are coming from this JS file: https://weingut-bischof.at/wp-content/uploads/dynamic_avia/avia-footer-scripts-25c211e60d33b3cbbb987f5794057608—5fae61549e7ae.js
    As you can see, it’s minified and very difficult to read. I tried to prettify it, making it a little more readable: https://d.pr/i/zHtuSv
    But long story short, we’ll still need some input from the Enfold team to see how to re-initialize this code on each AJAX refresh (feel free to paste our responses to their team).

    Can you help?
    Thanks, Stefan

    #1261621

    Anybody here?
    Thanks, Stefan

    #1261989

    Hi,
    Sorry for the late reply, as I understand the issue this is just changing the Woocoomerce Up and Down arrow buttons back to the (+/-) buttons, and the functionality is working correctly. Please enable FacetWP so we can investigate further.

    Best regards,
    Mike

    #1262090

    Hi Mike,
    no, FacetWP filters change the wonderful Enfold +/- buttons back to Woo up/down arrows.You can check this by using a filter on https://weingut-bischof.at/wein-shop/ in the dark grey section above the shop. The question is, how to prevent this (see the comments of FacetWP support).
    Thanks and best regards
    Stefan

    #1262115

    Hi,
    Thank you for the feedback, I believe the function that the plugin needs to re-initialize is avia_apply_quant_btn
    Below you will find a link to the \enfold\config-woocommerce\woocommerce-mod.js file so the plugin team can see the function on line 32
    below the function on line 83 they will see an example of re-initializing the function on ajax update:
    $( document ).on( 'updated_cart_totals', avia_apply_quant_btn );
    Please share this with the FacetWP team.

    Best regards,
    Mike

    #1262433

    Thank you, Mike!

    FacetWP has solved the problem:

    add_action( ‘wp_head’, function() {
    ?>
    <script>
    (function($) {
    $(document).on(‘facetwp-loaded’, function() {
    $(document).trigger(‘updated_cart_totals’); // fix the “+/-” quantity buttons
    });
    })(jQuery);
    </script>
    <?php
    }, 100 );

    Thanks for your support!
    Stefan

    #1262639

    Hi,
    Glad to hear this is sorted out, unless there is anything else we can help with on this issue, shall we close this then?

    Best regards,
    Mike

    #1262645

    Yes, thank you, Mike

    #1262648

    Hi,
    Glad we were able to help, we will close this now. Thank you for using Enfold.

    For your information, you can take a look at Enfold documentation here
    For any other questions or issues, feel free to start new threads in the Enfold forum and we will gladly try to help you :)

    Best regards,
    Mike

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Conflict with FacetWP’ is closed to new replies.