Advertisement
andhiirawan

Magento : Product Detail Page : Colorswicher - Media

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