Skip to content

Commit 619d02a

Browse files
authored
ENGCOM-5807: Resolve "Clear Shopping Cart" button not working in Internet Explorer issue24491 magento#24499
2 parents ea024a5 + 70bca82 commit 619d02a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

app/code/Magento/Checkout/view/frontend/templates/cart/form.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
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"

app/code/Magento/Checkout/view/frontend/web/js/shopping-cart.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)