File tree 2 files changed +6
-6
lines changed
app/code/Magento/Checkout/view/frontend
2 files changed +6
-6
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 @@ -14,14 +14,14 @@ define([
14
14
_create : function ( ) {
15
15
var items , i , reload ;
16
16
17
- $ ( this . options . emptyCartButton ) . on ( 'click' , $ . proxy ( function ( event ) {
18
- if ( event . detail === 0 ) {
19
- return ;
20
- }
21
-
17
+ $ ( this . options . emptyCartButton ) . on ( 'click' , $ . proxy ( function ( ) {
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
+
22
+ if ( $ ( this . options . emptyCartButton ) . parents ( 'form' ) . length > 0 ) {
23
+ $ ( this . options . emptyCartButton ) . parents ( 'form' ) . submit ( ) ;
24
+ }
25
25
} , this ) ) ;
26
26
items = $ . find ( '[data-role="cart-item-qty"]' ) ;
27
27
You can’t perform that action at this time.
0 commit comments