Advertisement
vikasrao999

Untitled

Jun 17th, 2014
348
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.57 KB | None | 0 0
  1. <?php
  2. /**
  3. * Magento
  4. *
  5. * NOTICE OF LICENSE
  6. *
  7. * This source file is subject to the Academic Free License (AFL 3.0)
  8. * that is bundled with this package in the file LICENSE_AFL.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://opensource.org/licenses/afl-3.0.php
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@magentocommerce.com so we can send you a copy immediately.
  14. *
  15. * DISCLAIMER
  16. *
  17. * Do not edit or add to this file if you wish to upgrade Magento to newer
  18. * versions in the future. If you wish to customize Magento for your
  19. * needs please refer to http://www.magentocommerce.com for more information.
  20. *
  21. * @category design
  22. * @package base_default
  23. * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
  24. * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
  25. */
  26.  
  27. /**
  28. * Product media data template
  29. *
  30. * @see Mage_Catalog_Block_Product_View_Media
  31. */
  32. ?>
  33. <?php
  34. $_product = $this->getProduct();
  35. $_helper = $this->helper('catalog/output');
  36. ?>
  37. <?php if ($_product->getImage() != 'no_selection' && $_product->getImage()): ?>
  38. <p class="product-image product-image-zoom">
  39. <?php
  40. $_img = '<img class="photo fn" id="image" src="'.$this->helper('catalog/image')->init($_product, 'image').'" alt="'.$this->htmlEscape($this->getImageLabel()).'" title="'.$this->htmlEscape($this->getImageLabel()).'" />';
  41. echo $_helper->productAttribute($_product, $_img, 'image');
  42. ?>
  43. </p>
  44. <p class="zoom-notice" id="track_hint"><?php echo $this->__('Double click on above image to view full picture') ?></p>
  45. <div class="zoom">
  46. <img id="zoom_out" src="<?php echo $this->getSkinUrl('images/slider_btn_zoom_out.gif') ?>" alt="<?php echo $this->__('Zoom Out') ?>" title="<?php echo $this->__('Zoom Out') ?>" class="btn-zoom-out" />
  47. <div id="track">
  48. <div id="handle"></div>
  49. </div>
  50. <img id="zoom_in" src="<?php echo $this->getSkinUrl('images/slider_btn_zoom_in.gif') ?>" alt="<?php echo $this->__('Zoom In') ?>" title="<?php echo $this->__('Zoom In') ?>" class="btn-zoom-in" />
  51. </div>
  52. <script type="text/javascript">
  53. //<![CDATA[
  54. Event.observe(window, 'load', function() {
  55. product_zoom = new Product.Zoom('image', 'track', 'handle', 'zoom_in', 'zoom_out', 'track_hint');
  56. });
  57. //]]>
  58. </script>
  59. <?php else: ?>
  60. <p class="product-image">
  61. <?php
  62. $_img = '<img class="photo fn" src="'.$this->helper('catalog/image')->init($_product, 'image')->resize(265).'" alt="'.$this->htmlEscape($this->getImageLabel()).'" title="'.$this->htmlEscape($this->getImageLabel()).'" />';
  63. echo $_helper->productAttribute($_product, $_img, 'image');
  64. ?>
  65. </p>
  66. <?php endif; ?>
  67. <?php if (count($this->getGalleryImages()) > 0): ?>
  68. <div class="more-views">
  69. <h2><?php echo $this->__('More Views') ?></h2>
  70. <ul>
  71. <?php foreach ($this->getGalleryImages() as $_image): ?>
  72. <li>
  73. <a href="#" onclick="popWin('<?php echo $this->getGalleryUrl($_image) ?>', 'gallery', 'width=300,height=300,left=0,top=0,location=no,status=yes,scrollbars=yes,resizable=yes'); return false;" 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>
  74. </li>
  75. <?php endforeach; ?>
  76. </ul>
  77. </div>
  78. <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement