| @@ -1,10 +1,15 @@ | ||
| 1 | 1 | jQuery(function(){ |
| 2 | 2 | jQuery(document).on('updated_checkout', function(){ |
| 3 | 3 | jQuery(".parcel_machine_checkout").css('display', 'none'); |
| 4 | - jQuery('.shipping_method:checked').each(function(){ | |
| 4 | + jQuery('.shipping_method:checked, .shipping_method[type=hidden]').each(function(){ | |
| 5 | 5 | var method = jQuery(this).val(), display; |
| 6 | - jQuery("#parcel_machine_checkout_"+method).css('display', 'table-row'); | |
| 6 | + if (method.indexOf(':') > -1) { | |
| 7 | + var tmp = method.split(':'); | |
| 8 | + method = tmp[0]; | |
| 9 | + } | |
| 10 | + jQuery(".parcel_machine_checkout_"+method).not(':first').remove(); | |
| 11 | + jQuery(".parcel_machine_checkout_"+method).css('display', 'table-row'); | |
| 7 | 12 | }); |
| 8 | 13 | jQuery('.select-postmachine select').select2({ |
| 9 | 14 | formatResult: function(item) { |
| 10 | 15 | var texts = item.text.split(' - ', 2); |