Magento 1.7 – Changing the Size of the Catalog Image ‘small_image’

magento-1.7template

I want to change the size of the catalog image "small_image" in mytemplate/template/catalog/product/list.phtml

But it doesn´t work.

So i killed the code of list.phtml from my template and the base folder, but nothing happen.

If I kill the php script or the xml line in catalog.xml, the catalog is empty. Work!

When I kill these two list.phtml files, why the catalog is still working. Which file do I need to edit? Which files create the productlist of the catalog too?

Best Answer

As Amit suggest you have to enable your template hints in admin under configuration->system->developer to see which template is used. It's possible that other plug-in overrides thruh xml the default list.phtml template. After you check that you should be able to see your edit.

For resizing the catalog images you could use different parameters. You can resize an image with the resize function:

<?php echo $this->helper('catalog/image')
        ->init($_product, 'small_image')->resize(135); ?>

This would give you an image with the dimensions 135x135px. There are more parameters, like:

<?php
echo  $this->helper('catalog/image')->init($_product, 'small_image')
        ->constrainOnly(false)
        ->keepAspectRatio(true)
        ->keepFrame(true)
        ->keepTransparency(true)
        ->backgroundColor(array(255,255,255))
        ->resize(135, 135);

?>

for more info check this post

cheers