Automatically recalculate amount of money in the cart
-
Hi, is it please somehow possible to change amount of products in the cart page, and recalculate order cost immidiatelly without clicking Recalculate the cart?
We can see that many visitors are confused with this button. it would be much usefull if the amount will be calculated automatically.
Attachments:
You must be
logged in to view attached files.
Hello,
Sorry, but such functionality is related to the WooCoomerce and we cannot influent it, unfortunately.
I sincerely appreciate your understanding in this matter. Please feel free to reach out to me if you have any further questions.
Kind Regards
Automatic cart update on click
Video
CSS Snippet: Hide the WooCommerce “Update Cart” Button
.woocommerce button[name="update_cart"],
.woocommerce input[name="update_cart"] {
display: none;
}
.coupon.under-proceed {
margin-bottom: 1em;
}
.coupon.under-proceed button {
margin-top: 1em;
background: #efeff0;
}
PHP Snippet: Auto-update WooCommerce Cart when Quantity Changes
//Automatic cart update on click //
add_action( 'wp_footer', 'cart_update_qty_script' );
function cart_update_qty_script() {
if (is_cart()) :
?>
<script>
jQuery('div.woocommerce').on('change', '.qty', function(){
jQuery("[name='update_cart']").removeAttr('disabled');
jQuery("[name='update_cart']").trigger("click");
});
</script>
<?php
endif;
}
Hello,
Glad that you sorted it out.
If you’d like to contact us, we are here for whatever questions you may have.
Have a good day!
Kind Regards
The topic ‘Automatically recalculate amount of money in the cart’ is closed to new replies.