Monday, February 4, 2013

Magento How to resize product thumbnail Size in magento

Dear ,

Stap :1
Go to this location 

\design\frontend\default\ them name /template/catalog/product/list.phtml
  
and find this code 

 php 

    $_columnCount = $this->getColumnCount(); 

    if($_columnCount == 4){
        $imgSize = 155;
    }elseif($_columnCount == 3){
        $imgSize = 245;
    }

?>

 And replace with this code according your them image size Width and height :

php 
  $_columnCount = $this->getColumnCount(); 
  if( $_columnCount == 4 ) {
    $imgSizeWidth = 200;
    $imgSizeHeight = 300;
  } elseif( $_columnCount == 3 ) {
    $imgSizeWidth = 500;
    $imgSizeHeight = 800;
  }
?>

Stap :2
 Find this code on current page 

 helper('catalog/image')->init($_product, 'small_image')->keepFrame(true)->resize( $imgSize); ?>" alt="stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /> 
 Or find only resize( $imgSize)
 And replace With 
helper('catalog/image')->init($_product, 'small_image')->keepFrame(true)->resize( $imgSizeWidth, $imgSizeHeight ); ?>" alt="stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />

 Or Only With resize( $imgSizeWidth, $imgSizeHeight )
Thanks:)