magento 1.9.1.0 elevateZoom未加载/首次在自定义主题上工作


magento 1.9.1.0 elevateZoom not loaded/working first time on custom theme

我使用1.9.1.0和自定义主题(购物者主题)

我已经复制了media.phtml和app.js等(从rwd)用于缩放

Zoom不是第一次加载的,但当我点击缩略图(更多视图)时,它也正确加载了Zoom,我发现第二张牡丹图加载了第一个

很明显,尽管我使用自定义主题,但我必须手动做两件事1) 在产品详细信息页面中,将首先加载第一个图像(基本图像)2) elevateZoom也加载了

但是我没有找到通过jquery 更改代码的页面

尝试查看此文件:(/skin/frontend/rwd/default/js/app.js)并查找image.eelevateZoom();并检查是否有评论,如果有,请删除评论并重新运行。

对于那些已经没有冲突设置但仍在遇到问题的人,我终于在Github 上提出的问题单上找到了这个解决方案

// First call elevateZoom
$j(document).ready(function() {     
  $j('.product-image-thumbs').attr('id', 'zoomGallery');
  //initiate the plugin and pass the id of the div containing gallery images 
  $j("#image-main").elevateZoom({gallery:'zoomGallery', cursor: 'pointer', galleryActiveClass: 'active', imageCrossfade: true, loadingIcon: 'http://www.elevateweb.co.uk/spinner.gif'}); 
 //pass the images to Fancybox 
 $j("#image-main").bind("click", function(e) { 
    var ez = $j('#image-main').data('elevateZoom');    
    $j.fancybox(ez.getGalleryList()); 
    return false; 
 }); 
// after click you need to remove the current zoom 
$j(".product-image-thumbs li img").click(function(){
    $j("#image-main").attr("src", $j(this).attr("data-main-image-src"));
    $j('.zoomContainer').remove();
    $j('#image-main').removeData('elevateZoom');
// and then call it again
$j('#image-main').elevateZoom({
    gallery: 'more-vies',
    lensSize: 200,
    cursor: 'pointer',
    galleryActiveClass: 'active',
    imageCrossfade: true,
    scrollZoom : true,
    responsive: true
  });
});
});