Switch Product Image at top to small image instead

Instead of displaying the base image at the top of the product view page I would like to display the small image (not resized). I know it’s this line of text at template/catalog/product/fiew/media.phtml but not sure what to change (except remove the resize part).

Code:

<?php
         $_img = '<img id="image" src="'.$this->helper('catalog/image')->init($_product, 'image')->resize(200,150).'" alt="'.$this->htmlEscape($this->getImageLabel()).'" title="'.$this->htmlEscape($this->getImageLabel()).'" />';
        echo '<a title="'.$this->htmlEscape($this->getImageLabel()).'"  rel="ja-colorbox"  href="'.$this->helper('catalog/image')->init($_product, 'image').'" >'.$_helper->productAttribute($_product, $_img, 'image').'</a>';
    ?>

Thanks
Janice

2 answers

Profile photo of thangnn1510 0.00 $tone July 1, 2011
Public

Hi Janice!

I’m not clear in your question. You want to replace product image at top with small image. But what is small image you want to use to replace it with? Product image?

Please confirm me. Thank you.

#1
Profile photo of Janice W Davis 0.00 $tone July 1, 2011
Public

In the admin area catalog->product->images I have 3 images uploaded for each product. There are columns on that page identifing the images: Base, Small, & Thumbnail, with the checkbox activated for that type. Each of my images have one of the checkboxes selected. On the frontend product view page, the Base image is the one displayed at the top of the page. The other images have a resized image in the more view section. Instead of the base image being displayed at the top, I want the Small image to be displayed at the top.

I know I can just switch the checkbox and that would do it, but I don’t want to do that for alll the products, as well there are other image changes I want to do, and it makes more sense to switch the top from base to small.

#2

This question is now closed

Written By

Comments