Created
October 3, 2012 13:51
-
-
Save deivisonarthur/3827015 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $_productCollection = $this->getLoadedProductCollection(); | |
| $_helper = $this->helper('catalog/output'); | |
| ?> | |
| <?php if(!$_productCollection->count()): ?> | |
| <p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p> | |
| <?php else: ?> | |
| <?php $mod = $this->getRequest()->getModuleName(); | |
| if($mod!='catalogsearch'): | |
| ?> | |
| <?php $featuredBool = Mage::getStoreConfig('dropshipper_options/featured_options/featured'); | |
| if($featuredBool==1): ?> | |
| <h2 class="featuredH">Featured Products in <em><?php echo Mage::registry('current_category')->getName(); ?></em><a href="javascript:void(0);" class="hide">Hide</a></h2> | |
| <ul class="featuredCat"> | |
| <?php $i=0; foreach ($_productCollection as $_product): ?> | |
| <?php $featured = Mage::getModel('catalog/product')->load($_product->getID())->getFeatured(); ?> | |
| <?php if($featured) : ?> | |
| <li class="item"> | |
| <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>" class="product-image"> | |
| <img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(150,150)->constrainOnly(TRUE)->keepAspectRatio(FALSE)->keepFrame(FALSE) ?>" width="150" height="150" alt="<?php echo $this->htmlEscape($_product->getName()) ?>" /></a> | |
| <h3 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>"> | |
| <?php if(strlen($this->htmlEscape($_product->getName())) > 80){ | |
| echo substr($this->htmlEscape($_product->getName(), 'name'),0,80).'...'; | |
| }else{ | |
| echo $_product->getName();} ?> </a></h3> | |
| <?php | |
| $cor = $_product->getColor(); | |
| if( $cor ){ | |
| echo "<label>Cor: ".$cor."</label><br />"; | |
| } | |
| ?> | |
| <?php echo $this->getPriceHtml($_product, true, '-new') ?> | |
| <?php | |
| $_coreHelper = $this->helper('core'); | |
| $_product->load( $_product->getId() ); | |
| $vezes = $_product->getResource()->getAttribute('parcelas')->getFrontend()->getValue( $_product ); | |
| if($vezes){ | |
| echo '<small class="parcelas2">Parcele em até '.$vezes.'x'; //Tirei - de '.$_coreHelper->currency( $_product->getFinalPrice()/$vezes, true, false ).' | |
| if( $_product->getAttributeText('unmedprod') == "m2" || $_product->getAttributeText('unmedprod') == "metro(s)" ){ | |
| echo '<br />caixa com '.$_product->getQntmedprod().' '.$_product->getAttributeText('unmedprod'); | |
| } | |
| echo '</small><br />'; | |
| }; | |
| ?> | |
| <?php if(($_product->special_price != null)): ?> | |
| <p class="promo">Promo</p> | |
| <?php endif; ?> | |
| <h3>Veja mais: <a href="<?php echo $this->getUrl('') ?>catalogsearch/result/?q=<?=$_product->getAttributeText('fornecedor')?>"><?=$_product->getAttributeText('fornecedor')?></a></h3> | |
| <div class="clear"></div> | |
| </li> | |
| <?php elseif($i==0): ?> | |
| <li class="noFeatured"><p>No featured Products!</p></li> | |
| <?php break; endif; ?> | |
| <?php $i++; | |
| $featuredAmt = Mage::getStoreConfig('dropshipper_options/featured_options/featured_num'); | |
| if(empty($featuredAmt) && $i==1){ | |
| break; | |
| }elseif(!empty($featuredAmt) && $i==$featuredAmt){ | |
| break; | |
| } | |
| endforeach; | |
| ?> | |
| </ul> | |
| <?php endif;endif; ?><?php //End Featured Products by Category ?> | |
| <div class="clear"></div> | |
| <a name="catList"></a> | |
| <div class="category-products"> | |
| <?php echo $this->getToolbarHtml() ?> | |
| <?php // List mode ?> | |
| <?php if($this->getMode()!='grid'): ?> | |
| <?php $_iterator = 0; ?> | |
| <ul class="products-list" id="products-list"> | |
| <?php foreach ($_productCollection as $_product): ?> | |
| <li class="item<?php if( ++$_iterator == sizeof($_productCollection) ): ?> last<?php endif; ?>"> | |
| <?php // Product Image ?> | |
| <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(150,150)->constrainOnly(TRUE)->keepAspectRatio(FALSE)->keepFrame(FALSE); ?>" width="150" height="150" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a> | |
| <?php // Product description ?> | |
| <div class="product-shop"> | |
| <div class="listDetails"> | |
| <?php $_productNameStripped = $this->stripTags($_product->getName(), null, true); ?> | |
| <h3 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped; ?>"><?php echo $_helper->productAttribute($_product, $_product->getName() , 'name'); ?></a></h3> | |
| <?php if($_product->getRatingSummary()): ?> | |
| <?php echo $this->getReviewsSummaryHtml($_product) ?> | |
| <?php endif; ?> | |
| <div class="desc std"> | |
| <?php //echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?> | |
| <?php | |
| $cor = $_product->getColor(); | |
| if( $cor ){ | |
| echo "<label>Cor: ".$cor."</label><br />"; | |
| } | |
| $_product5= Mage::getModel('catalog/product')->load($_product->getId()); | |
| $unvendprod = $_product5->getAttributeText(unvendprod); | |
| $qntmedprod = $_product5->getQntmedprod(); | |
| $unmedprod = $_product5->getAttributeText(unmedprod); | |
| if( $unvendprod ){ | |
| echo "<label>Quantidade por ".$unvendprod." : ".$qntmedprod." ".$unmedprod."</label><br />"; | |
| } | |
| echo "<label>Fornecedor: ".$_product5->getAttributeText('fornecedor')."</label><br />"; | |
| ?> | |
| <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a> | |
| </div> | |
| <h3>Veja mais: <a href="http://shop.pisosecarpetes.srv.br/catalogsearch/result/?q=<?=$_product5->getAttributeText('fornecedor')?>"><?=$_product5->getAttributeText('fornecedor')?></a></h3> | |
| </div><!-- listDetails --> | |
| <div class="listAdd"> | |
| <?php echo $this->getPriceHtml($_product, true) ?> | |
| <?php | |
| $_coreHelper = $this->helper('core'); | |
| $_product->load( $_product->getId() ); | |
| $vezes = $_product->getResource()->getAttribute('parcelas')->getFrontend()->getValue( $_product ); | |
| if($vezes){ | |
| echo '<small class="parcelas2">Parcele em até '.$vezes.'x de '.$_coreHelper->currency( $_product->getFinalPrice()/$vezes, true, false ).'</small><br /><br />'; | |
| }; | |
| ?> | |
| <?php if($_product->isSaleable()): ?> | |
| <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><?php echo $this->__('Add to Cart') ?></span></button> | |
| <?php else: ?> | |
| <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p> | |
| <?php endif; ?> | |
| <ul class="add-to-links"> | |
| <?php if ($this->helper('wishlist')->isAllow()) : ?> | |
| <li><a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li> | |
| <?php endif; ?> | |
| <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?> | |
| <li><a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li> | |
| <?php endif; ?> | |
| </ul> | |
| </div> | |
| <div class="clear"></div> | |
| </div> | |
| <?php if(($_product->special_price != null)): ?> | |
| <p class="promo">Promo!</p> | |
| <?php endif; ?> | |
| </li> | |
| <?php endforeach; ?> | |
| <div class="clear"></div> | |
| </ul> | |
| <?php else: ?> | |
| <?php // Grid Mode ?> | |
| <?php $_collectionSize = $_productCollection->count() ?> | |
| <?php $_columnCount = $this->getColumnCount(); ?> | |
| <ul class="products-grid"> | |
| <?php $i=0; foreach ($_productCollection as $_product): ?> | |
| <?php if ($i++%$_columnCount==0): ?> | |
| <?php endif ?> | |
| <li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>"> | |
| <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>" class="product-image"> | |
| <img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(150,150)->constrainOnly(TRUE)->keepAspectRatio(FALSE)->keepFrame(FALSE) ?>" width="150" height="150" alt="<?php echo $this->htmlEscape($_product->getName()) ?>" /></a> | |
| <h3 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>"> | |
| <?php if(strlen($this->htmlEscape($_product->getName())) > 80){ | |
| echo substr($this->htmlEscape($_product->getName(), 'name'),0,80).'...'; | |
| }else{ | |
| echo $_product->getName();} ?> </a></h3> | |
| <?php | |
| $cor = $_product->getColor(); | |
| if( $cor ){ | |
| echo "<label>Cor: ".$cor."</label><br />"; | |
| } | |
| ?> | |
| <?php echo $this->getPriceHtml($_product, true, '-new') ?> | |
| <?php | |
| $_coreHelper = $this->helper('core'); | |
| $_product->load( $_product->getId() ); | |
| $vezes = $_product->getResource()->getAttribute('parcelas')->getFrontend()->getValue( $_product ); | |
| if($vezes){ | |
| echo '<small class="parcelas2">Parcele em até '.$vezes.'x'; //Tirei - de '.$_coreHelper->currency( $_product->getFinalPrice()/$vezes, true, false ).' | |
| if( $_product->getAttributeText('unmedprod') == "m2" || $_product->getAttributeText('unmedprod') == "metro(s)" ){ | |
| echo '<br />caixa com '.$_product->getQntmedprod().' '.$_product->getAttributeText('unmedprod'); | |
| } | |
| echo '</small><br />'; | |
| }; | |
| ?> | |
| <?php if(($_product->special_price != null)): ?> | |
| <p class="promo">Promo</p> | |
| <?php endif; ?> | |
| <h3>Veja mais: <a href="<?php echo $this->getUrl('') ?>catalogsearch/result/?q=<?=$_product->getAttributeText('fornecedor')?>"><?=$_product->getAttributeText('fornecedor')?></a></h3> | |
| <div class="clear"></div> | |
| </li> | |
| <?php endforeach ?> | |
| </ul> | |
| <?php endif; ?> | |
| </div> | |
| <?php endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment