Php magento 1.9.1.0 ElevateToom未在自定义主题上首次加载/工作
我正在使用1.9.1.0和自定义主题(购物者主题) 我复制了media.phtml和app.js等(来自rwd)用于缩放 缩放不是第一次加载,但当我单击缩略图(更多视图)时,我发现正确加载了缩放,并且第一次加载了人的第二个图像 很明显,虽然我使用自定义主题,但我必须手动完成两件事 1) 在产品详细信息页面中,将首先加载第一个图像(基本图像) 2) 而且电梯门也装了Php magento 1.9.1.0 ElevateToom未在自定义主题上首次加载/工作,php,jquery,magento,Php,Jquery,Magento,我正在使用1.9.1.0和自定义主题(购物者主题) 我复制了media.phtml和app.js等(来自rwd)用于缩放 缩放不是第一次加载,但当我单击缩略图(更多视图)时,我发现正确加载了缩放,并且第一次加载了人的第二个图像 很明显,虽然我使用自定义主题,但我必须手动完成两件事 1) 在产品详细信息页面中,将首先加载第一个图像(基本图像) 2) 而且电梯门也装了 但是我找不到我通过jquery更改代码的页面尝试查看此文件:(/skin/frontend/rwd/default/js/app.j
但是我找不到我通过jquery更改代码的页面尝试查看此文件:(/skin/frontend/rwd/default/js/app.js)并查找image.elevateToom();并检查是否有注释,如果有,请删除注释并再次运行。对于已经没有冲突设置但仍遇到问题的人,我最终在上找到了此解决方案
请不要发布多个问题的相同答案。发布一个好的答案,然后投票/标记以重复结束其他问题。如果问题不是重复的,请根据问题定制您的答案。
// 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
});
});
});