Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Forum: Plugins
    In reply to: [WooReer] Error
    Thread Starter mateusz125

    (@mateusz125)

    Other shipment options work on my website

    I also found this code:

    /**
     * Update Cart Automatically on Quantity Change
     *
     * @author Misha Rudrastyh
     * @url https://rudrastyh.com/woocommerce/remove-update-cart-button.html
     */
    add_action( 'wp_head', function() {
    
    	?><style>
    	.woocommerce button[name="update_cart"],
    	.woocommerce input[name="update_cart"] {
    		display: none;
    	}</style><?php
    	
    } );
    
    add_action( 'wp_footer', function() {
    	
    	?><script>
    	jQuery( function( $ ) {
    		let timeout;
    		$('.woocommerce').on('change', 'input.qty', function(){
    			if ( timeout !== undefined ) {
    				clearTimeout( timeout );
    			}
    			timeout = setTimeout(function() {
    				$("[name='update_cart']").trigger("click"); // trigger cart update
    			}, 2000 ); // 1 second delay, half a second (500) seems comfortable too
    		});
    	} );
    	</script><?php
    	
    } );
    
    

    And want to use it on my website, but it doest work for shopengine…. It works for other woocommerce cart options perfectly. Can anyone help to make this work for shopengine?

Viewing 2 replies - 1 through 2 (of 2 total)