Sunday, March 18, 2012

Show thumbnail image without pop-up window


Locate media.phtml inapp/design/frontend/default/themename/template/catalog/product/view, and near line# 59, you should see:
<a href=”#” onclick=”popWin(’<?php echo $this->getGalleryUrl($_image) ?>’, ‘gallery’, ‘width=300,height=300,left=50,top=50,location=no,status=yes,scrollbars=yes,resizable=yes’); return false;”><img src=”<?php echo $this->helper(’catalog/image’)->init($this->getProduct(), ‘thumbnail’, $_image->getFile())->resize(120); ?>” alt=”<?php echo $this->htmlEscape($_image->getLabel()) ?>” title=”<?php echo $this->htmlEscape($_image->getLabel()) ?>” /></a>
change the part in red to the following:
<a href=”<?php echo $this->helper(’catalog/image’)->init($this->getProduct(), ‘image’, $_image->getFile()); ?>” title=”<?php echo $_product->getName();?>” onclick=”$(’image’).src = this.href; return false;”>
You should be able to modify it a bit more if you want the image to update on mouseover.

1 comment:

  1. It's more according to Good guy Look for than it can Oblivion. Of course, you will discover there's amazing cope that will should go as well as that along with the significant element nests within placing co-op within heart associated with activity .

    Buy WOW Gold  RS Gold  Buy Diablo 3 Gold

    ReplyDelete