Advertisement
Guest User

Untitled

a guest
Sep 28th, 2015
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.64 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@magento.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.magento.com for more information.
  20. *
  21. * @category design
  22. * @package base_default
  23. * @copyright Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
  24. * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
  25. */
  26. ?>
  27. <?php
  28. /**
  29. * Product list template
  30. *
  31. * @see Mage_Catalog_Block_Product_List
  32. */
  33. ?>
  34. <?php
  35. $_productCollection=$this->getLoadedProductCollection();
  36. $_helper = $this->helper('catalog/output');
  37. ?>
  38. <?php if(!$_productCollection->count()): ?>
  39. <p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
  40. <?php else: ?>
  41. <div class="category-products">
  42. <?php echo $this->getToolbarHtml() ?>
  43. <?php // List mode ?>
  44. <?php if($this->getMode()!='grid'): ?>
  45. <?php $_iterator = 0; ?>
  46. <ol class="products-list" id="products-list">
  47. <?php foreach ($_productCollection as $_product): ?>
  48. <li class="item<?php if( ++$_iterator == sizeof($_productCollection) ): ?> last<?php endif; ?>">
  49. <?php // Product Image ?>
  50. <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
  51. <?php // Product description ?>
  52. <div class="product-shop">
  53. <div class="f-fix">
  54. <?php $_productNameStripped = $this->stripTags($_product->getName(), null, true); ?>
  55. <h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped; ?>"><?php echo $_helper->productAttribute($_product, $_product->getName() , 'name'); ?></a></h2>
  56. <?php if($_product->getRatingSummary()): ?>
  57. <?php echo $this->getReviewsSummaryHtml($_product) ?>
  58. <?php endif; ?>
  59. <?php echo $this->getPriceHtml($_product, true) ?>
  60. <?php if($_product->isSaleable()): ?>
  61. <p><button type="button" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Add to Cart')) ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button></p>
  62. <?php else: ?>
  63. <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
  64. <?php endif; ?>
  65. <div class="desc std">
  66. <?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
  67. <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
  68. </div>
  69. <ul class="add-to-links">
  70. <?php if ($this->helper('wishlist')->isAllow()) : ?>
  71. <li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
  72. <?php endif; ?>
  73. <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
  74. <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
  75. <?php endif; ?>
  76. </ul>
  77. </div>
  78. </div>
  79. </li>
  80. <?php endforeach; ?>
  81. </ol>
  82. <script type="text/javascript">decorateList('products-list', 'none-recursive')</script>
  83.  
  84. <?php else: ?>
  85.  
  86. <?php // Grid Mode ?>
  87.  
  88. <?php $_collectionSize = $_productCollection->count() ?>
  89. <?php $_columnCount = $this->getColumnCount(); ?>
  90. <?php $i=0; foreach ($_productCollection as $_product): ?>
  91. <?php if ($i++%$_columnCount==0): ?>
  92. <ul class="products-grid">
  93. <?php endif ?>
  94. <li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">
  95. <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
  96. <h2 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a></h2>
  97. <?php if($_product->getRatingSummary()): ?>
  98. <?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
  99. <?php endif; ?>
  100. <?php echo $this->getPriceHtml($_product, true) ?>
  101. <div class="actions">
  102. <?php if($_product->isSaleable()): ?>
  103. <button type="button" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Add to Cart')) ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
  104. <?php else: ?>
  105. <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
  106. <?php endif; ?>
  107. <ul class="add-to-links">
  108. <?php if ($this->helper('wishlist')->isAllow()) : ?>
  109. <li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
  110. <?php endif; ?>
  111. <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
  112. <li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
  113. <?php endif; ?>
  114. </ul>
  115. </div>
  116. </li>
  117. <?php if ($i%$_columnCount==0 || $i==$_collectionSize): ?>
  118. </ul>
  119. <?php endif ?>
  120. <?php endforeach ?>
  121. <script type="text/javascript">decorateGeneric($$('ul.products-grid'), ['odd','even','first','last'])</script>
  122. <?php endif; ?>
  123.  
  124. <div class="toolbar-bottom">
  125. <?php echo $this->getToolbarHtml() ?>
  126. </div>
  127. </div>
  128. <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement