Posted By

nico65 on 08/20/09


Tagged

gallery magento imageswitcher


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

umang_nine


Magento main product image switcher


 / Published in: PHP
 

URL: http://www.magentocommerce.com/boards/viewthread/6402/P0/

--

  1. replace:
  2.  
  3. <a href="#" onclick="popWin('<?php echo $this->getGalleryUrl($_image) ?>', 'gallery', 'scrollbars=yes,width=300,height=300,resizable=yes');return false;">
  4. <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()) ?>"/>
  5. </a>
  6.  
  7. with:
  8.  
  9. <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;">
  10. <!-- The below should remain the same as before -->
  11. <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()) ?>"/>
  12. </a>

Report this snippet  

You need to login to post a comment.