Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

make every cagegory view from 3 product to 4 in collumm
 
return
Jr. Member
 
Total Posts:  25
Joined:  2010-03-22
 

<?php
/**
 * Product list template
 *
 * @see Mage_Catalog_Block_Product_List
 */
?>
<?php $_productCollection
=$this->getLoadedProductCollection() ?>
<?php 
if(!$_productCollection->count()): ?>
<div class="note-msg">
    
<?php echo $this->__('There are no products matching the selection.'?>
</div>
<?php else: ?>

<?php 
echo $this->getToolbarHtml() ?>
<?php 
// List mode ?>
<?php if($this->getMode()!='grid'): ?>
<?php $_iterator 
0?>
<div class="listing-type-list catalog-listing">
<?php foreach ($_productCollection as $_product): ?>
    
<div class="listing-item<?php if( ++$_iterator == sizeof($_productCollection) ): ?> last<?php endif; ?>">
        
<?php // Product Image ?>
        
<div class="product-image">
            <
a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getSmallImageLabel()) ?>">
                <
img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135, 135); ?>" width="135" height="135" alt="<?php echo $this->htmlEscape($this->getImageLabel($_product, 'small_image')) ?>" title="<?php echo $this->htmlEscape($this->getImageLabel($_product, 'small_image')) ?>" />
            </
a>
        </
div>

        
<?php // Product description ?>
        
<div class="product-shop">
            <
h5><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>"><?php echo $this->htmlEscape($_product->getName())?></a></h5>           <?php echo $this->getPriceHtml($_producttrue?>
            <?php 
if($_product->isSaleable()): ?>
            
