Jump to content

IE8 javascript errors seeing products with combinations


Alsiom

Recommended Posts

Hello,

 

I'm testing a clean install of Prestashop 1.6.0.9 with the default theme (default-bootstrap). I'm having some problems with IE8 javascript, especially seeing products with combinations (only 2 options). Errors are related to Array functions not supported in IE8 like reduce, indexOf,....

I think I've solved it by adding this javascript library (
https://github.com/es-shims/es5-shim/blob/master/es5-shim.js) in header.tpl, and modifying all the 'for' loops of products.js file in this way:

//Syntax of loops that fails
for (var i in tabParams)

//Syntax of loops that do not fail
for (var i=0; i<tabParams.length;i++)

Now works in IE8 and Firefox without problem. IE8 shows high CPU usage for 2-3 seconds but without errors. I would like to know the opinion of experts, which implications may have these changes, and whether it could be interesting to add this changes to the next version of Prestashop.

Thanks.

Link to comment
Share on other sites

×
×
  • Create New...