Kaiser
Kaiser

Reputation: 53

Magento 1.9.0.1 Image Size

I am using Magento 1.9.0.1.

When I go on a Category to view the products, All products are shown in square boxes. As my images are rectangle, I can see the white space on left and right sides of the images.

Please advise how to edit the code so that images are shown rectangle shape (hight:300px width:200px).

Thanks

Upvotes: 1

Views: 9673

Answers (2)

Lalit Kaushik
Lalit Kaushik

Reputation: 1062

Use this code for product images in list.phtml file(app/design/frontend/[current package]/[current theme]/template/catalog/product/list.phtml)

<img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->keepFrame(false)->resize($width, $height); ?>

Hope this helps! Thanks.

Upvotes: 3

MagePal Extensions
MagePal Extensions

Reputation: 17656

Take a look @

/app/design/frontend/default/{theme}/template/catalog/product/list.phtml

Change resize(width, height)

<img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(158, 150); ?>

Upvotes: 4

Related Questions