File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
app/code/Magento/Checkout/view/frontend Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 5656 <span><?= $ block ->escapeHtml (__ ('Continue Shopping ' )) ?> </span>
5757 </a>
5858 <?php endif ; ?>
59- <button type="submit "
59+ <button type="button "
6060 name="update_cart_action"
6161 data-cart-empty=""
6262 value="empty_cart"
Original file line number Diff line number Diff line change @@ -14,14 +14,14 @@ define([
1414 _create : function ( ) {
1515 var items , i , reload ;
1616
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 ( ) {
2218 $ ( this . options . emptyCartButton ) . attr ( 'name' , 'update_cart_action_temp' ) ;
2319 $ ( this . options . updateCartActionContainer )
2420 . 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+ }
2525 } , this ) ) ;
2626 items = $ . find ( '[data-role="cart-item-qty"]' ) ;
2727
You can’t perform that action at this time.
0 commit comments