Hello,
the following code works like a charm for Storefront theme in order to auto-update the cart when quantity changed:
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;
}
add_action( 'wp_footer', 'cart_update_qty_script' );
Unfortunately, the code doesnt work for Royal theme and I guess the reason is that Royal uses different classes. Could you please help me with modifying the code in order to use it with your theme?
Many thanks in advance!