Guest User

Untitled

a guest
Jan 16th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.48 KB | None | 0 0
  1. <?php
  2.     $_productCollection = $this->getLoadedProductCollection();
  3.     $_helper = $this->helper('catalog/output');
  4.     $_carouselId = $this->getCarouselId();
  5.     $_carouselWidth = $this->getCarouselWidth();
  6.     $_carouselHeight = $this->getCarouselHeight();
  7. ?>
  8. <?php if (!$_productCollection or !$_productCollection->count()): ?>
  9.     <p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
  10. <?php else: ?>
  11.     <?php $_iterator = 0; ?>
  12.     <div style="width:<?php echo $_carouselWidth; ?>">
  13.         <div id="<?php echo $_carouselId; ?>">
  14.             <?php $i=1; ?>
  15.             <?php foreach ($_productCollection as $_product): ?>
  16.             <?php //var_dump($_product->getMediaAttributes()); die(); ?>
  17.                 <a href="<?php echo $this->helper('catalog/product')->getProductUrl($_product); ?>" data-caption="<?php echo "#slide".$i ?>">
  18.                     <img src="<?php echo $this->helper('catalog/image')->init($_product, 'carousel_image')->resize($_carouselWidth, $_carouselHeight); ?>" width="<?php echo $_carouselWidth; ?>px" height="<?php echo $_carouselHeight; ?>px" alt="<?php echo $this->stripTags($_product->getName(), null, true) ?>" />
  19.                </a>
  20.            <?php $i++; ?>
  21.             <?php endforeach; ?>
  22.  
  23.             <?php $i=1; ?>
  24.             <?php foreach ($_productCollection as $_product): ?>
  25.             <span class="orbit-caption" id="<?php echo "slide".$i ?>">
  26.                 <?php echo $this->htmlEscape($this->getImageLabel()) ?>
  27.             </span>
  28.             <?php $i++; ?>
  29.             <?php endforeach; ?>
  30.  
  31.         </div>
  32.     </div>
  33. <?php endif; ?>
Add Comment
Please, Sign In to add comment