<button class="form-button" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><?php echo $this->__('Add to Cart'?></span></button>
            
<?php else: ?>
            
<div class="out-of-stock"><?php echo $this->__('Out of stock'?></div>
            
<?php endif; ?>
            
<div class="clear"></div>
            <
div class="description">
                
<?php echo nl2br($_product->getShortDescription()) ?>
                
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>"><small><?php echo $this->__('Learn More'?></small></a>
            </
div>
            <
class="add-to">
                
<?php if ($this->helper('wishlist')->isAllow()) : ?>
                
<a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-cart"><?php echo $this->__('Add to Wishlist'?></a>
                
<?php endif; ?>
                <?php 
if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
                
<span class="pipe">|</span>
                <
a href="<?php echo $_compareUrl ?>"><?php echo $this->__('Add to Compare'?></a>
                
<?php endif; ?>
            
</p>
        </
div>
    </
div>
<?php endforeach; ?>
</div>

<?php else: ?>

<?php 
// Grid Mode ?>
<div class="listing-type-grid catalog-listing">
<?php $_collectionSize $_productCollection->count() ?>
    <?php $_columnCount 
$this->getColumnCount(); ?>
    <?php $i
=0; foreach ($_productCollection as $_product): ?>
        <?php 
if($i++%$_columnCount==0): ?>
        
<ol class="grid-row">
        
<?php endif; ?>
            
<li class="item">
                <
class="product-image">
                    <
a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($this->getImageLabel($_product, 'small_image')) ?>">
                        <
img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135, 135); ?>" width="135" height="135" alt="<?php echo $this->htmlEscape($this->getImageLabel($_product, 'small_image')) ?>" title="<?php echo $this->htmlEscape($this->getImageLabel($_product, 'small_image')) ?>" />
                    </
a>
                </
p>
                <
h5><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>"><?php echo $this->htmlEscape($_product->getName()) ?></a></h5>
                             
<?php echo $this->getPriceHtml($_producttrue?>
                <?php 
if($_product->isSaleable()): ?>
                    
<button type="button" class="form-button" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><?php echo $this->__('Add to Cart'?></span></button>
                
<?php else: ?>
                
<div class="out-of-stock"><?php echo $this->__('Out of stock'?></div>
                
<?php endif; ?>
                
<class="add-to">
                    
<?php if ($this->helper('wishlist')->isAllow()) : ?>
                    
<a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-cart"><?php echo $this->__('Add to Wishlist'?></a>
                    
<?php endif; ?>
                     
</p>
            </
li>
        
<?php if($i%$_columnCount==|| $i==$_collectionSize): ?>
        
</ol>
        
<?php endif; ?>
    <?php 
endforeach ?>
    
<script type="text/javascript">decorateGeneric($$('.grid-row'), ['last''odd''even']);</script>
</div>
<?php endif; ?>
<?php 
echo $this->getToolbarHtml() ?>
<?php 
endif; ?>

you can see the problem here:
http://www.gadgets4u.co.il/shop/computers.html

10$ reward for the helper! in promiss!

 
Magento Community Magento Community
Magento Community
Magento Community
 
return
Jr. Member
 
Total Posts:  25
Joined:  2010-03-22
 
return - 31 May 2010 08:51 AM

<?php
/**
 * Product list template
 *
 * @see Mage_Catalog_Block_Product_List
 */
?>
<?php $_productCollection
=$this->getLoadedProductCollection() ?>
<?php 
if(!$_productCollection->count()): ?>
<div class="note-msg">
    
<?php echo $this->__('There are no products matching the selection.'?>
</div>
<?php else: ?>

<?php 
echo $this->getToolbarHtml() ?>
<?php 
// List mode ?>
<?php if($this->getMode()!='grid'): ?>
<?php $_iterator 
0?>
<div class="listing-type-list catalog-listing">
<?php foreach ($_productCollection as $_product): ?>
    
<div class="listing-item<?php if( ++$_iterator == sizeof($_productCollection) ): ?> last<?php endif; ?>">
        
<?php // Product Image ?>
        
<div class="product-image">
            <
a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getSmallImageLabel()) ?>">
                <
img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135, 135); ?>" width="135" height="135" alt="<?php echo $this->htmlEscape($this->getImageLabel($_product, 'small_image')) ?>" title="<?php echo $this->htmlEscape($this->getImageLabel($_product, 'small_image')) ?>" />
            </
a>
        </
div>

        
<?php // Product description ?>
        
<div class="product-shop">
            <
h5><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>"><?php echo $this->htmlEscape($_product->getName())?></a></h5>           <?php echo $this->getPriceHtml($_producttrue?>
            <?php 
if($_product->isSaleable()): ?>
            
<button class="form-button" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><?php echo $this->__('Add to Cart'?></span></button>
            
<?php else: ?>
            
<div class="out-of-stock"><?php echo $this->__('Out of stock'?></div>
            
<?php endif; ?>
            
<div class="clear"></div>
            <
div class="description">
                
<?php echo nl2br($_product->getShortDescription()) ?>
                
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>"><small><?php echo $this->__('Learn More'?></small></a>
            </
div>
            <
class="add-to">
                
<?php if ($this->helper('wishlist')->isAllow()) : ?>
                
<a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-cart"><?php echo $this->__('Add to Wishlist'?></a>
                
<?php endif; ?>
                <?php 
if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
                
<span class="pipe">|</span>
                <
a href="<?php echo $_compareUrl ?>"><?php echo $this->__('Add to Compare'?></a>
                
<?php endif; ?>
            
</p>
        </
div>
    </
div>
<?php endforeach; ?>
</div>

<?php else: ?>

<?php 
// Grid Mode ?>
<div class="listing-type-grid catalog-listing">
<?php $_collectionSize $_productCollection->count() ?>
    <?php $_columnCount 
$this->getColumnCount(); ?>
    <?php $i
=0; foreach ($_productCollection as $_product): ?>
        <?php 
if($i++%$_columnCount==0): ?>
        
<ol class="grid-row">
        
<?php endif; ?>
            
<li class="item">
                <
class="product-image">
                    <
a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($this->getImageLabel($_product, 'small_image')) ?>">
                        <
img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135, 135); ?>" width="135" height="135" alt="<?php echo $this->htmlEscape($this->getImageLabel($_product, 'small_image')) ?>" title="<?php echo $this->htmlEscape($this->getImageLabel($_product, 'small_image')) ?>" />
                    </
a>
                </
p>
                <
h5><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>"><?php echo $this->htmlEscape($_product->getName()) ?></a></h5>
                             
<?php echo $this->getPriceHtml($_producttrue?>
                <?php 
if($_product->isSaleable()): ?>
                    
<button type="button" class="form-button" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><span><?php echo $this->__('Add to Cart'?></span></button>
                
<?php else: ?>
                
<div class="out-of-stock"><?php echo $this->__('Out of stock'?></div>
                
<?php endif; ?>
                
<class="add-to">
                    
<?php if ($this->helper('wishlist')->isAllow()) : ?>
                    
<a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" class="link-cart"><?php echo $this->__('Add to Wishlist'?></a>
                    
<?php endif; ?>
                     
</p>
            </
li>
        
<?php if($i%$_columnCount==|| $i==$_collectionSize): ?>
        
</ol>
        
<?php endif; ?>
    <?php 
endforeach ?>
    
<script type="text/javascript">decorateGeneric($$('.grid-row'), ['last''odd''even']);</script>
</div>
<?php endif; ?>
<?php 
echo $this->getToolbarHtml() ?>
<?php 
endif; ?>

you can see the problem here:
http://www.gadgets4u.co.il/shop/computers.html

10$ reward for the helper! in promiss!
 
Magento Community Magento Community
Magento Community
Magento Community
 
dlj32
Jr. Member
 
Total Posts:  17
Joined:  2010-02-21
 

I had a very similar problem with the same theme (when I was using it) in 3 columns.
Not a particularly helpful answer in your case, but my advice would be to get a different theme. I had issues with that one - what version of Magento are you using?

 
Magento Community Magento Community
Magento Community
Magento Community
 
dlj32
Jr. Member
 
Total Posts:  17
Joined:  2010-02-21
 

For the record, I don’t think it was a PHTML template issue anyway, i’m pretty sure it was somewhere within the CSS.

 
Magento Community Magento Community
Magento Community
Magento Community
 
return
Jr. Member
 
Total Posts:  25
Joined:  2010-03-22
 

it’s the HTML + CSS together for sure. i’v done it in the home page you can see.. perfect!
just in the category i need/

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top