Jump to content
Fórum Script Brasil
  • 0

Grid de Produtos


castilho
 Share

Question

olá

meu gride de produtos novos em minha loja mostra uma tabela com 1 linha e varias colunas.

estou tentando faz tempo colocar para aparecer 5 linhas e cada uma com 3 colunas

se alguém puder me ajudar fico grato

segue o código

<?php
$show_title = $this->getData('show_title');
$show_title = !is_null($show_title) && $show_title != 'false' && $show_title != 'no' && $show_title != 0;
$show_addtolinks = $this->getData('show_addtolinks');
$show_addtolinks = !is_null($show_addtolinks) && $show_addtolinks != 'false' && $show_addtolinks != 'no' && $show_addtolinks != 0;
$image = new EM_Em0023settings_Em0023settings();
$w = $image->get_widget_width();
$h = $image->get_widget_height();
$bg = $image->get_widget_bgcolor(); 
?>
<?php if (($_products = $this->getProductCollection()) && $_products->getSize()): ?>
<div class="widget widget-new-products">
    <ul class="products-grid">
        <?php $i=0; foreach ($_products->getItems() as $_product): ?>
        <li class="item">
        <span>
           <div class="img_product" style="background-color:<?php echo $bg?>">
                    <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img style="background-color:<?php echo $bg; ?>" src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize($w,$h); ?>" width="<?php echo $w ?>" height="<?php echo $h ?>" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
                    
                     <div class="actions">
                        <?php if ($_product->isSaleable()): ?>
                            <button type="button" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><span><?php echo $this->__('detalhes') ?></span></span></button>
                        <?php else: ?>
                            <p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
                        <?php endif; ?>
                        
                        <?php //echo $this->getReviewsSummaryHtml($_product, 'short') ?>
                    </div>
            </div>
            <?php echo $this->getReviewsSummaryHtml($_product, false, true)?>
            <h3 class="product-name"><a href="<?php echo $_product->getProductUrl() ?>"><?php echo $this->helper('catalog/output')->productAttribute($_product, $_product->getName() , 'name') ?></a></h3>
            <ul class="cod-nov">c&oacute;d: <?php echo $_product->getSku();?></ul>
            <ul class="ul-alinh"><?php echo $this->getPriceHtml($_product, true, '-widget-new-grid') ?></ul>
           </span>        
        </li>
        <?php endforeach; ?>
    </ul>
 </div>
<?php endif; ?>

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Forum Statistics

    • Total Topics
      150.2k
    • Total Posts
      647.4k
×
×
  • Create New...