• Resolved dave_garlock

    (@dave_garlock)


    Without Advanced AJAX Product Filters active, the Woocommerce ordering dropdown (where it says “Default sorting”) has a Select2 overlay that remains when you choose an ordering option. However, when the plugin is activated, the Select2 overlay loads at first, but doesn’t after an option is chosen (or after one of the plugin’s filters is used). Any ideas how to fix this?

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author RazyRx

    (@razyrx)

    Hello @dave_garlock,

    To fix the issue you need add code in plugin settings -> JavaScript/CSS tab -> After update field, that init Select2 for Woocommerce ordering dropdown.

    Regards,
    Oleg

    Thread Starter dave_garlock

    (@dave_garlock)

    That did the trick – thanks for your help.

    Hello!!

    What is the code that should be inserted in the update field in order to init select2 ?

    Thanks!

    Thread Starter dave_garlock

    (@dave_garlock)

    This is what I used:

    $j(document).ready(function() {
    “use strict”;

    $j(‘.price_slider_wrapper’).parents(‘.widget’).addClass(‘widget_price_filter’);
    initSelect2();
    initSingleProductLightbox();
    initAddToCartPlusMinus()
    });

    function initSelect2() {
    “use strict”;

    $j(‘.woocommerce-ordering .orderby, #calc_shipping_country, #dropdown_product_cat’).select2({
    minimumResultsForSearch: -1
    });
    $j(‘.woocommerce-account .country_select’).select2();
    }

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Plugin causing Select2 to break from Woocommerce ordering dropdown’ is closed to new replies.