Tagged: , , ,

Viewing 30 posts - 1 through 30 (of 33 total)
  • Author
    Posts
  • #648543

    Hello,
    I’ve just update ENFOLD to the last release and WOOCOMMERCE to 2.6 release
    Everything seems fine except for the “Update basket” button in the cart which is not working anymore. Could you please help??

    Many thanks
    David

    #649121

    I have the same problem, a solution would be super
    Thanks
    Heiko / Pit Bull

    #649127

    Hello,
    Same problem here. A few precisions : the button is disabled when nothing is changed (which is good) ; when using the arrows to change the quantity, the button is not available ; but if I type in the quantity “box” the new amount, then the button become clickable again.
    It seems it is a problem of using the arrows actually changing the quantity from woocommerce’s ajax point of view…

    Thanks for your help in finding an answer !

    (By the way, I used to have an ‘Empty cart’ button, but this one does not work anymore, very probably because they use ajax in the cart now ; if ever you stumble on a solution to make it work again, which should be similar to the one for the arrows of the quantity field, that would be great !)

    #649596

    Hi,

    Thank you for using Enfold.

    Please try to deactivate the plugins one at a time. Maybe, one of those plugins are causing the issue. Is this working when you switch to a default theme?

    Best regards,
    Ismael

    #649659

    Hi Ismael, yes it does work fine with the default theme and all plugin installed.. so it must be something related to ENFOLD.
    The button is always activated (even without changes) but clicking on it doesn’t produce any result.

    Cheers
    David

    #649677

    Hi again,

    By browsing the support forums I was able to find a very temporary fix, in this thread :
    https://kriesi.at/support/topic/woocommerce-quantity-arrow-buttons/?login_error

    When I added the code given in this thread to function.php, the button started working again. The only problem is that when it reloads with the updated quantity, the defaut Woocommerce quantity selector is displayed, and not the enfold one. So it only gives a possible way towards a solution, but is in no way a definitive fix.

    Here is the code taken from the thread :

    /*    WOOCOMMERCE QTY FIX    */
    add_action('wp_footer', 'ava_new_custom_script');
    function ava_new_custom_script(){
    ?>
    <script type="text/javascript">
    (function($) {
        "use strict";
    
    	$(window).load(function(){
    		$(".quantity .minus,.quantity .plus").on("click",function(){
    			$(this).closest(".quantity").find(".input-text").trigger("change");
    		});
    	});
    })(jQuery);
    </script>
    <?php
    }
    #650049

    Hey!

    I checked the update button and there is a “disabled” attribute applied to it. Did you add any custom script to the functions.php file?

    Regards,
    Ismael

    #650127

    HI Ismael,

    I’m not a developer.. I have made few adjustments in both functions.php and quick CSS but everything has been written by you guys.. feel free to access my website to fix it if you like.. I have no clue about what it may have caused the problem.

    Many thanks
    cheers
    david

    #650142

    The issue stems from the new ajaxified cart in WooCommerce 2.6 and above.

    In the first place there is a new function in cart.js to disable the update_cart button while the cart stays unchanged (no increase or decrease in quantities). From line 285 in cart.js downwards WooCommerce defines a input_changed event to enable the button again if the cart has changed (quantity decrease or increase). Due to the fact the plus and minus selectors are custom additions within Enfold WooCommerce does not know about them and the input_changed event gets not triggered if you click on the plus and minus button. If you change the quantity in the input field which is not modified by Enfold the event gets triggered and the update_cart button gets enabled.

    Kriesi has to define a listener him self to Enfold to enable the update_cart button upon a click on the plus or minus button. Add the following function at the bottom of woocommerce-mod.js:

    
    function enable_update_cart_button(){
    	var $update_cart_button = jQuery( 'table.shop_table.cart' ).closest( 'form' ).find( 'input[name="update_cart"]' );
    	if ( $update_cart_button.length ) {
    		$update_cart_button.prop( 'disabled', false );
    	}
    }
    

    Than insert a call to this function in the minus.on and plus.on events (lines 33 and 39 below the newNum.val(the_val) )

    
    enable_update_cart_button();
    

    However this wont help much because as soon as you change quantities and click on the update_cart button the plus and minus selectors will disapear. This is caused by the way the cart redraw works since WooCommerce 2.6. In prior versions the page was reloaded and the woocommerce-mod.js script was loaded and the function to add the plus and minus selector was executed again. Now the redraw happens using ajax. The Enfold script is not executed again and no selectors are drawn. Kriesi needs to change the way the script works. The whole part to draw the selectors and to listen to the onlcick event needs to be wrapped into a custom function. This function needs to be executed on the initial load of the cart and each time the “updated_wc_div” event is triggered.

    Long story short. This is a bug/flaw i Enfold and has nothing to do with other plugins. You know I am one of the biggest Enfold fans but I have to say you definitely missed the goal with making Enfold WooCommerce 2.6 compatible. Please do us a favor and give it the highest priority so we can say this was a one-time slip-up.

    Kind regards

    Michael

    #650161

    I have rewritten the woocommerce-mod.js script to work with woocommerce 2.6. This is considered a beta release. Use at your own risk.

    You can download it at https://mensmaximus.de/dokumente/enfold/woocommerce/wc-26-cart/woocommerce-mod.zip

    Installation
    1. Download the file to your computer
    2. Unzip the file
    3. Connect to your hosting account with FTP
    4. Navigate to /wp-content/themes/enfold/config-woocommerce
    5. Rename woocommerce-mod.js on the remote machine to woocommerce-mod.js_original
    6. Copy the local woocommerce-mod.js (see #2) to your remote machine (path from #4)
    7. Visit your websites shopping cart and press Ctrl-R to make sure the new script is loaded instead of the old one from cache
    8. Done. You have replaced the old script with the new one

    I have tested it heavily including min, max and step changes but there might be issues in certain conditions.

    Users should report back any issues in this thread.
    Supporters should forward this to Kriesi for immediate testing and review (I think it should be rewritten in parts – as for now consider it as hot fix)

    This file will be overwritten with the next Enfold update. Please keep that in mind.

    #650173

    Hi Michael,

    impressive, really.. but not being a coder I don’t feel comfortable in editing or replacing crucial files in a working website which belongs to a client of mine. If anything will go wrong I will be screwed.

    I’d like Kriesi people to come up with a safe update to fix this issue asap.

    Cheers
    David

    #650699

    Thank you mensmaximus. Perfect.

    #650705

    Hi Ismael,

    waiting for your reply on this..

    many thanks
    David

    #650783

    @ mensmaximus
    we inserted your, WooCommerce-mod.js, in our page, it all works fine, thank you.

    #650799

    Hey!

    Thanks @mensmaximus :)

    Regards,
    Yigit

    #650806

    This appears to solve the issue. Thanks for the quick work and I’ll look forward to the next version to a final fix.

    Thanks!

    #650887

    yep, it works.. good job Michael :)

    #651422

    Thank you Michael for this fix!

    #651468

    Hi Mensmaximus
    Thanks, saved a lot of time, so far so good, all works fine, on variable products as well.
    Cheers

    #652490

    Legend… Thank you…

    #652921

    @Mensmaximus:

    Ran into this yesterday, and had the luck to find this thread very quickly. Cheers for that solution!
    I hope this is fixed in a official way soon, as I feel hesitant to use this in the website.

    cheers!

    rob

    #652973

    Great job.

    #653019

    @Mensmaximus
    Your fix did the trick for my site, thank you very much.

    #654073

    Thanks!

    #654089

    great work maximus. thx.

    my question is now: how long does it take for an official update?

    #654178

    Hi,


    @volmering
    Our devs are working on the update. We are hoping to release it soon

    Best regards,
    Yigit

    #654180

    thank you yigit for the info

    #655868

    Top Man Michael!

    Thank god there are guys like you looking over us all

    Kindest regards

    Peter

    #656306

    I have no luck :(
    I just uploaded file, but there is nothing change on my cart page.

    ===================
    ah, my bad.
    i forgot to configure on Minify plugins.

    Your patch is great!

    • This reply was modified 8 years, 4 months ago by masyogie.
    #656308

    @masyogie did you clear the browser cache as well as any cache from plugins like wp-rocket. Did you follow the instructions exactly?

Viewing 30 posts - 1 through 30 (of 33 total)
  • The topic ‘Woocommerce 2.6 problem – urgent!!!’ is closed to new replies.