Topic with no new replies

IE prevents onepage checkout in plug-in


Author Message
Written on: 18. 02. 2011 [22:36]
Thuthuka
Peter
Topic creator
registered since: 29.09.2010
Posts: 4
Hi All

We are busy setting up our shop and are having an issue with the onepage checkout on IE.

Just to be clear the onepage checkout works when you go to it directly via Magento. This works for Firefox, Opera and IE.

When I access the onepage checkout through the Typogento plug-in in Typo3 it works for Firefox and Opera , but not for IE.

Initially it was not working for Opera and Firefox either but I added the following .js to my shop template in Typo3 and things started to work but only for Opera and Firefox and not IE.

[javascript]<!--[if lte IE 8]>
<link rel="stylesheet" type="text/css" href="http://mytestsite.com/magento/skin/frontend/default/blank/css/styles-ie.css" media="all" />
<script type="text/javascript" src="http://mytestsite.com/magento/js/lib/ds-sleight.js"></script>
<script type="text/javascript" src="http://mytestsite.com/magento/js/varien/iehover-fix.js"></script>
<![endif]-->

<script type="text/javascript" src="http://mytestsite.com/magento/js/prototype/prototype.js"></script>
<script type="text/javascript" src="http://mytestsite.com/magento/js/prototype/validation.js"></script>
<script type="text/javascript" src="http://mytestsite.com/magento/js/scriptaculous/builder.js"></script>
<script type="text/javascript" src="http://mytestsite.com/magento/js/scriptaculous/effects.js"></script>
<script type="text/javascript" src="http://mytestsite.com/magento/js/scriptaculous/dragdrop.js"></script>
<script type="text/javascript" src="http://mytestsite.com/magento/js/scriptaculous/controls.js"></script>
<script type="text/javascript" src="http://mytestsite.com/magento/js/scriptaculous/slider.js"></script>

<script type="text/javascript" src="http://mytestsite.com/magento/js/varien/menu.js"></script>
<script type="text/javascript" src="http://mytestsite.com/magento/js/varien/form.js"></script>
<script type="text/javascript" src="http://mytestsite.com/magento/js/varien/js.js"></script>
<script type="text/javascript" src="http://mytestsite.com/magento/js/varien/weee.js"></script>
<script type="text/javascript" src="http://mytestsite.com/magento/js/mage/translate.js"></script>
<script type="text/javascript" src="http://mytestsite.com/magento/js/mage/cookies.js"></script>

[/javascript]
From what I have been able to work out the problem is in the magento Accordion.js
in the
(44) openSection: function(section)
...
(56) var contents = Element.select(section, '.a-item');

This does not return an element[0] for the contents variable but is being passed the same data
when parsed from Firefox and IE.
and this is as far as I can get to solve this issue.

Can someone help me to solve this.

Thanks
Peter
Written on: 25. 02. 2011 [17:49]
Thuthuka
Peter
Topic creator
registered since: 29.09.2010
Posts: 4
Further information

I have traced what I think is the error into the Prototype.js to findElements: function(root)

I originally had Prototype.js, version 1.6.0.3 I have searched online and found that there were two newer versions of prototype.js version 1.6.1 and version 1.7

I tried just replacing ver 1.6.0.3 with 1.7 this breaks everything Magento and Typo3 on all web browsers the one page checkout just stops working.

I then tried 1.6.1 this has the same results as 1.6.0.3 ( ie When I access the onepage checkout through the Typogento plug-in in Typo3 it works for Firefox and Opera , but not for IE.)

I have had a look into the area where the error is originating
[javascript]
(3287)
findElements: function(root) {
root = root || document;
var e = this.expression, results;

switch (this.mode) {
case 'selectorsAPI':
if (root !== document) {
var oldId = root.id, id = $(root).identify();
id = id.replace(/([\.:])/g, "\\$1");
e = "#" + id + " " + e;
}

results = $A(root.querySelectorAll(e)).map(Element.extend);
root.id = oldId;

return results;
case 'xpath':
return document._getElementsByXPath(this.xpath, root);
default:
return this.matcher(root);
}
},
[/javascript]
When I debug this id = $(root).identify(); returns an “unidentified” when under IE8 but returns
"opc-login" under Opera or under IE when going directly to the Magento shop

So I changed it to this

[javascript]
if (root !== document) {
var oldId = root.id, id = $(root).identify();
if (id == undefined) {
id = oldId;
}
id = id.replace(/([\.:])/g, "\\$1");
e = "#" + id + " " + e;
}
[/javascript]

but now the error that I was getting in accordian.js
56 $(this.currentSection).addClassName('active');
moved to another line a bit further down
contents[0].show();

I have tried replacing
56 $(this.currentSection).addClassName('active');
with
Element.addClassName('active');
//$(this.currentSection).addClassName('active');

and I have tried replacing
contents[0].show();
with
$(Element).show();
this breaks every thing in all browsers
Element.show();
This breaks the onepage checkout in Typo3 and Magento in IE8 and Opera but not when using Firefox ?????

Any one any Ideas?

Thanks
Peter
Written on: 01. 03. 2011 [17:00]
Thuthuka
Peter
Topic creator
registered since: 29.09.2010
Posts: 4
A solution of sorts... well light at the end of the tunnel at least

the real problem is a conflict between extensions or rather should I say a conflict between the libraries used by the extensions.

The problem is that Magento uses the prototypes lib functions and on my installation of typo3 I have the t3blog extension that uses the mootools libs. There is a warning in t3blog installation manual that says.

If you are using mootools AND prototypes in your installation you will run into trouble since both JavaScript frameworks use the same namespace. So you will have to decide for one of these. We decided for mootools.


The only issue I have with this is that I do not know all the libs being used by all the extensions and personally I do think that to expect a “user” to know which T3 Ext uses which lib and keep track of it and which libs break each other is a bit much. (ok rant over)

Now all I have to do is figure out why the t3blog template-mechanism is being called by the shop and stop it.(any ideas ) icon_smile.gif

If the TypoGento authors are reading this you might want to put a conflict notice on TypoGento to say that it (or rather Magento ) conflicts with the t3blog extension.



Portal information:

At the moment there are 0 users online, thereof 0 registered users and 0 guests.
Today 0 registered users and 0 guests were already online.

Now online


TypoGento has 231 registered user, 112 topics and 184 answers. On average 0.31 posts are written per day.