File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
app/code/Magento/Checkout/view/frontend Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 14
14
method="post"
15
15
id="form-validate"
16
16
data-mage-init='{"Magento_Checkout/js/action/update-shopping-cart":
17
- {"validationURL" : "/checkout/cart/updateItemQty"}
17
+ {"validationURL" : "/checkout/cart/updateItemQty",
18
+ "updateCartActionContainer": "#update_cart_action_container"}
18
19
}'
19
20
class="form form-cart">
20
21
<?= $ block ->getBlockHtml ('formkey ' ) ?>
Original file line number Diff line number Diff line change @@ -14,7 +14,8 @@ define([
14
14
$ . widget ( 'mage.updateShoppingCart' , {
15
15
options : {
16
16
validationURL : '' ,
17
- eventName : 'updateCartItemQty'
17
+ eventName : 'updateCartItemQty' ,
18
+ updateCartActionContainer : ''
18
19
} ,
19
20
20
21
/** @inheritdoc */
@@ -31,7 +32,9 @@ define([
31
32
* @return {Boolean }
32
33
*/
33
34
onSubmit : function ( event ) {
34
- if ( ! this . options . validationURL ) {
35
+ var action = this . element . find ( this . options . updateCartActionContainer ) . val ( ) ;
36
+
37
+ if ( ! this . options . validationURL || action === 'empty_cart' ) {
35
38
return true ;
36
39
}
37
40
You can’t perform that action at this time.
0 commit comments