File tree 2 files changed +4
-5
lines changed
app/code/Magento/Checkout/view/frontend
2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 56
56
<span><?= $ block ->escapeHtml (__ ('Continue Shopping ' )) ?> </span>
57
57
</a>
58
58
<?php endif ; ?>
59
- <button type="submit "
59
+ <button type="button "
60
60
name="update_cart_action"
61
61
data-cart-empty=""
62
62
value="empty_cart"
Original file line number Diff line number Diff line change @@ -15,13 +15,12 @@ define([
15
15
var items , i , reload ;
16
16
17
17
$ ( this . options . emptyCartButton ) . on ( 'click' , $ . proxy ( function ( event ) {
18
- if ( event . detail === 0 ) {
19
- return ;
20
- }
21
-
22
18
$ ( this . options . emptyCartButton ) . attr ( 'name' , 'update_cart_action_temp' ) ;
23
19
$ ( this . options . updateCartActionContainer )
24
20
. attr ( 'name' , 'update_cart_action' ) . attr ( 'value' , 'empty_cart' ) ;
21
+ if ( $ ( this . options . emptyCartButton ) . parents ( 'form' ) . length > 0 ) {
22
+ $ ( this . options . emptyCartButton ) . parents ( 'form' ) . submit ( ) ;
23
+ }
25
24
} , this ) ) ;
26
25
items = $ . find ( '[data-role="cart-item-qty"]' ) ;
27
26
You can’t perform that action at this time.
0 commit comments