【问题标题】:Magento AJAX problem in IE9 64bit - Using Simple Configurable Products PluginIE9 64bit 中的 Magento AJAX 问题 - 使用简单的可配置产品插件
【发布时间】:2025-12-14 11:45:01
【问题描述】:

我有一个使用简单可配置产品插件的 Magento。对于那些不知道的人,一旦您选择了可配置的产品选项,它就会使用 AJAX 查询来获取构成您的可配置产品选择的简单产品的自定义选项。

问题存在于this page

当有人根据包装尺寸选择他们想要的简单产品时,应该在让他们决定颜色选择时获得自定义选项。

这在除 64 位模式下的 IE9 之外的每个浏览器都可以正常工作(恰好是我的客户使用的浏览器!!!)

我已经尝试使用以下方法强制文档类型:

<meta http-equiv="X-UA-Compatible" content="IE=8" />

但在这个 64 位版本中无济于事......

插件开发者已经尽力忽略我,所以我有点卡住了。这是脚本进行的 AJAX 调用 - 我想知道这是否可能与未加载 ActiveX 对象有关?

Product.Config.prototype.showCustomOptionsBlock = function(productId, parentId) {
    var coUrl = this.config.ajaxBaseUrl + "co/?id=" + productId + '&pid=' + parentId;
    var prodForm = $('product_addtocart_form');

   if ($('SCPcustomOptionsDiv')==null) {
      return;
   }

    Effect.Fade('SCPcustomOptionsDiv', { duration: 0.5, from: 1, to: 0.5 });
    if(productId) {
        //Uncomment the line below if you want an ajax loader to appear while any custom
        //options are being loaded.
        $$('span.scp-please-wait').each(function(el) {el.show()});

        //prodForm.getElements().each(function(el) {el.disable()});
        new Ajax.Updater('SCPcustomOptionsDiv', coUrl, {
          method: 'get',
          cache: false,
          evalScripts: true,
          onComplete: function() {
              $$('span.scp-please-wait').each(function(el) {el.hide()});
              Effect.Fade('SCPcustomOptionsDiv', { duration: 0.5, from: 0.5, to: 1 });
              //prodForm.getElements().each(function(el) {el.enable()});
          }
        });
    } else {
        $('SCPcustomOptionsDiv').innerHTML = '';
        window.opConfig = new Product.Options([]);
    }
};

任何想法/想法将不胜感激!

【问题讨论】:

  • 任何错误信息?你使用的是兼容 ie9 的原型版本吗?
  • 这是原型版本:1.6.0.3 - 我也没有看到任何错误。您可以在此产品上亲自查看:tradepaintdirect.co.uk/index.php/decorative-paints/…
  • 这个版本的prototype不支持ie9
  • 好的,我已经更新到最新版的Prototype了……我看看有没有改进

标签: ajax magento 64-bit internet-explorer-9


【解决方案1】:

正如Anton S 建议的那样,升级原型确实有效!您可以从这里下载最新版本的框架:http://www.prototypejs.org/

【讨论】:

  • 升级原型导致管理区域出现大量错误,所以我做了它,以便最新的原型只加载到产品页面而不加载其他任何地方。