1

I am having problems with Internet Explorer 7 (unfortunately 20% of our customer base still use IE 7). One of our extensions doesn't seem to be Internet Explorer 7 compatible and is mucking up the look and functionality of our configurable product pages.

Is there a way in the XML file that i can disable this extension or the JavaScript if the user is using IE7?

1

Yes definitely, you can use conditions if your layout like this:

<action method="removeItem"><type>js</type><name>myjavascript.js</name><params/><if>lt IE 7</if></action>

The if tag is what you need. lt means "less than", you can also use lte (less than/equals), gt (greather than), gte (greather than/equals).

6
  • This worked for internet Explorer however it is also removing it for chrome? – Adam Allen Jan 18 '16 at 16:19
  • Nope it should not if you specify the if tag correctly as my example, it should only affect IE. – Raphael at Digital Pianism Jan 18 '16 at 16:21
  • This is what i have ... <action method="addItem"><type>skin_js</type><name>js/amasty/amconf/configurable.js</name><params/><if>gt IE 7</if></action> which removes the script for 7 and 6 but also on chrome, firefox and oprea – Adam Allen Jan 18 '16 at 16:22
  • Ok so that means that the js/amasty/amconf/configurable.js will only be added for IE > 7 (so from IE8). What do you need exactly ? – Raphael at Digital Pianism Jan 18 '16 at 16:23
  • that is exactly what i want, however it is affecting the other browsers as well? – Adam Allen Jan 18 '16 at 16:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.