castilho Posted November 17, 2012 Report Share Posted November 17, 2012 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 colunasse alguém puder me ajudar fico gratosegue 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ó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; ?> Quote Link to comment Share on other sites More sharing options...
0 ESerra Posted November 17, 2012 Report Share Posted November 17, 2012 Exemplo para entender a lógica:http://scriptbrasil.com.br/forum/index.php...1836&hl=3x3 Quote Link to comment Share on other sites More sharing options...
0 castilho Posted November 17, 2012 Author Report Share Posted November 17, 2012 sou iniciante.não entendi muito bem seu exemplose puder me ajudar a add algo ao meu códigoagradeço Quote Link to comment Share on other sites More sharing options...
0 ESerra Posted November 18, 2012 Report Share Posted November 18, 2012 Se não entendeu muito bem não tem problema, estude a lógica até entender... Quote Link to comment Share on other sites More sharing options...
Question
castilho
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
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.