Skip to content

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

Closed
@tommi-martin

Description

@tommi-martin

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.

Metadata

Metadata

Assignees

Labels

Fixed in 2.2.xThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.1.xThe issue has been reproduced on latest 2.1 releaseReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions