Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #626808

    When we increase the quantity with the arrow next to our quantity box, the price does not update.

    I thought it was a problem with the WooCommerce TM Extra Products Plugin. Their support said it’s an Enfold issue as Enfold is adding the Quantity Arrows to the WooCommerce Functionality.

    They provided this JS to fix the problem.

    (function($) {
        "use strict";
    
    $(document).ready(function(){
    
    $(".quantity .minus,.quantity .plus").on("click",function(){
    $(this).closest(".quantity").find(".input-text").trigger("change");
    });
    
    });
    })(jQuery);

    I created a new JS file and loaded it into my Child Theme’s root folder. I have been unsuccessful in calling the file from my functions.php. I have read through the forums and also read through https://kriesi.at/support/topic/custom-js/.

    If you would, please tell me the code I need to add to the funcitons.php to make this work.

    Thanks,

    Micah

    #628122

    Hey tileproducts,

    Thank you for using Enfold.

    Could you please provide a link to the page with the issue? Try to add this in the functions.php file:

    // new script
    add_action('wp_footer', 'ava_new_custom_script');
    function ava_new_custom_script(){
    ?>
    <script type="text/javascript">
    (function($) {
        "use strict";
    
    	$(document).ready(function(){
    		$(".quantity .minus,.quantity .plus").on("click",function(){
    			$(this).closest(".quantity").find(".input-text").trigger("change");
    		});
    	});
    })(jQuery);
    </script>
    <?php
    }

    Best regards,
    Ismael

    #628544

    I added the code and it made no difference.

    http://tpgdev.denmac-ind.com/product/custom-indoor-tile-6in-x-6in/

    We still need help with this.

    Thanks,

    Micah

    #629017

    Hi,

    Please send us a temporary admin login so that we can have a closer look. You can post the details in the Private Content section of your reply.

    Regards,
    Rikard

    #629515

    The Developers at Theme Complete corrected the JavaScript and now the +/- are working for the WooCommerce Qty Box.

    Here is the updated code in case it’s useful for anyone else.

    /*    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
    }  

    This issue is now resolved.

    Micah

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘WooCommerce Quantity Arrow Buttons’ is closed to new replies.