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  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:


 …but it looked like this:

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.

JavaScript Time Library

Several weeks ago I spent some time working with JavaScript for a separate project, and I needed some “stopwatch” functionality. I was shocked to find there were no good, simple classes to fit my needs. Moreover — there were awful examples for javascript time functions out there (like never-ending loop, to name the worst). So, I spent some time to write my own. And then, I just needed some more time to repack what I wrote as a useful small library. The result is already here: my JavaScript Time Library. There are no big things in this library — just a stopwatch and backward clock “classes” and some support functions. Still — it should be piece of cake for anyone to include this library in any javascript project (download and quick guide on the JavaScript Time library pages).

Example Usage

It’s simple as creating an object and firing the timer:

For more info — give a try to the examples and help info here.


jQueryMobile: does it work?

The Story

Back in November, after few weeks of curiosity, I decided to give jQueryMobile a try. In my world that means: get the framework, create a real-life example and put it into the wild. It was “a must” especially in this case, because I couldn’t find any real-life example of using jQueryMobile back then (everything I managed to find was just these simple nice how-to tutorials, but I was interested in web apps, not mobile sites with few pages) It is always the same: everything looks fine with any framework when you read the documentation, but is it suitable (and where is it suitable) can be found only with real-life tests… Continue reading jQueryMobile: does it work?