From 7bb5dd47e92e4d20da612e62bae7822de48d1bee Mon Sep 17 00:00:00 2001 From: Wojtek Naruniec Date: Mon, 18 Feb 2019 13:16:20 +0100 Subject: [PATCH] Skip cart validation if empty cart action is executed --- .../view/frontend/web/js/action/update-shopping-cart.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/code/Magento/Checkout/view/frontend/web/js/action/update-shopping-cart.js b/app/code/Magento/Checkout/view/frontend/web/js/action/update-shopping-cart.js index ce1527b3d72d6..9d79e34b10f17 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/action/update-shopping-cart.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/action/update-shopping-cart.js @@ -35,6 +35,11 @@ define([ return true; } + var action = this.element.find('#update_cart_action_container').val(); + if (action === 'empty_cart') { + return true; + } + if (this.isValid()) { event.preventDefault(); this.validateItems(this.options.validationURL, this.element.serialize());