任何人都可以分享一个用大图像替换缩略图的快速提示吗?
我的“media.phtml”代码的快速片段如下所示:
<p class="product-image">
<?php
$_img = '<img src="'.$this->helper('catalog/image')->init($_product, 'image')->resize(265).'" alt="'.$this->htmlEscape($this->getImageLabel()).'" title="'.$this->htmlEscape($this->getImageLabel()).'" />';
echo $_helper->productAttribute($_product, $_img, 'image');
?>
</p>
<?php endif; ?>
<?php if (count($this->getGalleryImages()) > 0): ?>
<div class="more-views">
<h2><?php echo $this->__('More Views') ?></h2>
<ul class="cf zoom-gallery">
<?php
foreach ($this->getGalleryImages() as $_image): ?>
<li>
<a class="zoom-thumbnail" style="width:<?php echo $arrMedia ["width"]; ?>px;" class="cloud-zoom-gallery" href="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $_image->getFile())->resize($arr ["Owidth"], $arr ["Oheight"]); ?>" target="_popUp" data-easyzoom-source="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $_image->getFile())->resize($arr ["Owidth"], $arr ["Oheight"]); ?>" title="<?php echo $this->htmlEscape($_image->getLabel()) ?>" title="<?php echo $this->htmlEscape($_image->getLabel()) ?>"><img src="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $_image->getFile())->resize($arrMedia ["width"], $arrMedia ["height"]); ?>" width="<?php echo $arrMedia ["width"]; ?>" height="<?php echo $arrMedia ["height"]; ?>" alt="<?php echo $this->htmlEscape($_image->getLabel()) ?>" /></a>
</li>
<?php endforeach; ?>
</ul>
</div>
完整代码位于此处
谢谢!