-
AuthorPosts
-
May 3, 2016 at 11:43 pm #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
May 6, 2016 at 6:39 am #628122Hey 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,
IsmaelMay 7, 2016 at 5:55 am #628544I 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
May 9, 2016 at 6:44 am #629017Hi,
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,
RikardMay 9, 2016 at 10:54 pm #629515The 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
-
AuthorPosts
- The topic ‘WooCommerce Quantity Arrow Buttons’ is closed to new replies.