Forums Forums Search Search Results for 'woocommerce'

Viewing 10 results - 1,031 through 1,040 (of 1,497 total)
  • Author
    Search Results
  • #47681

    Anonymous
    Inactive

    Thanks, my final code looks like below incase anyone else finds they need a similar solution, I had to change the opening and closing brackets after the select2 initilization to get it working:

    var $j = jQuery.noConflict();
    
    $j(document).ready(function() {
    	"use strict";
    	$j(document).on("sf:ajaxfinish", ".searchandfilter", function(){
    		console.log("ajax complete");
    		//so load your lightbox or JS scripts here again+
    		$j('.woocommerce-ordering select').select2({ //re-init select2
    		 	minimumResultsForSearch: Infinity
    		});
    	});
    });
    #47671

    Ross
    Keymaster

    Ah this may be an option of select2 – that S&F has enabled by default, but I guess WooCommerce didn’t – take a look at this quick google result 🙂

    http://stackoverflow.com/questions/17480040/select2-hiding-the-search-box

    Thanks


    Trevor
    Participant

    Hi Lisa

    Does the page have a search form on it, but instead you are using the WooCommerce sort by function?

    #47495

    Anonymous
    Inactive

    I believe I now have it working. I changed the line from this:

    $j('.searchandfilter select').select2(); //re-init select2

    to this:

    $j('.woocommerce-ordering select').select2(); //re-init select2

    And it is successfully adding the select2 js to the drop-down!. However, how do I remove the extra search field it’s adding to the drop-down?.

    #47300

    Anonymous
    Inactive

    WooCommerce and I use the WooCommerce Shop display method.

    #47297

    Trevor
    Participant

    What type of shop? WooCommerce, EDD, …? What display results method are you using?

    #47155

    Ross
    Keymaster

    Hi Aaron

    What you have done is completely change the way the shop page works so it is no longer a shop.

    S&F works with WooCommerce, however, if you are preventing the normal function of WooCommerce it cannot be reasonably expected that a WooCommerce compatible plugin would work in your environment too.

    S&F even supports the category view of the shop by WooCommerce – where the categories are listed above the products.

    However, considering what you are doing with that page it sounds like there is a better implementation that could get around your issues.

    To me it seems this is a simple gateway page, to easily choose a gender. Instead of hacking the shop page, why not just create a new page with this selection on, and throughout your site link to this page as your “shop”, so they will have gender selection before accessing the shop…

    This will leave WooCommerce in tact and operating correctly whilst also having the functionality you want? And then in turn S&F will be allowed to work correctly too.

    I’m only saying this because really there isn’t an issue with WooCommerce & S&F together, its the hack / modification of the shop page which is causing issues.

    Thanks

    #46800

    Ross
    Keymaster

    Hi Aaron

    Sorry for the delay.

    Are you talking about the plugin “WooCommerce Mix & Match Products”? Because that is not part of WooCommerce.

    In addition, where can I see a S&F search form to see the problem you are describing?

    Thanks

    #46210

    Anonymous
    Inactive

    I have found how the theme is adding the select2 to the woocommerce sorting select:

    $j(document).ready(function() {
    	"use strict";
    
        $j('.price_slider_wrapper').parents('.widget').addClass('widget_price_filter');
        initSelect2();
        initAddToCartPlusMinus()
    });
    
    <strong>function initSelect2() {
        $j('.woocommerce-ordering .orderby, #calc_shipping_country, #dropdown_product_cat').select2({
            minimumResultsForSearch: -1
        });
        $j('.woocommerce-account .country_select').select2();</strong>
    }

    I tried adding the search and filter select class .searchandfilter .sf-input-select into the function
    but unfortunately it didnt work.
    I feel this script is close to what I need but I dont know how to combine it with the script you started for me above.

    #45911

    Anonymous
    Inactive

    Hi, No I’ using my wordpress page as a catalogue of products. I’m using a custom post type named Products to show the products, no woocommerce.

Viewing 10 results - 1,031 through 1,040 (of 1,497 total)