简体   繁体   English

magento bundle.js错误

[英]magento bundle.js error

I just discovered on my site using magento 1.3.2.2 that on a bundled product, when adding different options the price does not change in internet explorer. 我刚刚在我的网站上发现使用magento 1.3.2.2在捆绑产品上,当添加不同的选项时,价格在Internet Explorer中不会改变。 It works fine in all other browsers however. 但它适用于所有其他浏览器。

In internet explorer I get the error message. 在Internet Explorer中我收到错误消息。

Message: Object doesn't support this property or method
Line: 34
Char: 9
Code: 0
URI: /skin/frontend/my_new_interface/design2/js/bundle.js

So I checked out line 34 and found 所以我检查了第34行并找到了

parts = selection.id.split('-');

I verified that selection.id is a string. 我验证了selection.id是一个字符串。 I'm not a javascript expert and I'm not familiar with prototype. 我不是javascript专家,我不熟悉原型。

On a lark I decided to split up the line as: 在云雀上我决定将这条线分开:

var parts = selection.id;
parts = part.split('-');

Well that fixed the problem. 那解决了这个问题。 Furthermore I went back and just reduced to: 此外,我回去,只是简化为:

var parts = selection.id.split('-');

Which still worked as well. 哪个仍然有用。 I don't think this is a file I should be messing with though. 我不认为这是一个我应该搞砸的文件。 I'm assuming this javascript class should work fine in ie without me having to change anything. 我假设这个javascript类应该可以正常工作,即我不需要改变任何东西。

I'm hoping someone has an idea of why this might have fixed the problem or what I can do to find out what the real problem is. 我希望有人知道为什么这可能解决问题或我能做些什么来找出真正的问题是什么。 Do you see any problem with me leaving this fix the way it is? 你觉得我有什么问题可以解决这个问题吗?

It's very possible that you hit an ID in the other case that didn't exist, and therefore it was attempting to split an undefined variable. 你很可能在另一个不存在的情况下点击了一个ID,因此它试图拆分一个未定义的变量。 If the fix works for you, stick with it, but you may want to consider upgrading your Magento installation. 如果修复程序适合您,请坚持使用它,但您可能需要考虑升级Magento安装。 The series is onto 1.4 now, and there are huge numbers of fixes in every release. 该系列现已发布到1.4,每个版本都有大量修复。

Hope that helps! 希望有所帮助!

Thanks, Joe 谢谢,乔

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM