File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
app/code/Magento/Checkout/view/frontend Expand file tree Collapse file tree 2 files changed +4
-5
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 @@ -15,13 +15,12 @@ define([
1515 var items , i , reload ;
1616
1717 $ ( this . options . emptyCartButton ) . on ( 'click' , $ . proxy ( function ( event ) {
18- if ( event . detail === 0 ) {
19- return ;
20- }
21-
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+ if ( $ ( this . options . emptyCartButton ) . parents ( 'form' ) . length > 0 ) {
22+ $ ( this . options . emptyCartButton ) . parents ( 'form' ) . submit ( ) ;
23+ }
2524 } , this ) ) ;
2625 items = $ . find ( '[data-role="cart-item-qty"]' ) ;
2726
You can’t perform that action at this time.
0 commit comments