Advertisement
andhiirawan

Magento : Product Detail Page : Catalog Product View - Media

Oct 1st, 2015
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.23 KB | None | 0 0
  1. <!--app\design\frontend\theme\default\template\catalog\product\view\media.phtml-->
  2.  
  3. <?php
  4.     $_product = $this->getProduct();
  5.     $_helper = $this->helper('catalog/output');
  6. ?>
  7. <?php if (count($this->getGalleryImages()) > 0): ?>
  8. <div class="more-views">
  9.     <ul id="gal1">
  10.          <?php foreach ($this->getGalleryImages() as $_image): ?>
  11.         <li>
  12.             <a href="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'image', $_image->getFile()); ?>" title="<?php echo $_product->getName();?>"  rel="{gallery: 'gal1', smallimage: '<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'image', $_image->getFile())->resize(338); ?>',largeimage: '<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'image', $_image->getFile())->resize(1000); ?>'}">
  13.                 <img style="z-index:0" src="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $_image->getFile())->constrainOnly( true )->keepAspectRatio( false )->keepFrame( false )->resize(70,70); ?>" alt="<?php echo ($this->htmlEscape( $_image->getLabel() )) ?>" />
  14.             </a>            
  15.         </li>
  16.     <?php        
  17.  endforeach; ?>
  18.     </ul>
  19. </div>
  20.  
  21. <div class="product-image">
  22.     <a href="<?php echo $this->helper('catalog/image')->init($_product, 'image')->resize(1000)?>" title="<?php echo $this->escapeHtml($this->getImageLabel())?>" class="jqzoom1 masterzoom" rel="gal1"><img id="jqzomm-masterimg" src="<?php echo $this->helper('catalog/image')->init($_product, 'image')->resize(338);?>" class="normalimg"/></a>
  23. </div>
  24. <?php endif; ?>
  25.  
  26. <script type="text/javascript">
  27.  
  28. //utk slider gambar thumbnail di kiri
  29. jQuery(document).ready(function($) {
  30.  
  31.     jQuery('#gal1').bxSlider({
  32.         auto: false,
  33.         mode: 'vertical',
  34.         minSlides: 4,
  35.         maxSlides: 4,
  36.         nextText: '',
  37.         prevText: '',
  38.         pager: false,
  39.         preloadImages:'all',      
  40.         hideControlOnEnd: true,
  41.         infiniteLoop: false,
  42.    });    
  43.  
  44.      setTimeout(function(){
  45.      jQuery('.jqzoom1').jqzoom({
  46.        zoomType: 'reverse',
  47.        lens:true,
  48.        preloadImages: false,
  49.        alwaysOn:false,
  50.        zoomWidth: 478,
  51.        zoomHeight: 497,
  52.      });
  53.      }, 100);
  54.  
  55. });
  56. //]]>
  57. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement