Closed sneha-sukumaran closed 7 years ago
This is already fixed in 2.0.11 . Jira ticket: MAGETWO-58035
@sneha-sukumaran, thank you for your report. We were not able to reproduce this issue by following the steps you provided. If you'd like to update it, please reopen the issue. We tested the issue on 2.3.0-dev, 2.2.0, 2.1.9
Hi @magento-engcom-team and @kfriend I have seen this issue on both chrome, IE, and safari for the site in question, across devices and ISPs. I was able to capture the source code and errors for this happening in the product page, the cart, and a variation on chrome last week. Below I have shared view-only google docs that will allow you to see the code, screenshots of what the issue looks like, and the error that shows up on the page. I have highlighted the section of code that i THINK is the culprit, but please note I am not a coder, so the code below might not be the culprit. The google docs are like 70 pages each but I didn't want to leave anything out. :)
Product Page Error Code: https://docs.google.com/document/d/1n_6_ilrpQFIb_g_4J9Vu-F3s0Jfm-pKDCDrc5P9_9ng/edit?usp=sharing
Product Page red Error Code AND green OK: https://docs.google.com/document/d/1pc1wWeKKamBFE3oyAyTlBvPjdMrNibsFe-jAEHbYye4/edit?usp=sharing
Cart Error Code: https://docs.google.com/document/d/1wYjCbWgBVzcIsZdLy0MQPDuCou3CMr61Tztt0HFEslE/edit?usp=sharing
No issue in the cart: https://docs.google.com/document/d/1nvxdoOL-Q_HyoZ9qmYu_DDFmluzYSDLJYYfGLKVf-XU/edit?usp=sharing
Hi @magento-admin Would you please provide some patch for 2.2.7 version if you have resolved it in 2.2.9 as stated here? https://github.com/magento/magento2/issues/11411
@nitin-bc
You can do it by yourself
Create a module. In module create a javascript mixin
example of requirejs-config.js file
var config = { 'Magento_Msrp/js/msrp': { 'MyVendor_MyModule/js/mixin/msrp': true } } } };
MyVendor/MyModule/view/frontend/web/js/mixin/msrp.js
define(['jquery'], function ($) {
return function (originalWidget) {
$.widget('mage.addToCart', $.mage.sidebar,
{
//fix bug on chrome with double submit form, when you updating cart item
_addToCartSubmit: function (event) {
event.preventDefault();
this.element.trigger('addToCart', this.element);
if (this.element.data('stop-processing')) {
return false;
}
if (this.options.addToCartButton) {
$(this.options.addToCartButton).click();
return false;
}
if (this.options.addToCartUrl) {
$('.mage-dropdown-dialog > .ui-dialog-content').dropdownDialog('close');
}
$(this.options.cartForm).submit();
}
}
);
return $.mage.addToCart;
};
});
The problem is in event.preventDefault(); Didn't test it on IE 11 but in chrome it fixed this problem
@Vital388 It's working properly. Thank you.
Preconditions
Steps to reproduce
Expected result
Actual result
This also happens in demo site http://magento2-demo.nexcess.net/