Skip to content

Instantly share code, notes, and snippets.

@EdwardIII
Created November 16, 2012 15:14
Show Gist options
  • Save EdwardIII/4088081 to your computer and use it in GitHub Desktop.
Save EdwardIII/4088081 to your computer and use it in GitHub Desktop.
<?php if (count($this->getGalleryImages()) > 0): ?>
<link rel="stylesheet" href="/js/custom/fancybox/jquery.fancybox.css?v=2.1.3" type="text/css" media="screen" />
<script type="text/javascript" src="/js/custom/fancybox/jquery.fancybox.pack.js?v=2.1.3"></script>
<script type="text/javascript">
jQuery(function($){
$('.more-pics').fancybox();
})
</script>
<div class="more-views">
<ul>
<?php foreach ($this->getGalleryImages() as $_image): ?>
<li>
<a rel="more-pics-gallery" class="more-pics" href="<?php Mage::getModel('catalog/product_media_config')
->getMediaUrl( $_image ) ?>" title="<?php echo $this->htmlEscape($_image->getLabel()) ?>"><img src="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $_image->getFile())->resize(56); ?>" width="56" height="56" alt="<?php echo $this->htmlEscape($_image->getLabel()) ?>" /></a>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment