Magento main product image switcher
URL: http://www.magentocommerce.com/boards/viewthread/6402/P0/
Copy this code and paste it in your HTML
replace:
<a href="#" onclick="popWin('
<?php echo $this->getGalleryUrl($_image) ?>', 'gallery', 'scrollbars=yes,width=300,height=300,resizable=yes');return false;">
<img src="
<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $_image->getFile())->resize(70, 70);
?>" alt="
<?php echo $this->htmlEscape($_image->getLabel()) ?>" title="
<?php echo $this->htmlEscape($_image->getLabel()) ?>"/>
</a>
with:
<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;">
<!-- The below should remain the same as before -->
<img src="
<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $_image->getFile())->resize(70, 70);
?>" alt="
<?php echo $this->htmlEscape($_image->getLabel()) ?>" title="
<?php echo $this->htmlEscape($_image->getLabel()) ?>"/>
</a>
Report this snippet