2

I have a challange: I have two kinds of product images: 140x140 (without watermark) and 600x600 (with watermark). I need show up the products with the thumbnails (140x140) on catalag page and when the product page is open, finally shows the big images with watermarks (this one I don't matter wich size should be).

Does anyone know where should I change it?

Thanks in advanced!

2 Answers 2

5

For product images it is in the template file: app/design/frontend/base/default/template/catalog/product/view/media.phtml

Look out for

$this->helper('catalog/image')->init($_product, 'image')->resize(265)

For listing pages it's in app/design/frontend/base/default/template/catalog/product/list.phtml

Look out for

$this->helper('catalog/image')->init($_product, 'small_image')->resize(135)

If you have your own theme then substitute paths as required. Magento handles the resize for you, just change the size. Or if you have different images for thumbnails and want to show them as the thumbnail instead of the main product image, ensure you set them to be the small image in the admin on the product image uploader. Notice on the catalog listing code you pass in small_image as a parameter.

1
  • thanks, I changed it. Now just another question. Do you know how can I change to hide small and thumbnails images from the product page? Sep 29, 2013 at 1:09
2

This doesn't work if your theme's CSS overrides the phtml file, as was the case for me. I was using Magento's default theme and had to modify the values of .product-view .product-img-box .product-image-zoom in styles.css to enlarge the image. Hope this helps someone else.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.