Skip to content

IE11 minicart not updating on configurable product page (ES6) #13820

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tommi-martin opened this issue Feb 23, 2018 · 5 comments
Closed

IE11 minicart not updating on configurable product page (ES6) #13820

tommi-martin opened this issue Feb 23, 2018 · 5 comments
Assignees
Labels
Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@tommi-martin
Copy link

Preconditions

  • Magento 2.2+ or
  • Any M2 version with Magento_ConfigurableProduct/view/frontend/web/js/options-updater.js present
  • Win 8.1 / Internet Explorer 11

Steps to reproduce

  1. Navigate to product configurable product page.
  2. Select swatch attribute values
  3. Add product to cart

Expected result

Product is added to cart, minicart updates to display the product in cart.

Actual result

Product is added to cart, Minicart displays “You have no items in your shopping cart."

Notes:

The issue is caused by options-updater.js line 26,

changedProductOptions = data.items.find(function (item) {
    return item['product_id'] === productId;
});

data.items is an array.
IE11 does not support ES6 array.prototype.find() method.
This method is not polyfilled by es6-collections.js

IE Console:
Object doesn’t support property or method ‘find'

Only way to update the minicart is leaving the configurable product page after this point. IE console error persists if you return to the configurable product page.

Possible fixes:

  • Update es6-collections.js to es6-shim.js. This would be preferable since as es6-collections.js is no longer maintained. Include new WeakMap implementation since it is not present in es6-shim, perhaps the implementation from es6-collections would be enough.
  • Remove array.prototype.find method from all javascript files and replace with supported code.
@magento-engcom-team magento-engcom-team added Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release labels Feb 23, 2018
@magento-engcom-team
Copy link
Contributor

@Pumppa, thank you for your report.
We've acknowledged the issue and added to our backlog.

@brvm
Copy link

brvm commented Mar 8, 2018

Facing the same problem. When adding configurable product in IE10 and IE11, I get exactly the same problem as OP.

Temporary fix:
Change .find to .filter

@Frodigo Frodigo self-assigned this Mar 14, 2018
@Frodigo
Copy link
Contributor

Frodigo commented Mar 14, 2018

I'm working on it.

@magento-engcom-team
Copy link
Contributor

Hi @Pumppa. Thank you for your report.
The issue has been fixed in #14105 by @Frodigo in 2.2-develop branch
Related commit(s):

The fix will be available with the upcoming 2.2.5 release.

@magento-engcom-team
Copy link
Contributor

Hi @Pumppa. Thank you for your report.
The issue has been fixed in #14192 by @mastiuhin-olexandr in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming 2.3.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

No branches or pull requests

4 participants