Advertisement
Guest User

ElSevero

a guest
Aug 18th, 2012
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.64 KB | None | 0 0
  1. <?php
  2.     $_product = $this->getProduct();
  3.     $_helper = $this->helper('catalog/output');
  4.    
  5.     $lightboxPrPage = themeOptions('lightboxPrPage');
  6.     $zoomtype = themeOptions('zoomtype');
  7.     $arr = storeImages ("media");
  8.     $arrZoom = storeImages ("mediaColudZoom");
  9.     $arrMedia = storeImages ("moreViews");
  10.    
  11. ?>
  12. <div class="image-zoom-indent <?php if ($zoomtype == 1 ): ?>zoom-container<?php endif; ?>">
  13. <?php if ($_product->getImage() != 'no_selection' && $_product->getImage()): ?>
  14. <p class="product-image product-image-zoom" <?php if ($zoomtype == 2 ): ?> style="width:<?php echo $arr ["width"]; ?>px; height:<?php echo $arr ["height"]; ?>px;"<?php endif; ?>>
  15. <?php if ($zoomtype == 1 ): ?><a id="zoom-target" href="<?php echo $this->helper('catalog/image')->init($_product, 'image') ?>" title=""><?php endif; ?>
  16.     <?php
  17.    
  18.         if ($zoomtype == 1 ):
  19.         $_img = '<img class="zoom-image" width="'.$arr ["width"].'" height="'.$arr ["height"].'" id="image" src="'.$this->helper('catalog/image')->init($_product, 'image').'" alt="'.$this->htmlEscape($this->getImageLabel()).'" title="'.$this->htmlEscape($this->getImageLabel()).'" />';
  20.         else:
  21.         $_img = '<img id="image" src="'.$this->helper('catalog/image')->init($_product, 'image').'" alt="'.$this->htmlEscape($this->getImageLabel()).'" title="'.$this->htmlEscape($this->getImageLabel()).'" />';
  22.         endif;
  23.         echo $_helper->productAttribute($_product, $_img, 'image');
  24.     ?>
  25. <?php if ($zoomtype == 1 ): ?></a><?php endif; ?>
  26. </p>
  27. <?php if ($zoomtype == 2 ): ?>
  28. <p class="zoom-notice" id="track_hint"><?php echo $this->__('Double click on above image to view full picture') ?></p>
  29. <div class="zoom">
  30.     <a href="#" id="zoom_out" class="btn-zoom-out">&nbsp;</a>
  31.     <div id="track">
  32.         <div id="handle"></div>
  33.     </div>
  34.     <a href="#" id="zoom_in" class="btn-zoom-in">&nbsp;</a>
  35. </div>
  36. <script type="text/javascript">
  37. //<![CDATA[
  38.     Event.observe(window, 'load', function() {
  39.         product_zoom = new Product.Zoom('image', 'track', 'handle', 'zoom_in', 'zoom_out', 'track_hint');
  40.     });
  41. //]]>
  42. </script>
  43. <?php endif; ?>
  44.  
  45. <?php else: ?>
  46. <p class="product-image">
  47.     <?php
  48.         $_img = '<img src="'.$this->helper('catalog/image')->init($_product, 'image')->resize(265).'" alt="'.$this->htmlEscape($this->getImageLabel()).'" title="'.$this->htmlEscape($this->getImageLabel()).'" />';
  49.         echo $_helper->productAttribute($_product, $_img, 'image');
  50.         ?>
  51. </p>
  52. <?php endif; ?>
  53. <?php if (count($this->getGalleryImages()) > 0): ?>
  54. <div class="more-views">
  55.     <h2><?php echo $this->__('More Views') ?></h2>
  56.     <ul class="cf zoom-gallery">
  57.     <?php
  58.     foreach ($this->getGalleryImages() as $_image): ?>
  59.         <li>
  60.             <a class="zoom-thumbnail" style="width:<?php echo $arrMedia ["width"]; ?>px;" class="cloud-zoom-gallery"  href="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $_image->getFile())->resize($arr ["Owidth"], $arr ["Oheight"]); ?>" target="_popUp" data-easyzoom-source="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $_image->getFile())->resize($arr ["Owidth"], $arr ["Oheight"]); ?>" title="<?php echo $this->htmlEscape($_image->getLabel()) ?>" title="<?php echo $this->htmlEscape($_image->getLabel()) ?>"><img src="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $_image->getFile())->resize($arrMedia ["width"], $arrMedia ["height"]); ?>" width="<?php echo $arrMedia ["width"]; ?>" height="<?php echo $arrMedia ["height"]; ?>" alt="<?php echo $this->htmlEscape($_image->getLabel()) ?>" /></a>
  61.         </li>
  62.     <?php endforeach; ?>
  63.     </ul>
  64. </div>
  65. <?php endif; ?>
  66. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement