How to fix OpenCart 1.5 menu bug in Internet Explorer 10

The long history of Internet Explorer causing troubles is anything but forgotten. Once again IE reminded it needs special attention last night, while I was setting up client’s web shop powered by OpenCart. Here is the problem: when tested in IE10, the main menu didn’t work as expected. It wasn’t me (opening demo.opencart.com  in IE10 gave the same result) so a genuine fix was needed. And it turned to be an easy one. But first — here is the problem:

It was supposed to work like that:

opencart-ie-expected

 …but it looked like this:

opencart-ie-bug
screenshot taken in IE10 on Win 8 / 64

So, here is what you must do in order to fix the misunderstanding between IE and the menu JavaScript:

1) Open the common.js file located in catalog\view\javascript folder

2) Find the folloing code (around line 60):

3) Replace the above code with thie modified code below:

4) Save and upload to the server.

We hope OpenCart team will fix this in the upcoming releases, but until then — this quick fix will do the job.

6 thoughts on “How to fix OpenCart 1.5 menu bug in Internet Explorer 10”

  1. Thanks for posting this patch. I can’t believe anybody uses IE for anything other than downloading a different browser!

    1. Well, things are changing fast in this world. Few months ago, when I found this fix, it was working with the then-current version of IE. It looks the site I was fixing back then is still working but one could never know… Sorry if the fix didn’t work for you ;-(

  2. Thanks for the fix, works perfect. Your code above rendered wrong on line 11 which may have been Garry’s problem. The < was converted to the html code <

Leave a Reply

Your email address will not be published. Required fields are marked *