dongrendang6566 2013-02-12 13:19
浏览 82
已采纳

在magento中的可配置产品上显示关联产品的图像

I have used this tutorial to achieve this. but when I change the option I'm having this error:

Uncaught TypeError: Cannot set property 'src' of null configurable.js:159
Product.Config.configureElement configurable.js:159
Product.Config.configure configurable.js:127
(anonymous function) prototype.js:391
_createResponder.responder prototype.js:5598

is there anyone can help me with this? Magento ver. 1.7.0.2

or could you advise me any other solution to make this happen? thank you very much.

  • 写回答

1条回答 默认 最新

  • dongxuan2015 2013-02-12 15:43
    关注

    Assuming that most of your product have images associated to them and your image have an id

      <img id="image" .. />
    

    Using chrome debugging tool or firebug for firefox try

    console.log(assocIMG); // should return all products image url
    console.log(assocIMG[productNo]);  // should return image url
    

    (around line $('image').src = assocIMG[productNo];)

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 乌班图ip地址配置及远程SSH
  • ¥15 怎么让点阵屏显示静态爱心,用keiluVision5写出让点阵屏显示静态爱心的代码,越快越好
  • ¥15 PSPICE制作一个加法器
  • ¥15 javaweb项目无法正常跳转
  • ¥15 VMBox虚拟机无法访问
  • ¥15 skd显示找不到头文件
  • ¥15 机器视觉中图片中长度与真实长度的关系
  • ¥15 fastreport table 怎么只让每页的最下面和最顶部有横线
  • ¥15 java 的protected权限 ,问题在注释里
  • ¥15 这个是哪里有问题啊?