From f19023a9e11af2d05b729c445188f6a0891b7c58 Mon Sep 17 00:00:00 2001 From: Gabriel Reguly Date: Thu, 2 Nov 2017 14:15:29 -0200 Subject: [PATCH] Shipping selection for multiple packages Allow for shipping method selection when using multiple packages. Previous code selected/posted only the changed method, but multiple packages require all methods. --- assets/js/frontend/cart.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/assets/js/frontend/cart.js b/assets/js/frontend/cart.js index cf7e7f6c1d7..dba907935c6 100644 --- a/assets/js/frontend/cart.js +++ b/assets/js/frontend/cart.js @@ -185,12 +185,10 @@ jQuery( function( $ ) { * @param {Object} evt The JQuery event. */ shipping_method_selected: function( evt ) { - var target = evt.currentTarget; - var shipping_methods = {}; $( 'select.shipping_method, input[name^=shipping_method][type=radio]:checked, input[name^=shipping_method][type=hidden]' ).each( function() { - shipping_methods[ $( target ).data( 'index' ) ] = $( target ).val(); + shipping_methods[ $( this ).data( 'index' ) ] = $( this ).val(); } ); block( $( 'div.cart_totals' ) );