$_helper = $this->helper('catalog/output');
$_productCollection = Mage::getResourceModel('reports/product_collection')
->addAttributeToSelect('*')
->setVisibility(array(2,3,4))
->setOrder('created_at', 'desc')
->setPageSize(10);
$count = $_productCollection->count();Şeklinde 10 adet ürünümü çağırıyorum. Bunları<div class="item active">
<?php foreach($_productCollection as $_product) : ?>
<?php $_wishlistSubmitUrl = $this->helper('wishlist')->getAddUrl($_product); $_compareUrl = $this->helper('catalog/product_compare')->getAddUrl($_product); ?>
<div class="lpitem">
<div class="prodimg">
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>">
<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>
</div>
<div class="prodtitle"><a href="<?php echo $_product->getProductUrl(); ?>"><?php echo substr($_product->getName(), 0,42); ?> ...</a></div>
<!-- <p><?php //echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?></p>-->
<div class="prodprice">
<div class="old">$ <?php echo rtrim($_product->getSpecialPrice(), "00"); ?></div>
<div class="new">$ <?php echo rtrim($_product->getPrice(), "00"); ?></div>
</div>
<div class="addtocart">
<a title="<?php echo $this->__('Add to Cart') ?>" class="btn btn-mycart btn-xs" href="<?php echo (string)Mage::helper('checkout/cart')->getAddUrl($_product);?>"><?php echo $this->__('Add to Cart') ?></a>
</div>
<div class="details">
<?php if ($this->helper('wishlist')->isAllow()) : ?>
<a title="Add to Wishlist" href="<?php echo $_wishlistSubmitUrl ?>" onclick="productAddToCartForm.submitLight(this, this.href); return false;" rel="tooltip">Wishlist</a>
<?php endif; ?> | <a title="Add to Compare" href="<?php echo $_compareUrl ?>" rel="tooltip">Compare</a>
</div>
</div>
<?php endforeach; ?>
</div>Şeklinde listeliyorum. Yapmak istediğim şey foreach dışındaki <div class="item active"></div> kısmını 2 ye çıkartmak ve ürünleri bunların içine bölmek. Yani olması gereken<div class="item active">1 den 5 e kadar ürün</div> <div class="item">5 ten 10 a kadar ürün.</div>
--R10.NET; Flood Engellendi -->-> Yeni yazılan mesaj 13:18:23 -->-> Daha önceki mesaj 11:46:30 --
Çözüldü arkadaşlar. http://stackoverflow.com/questions/2...09405#22709405