Magento – Add Image Thumbnail Next to Product Name on Grouped Products

grouped-productsmagento-1.7magento-1.8magento-1.9product-images

Is it possible to add a thumbnail version of the product image next to the product name on grouped products in magento?

We have a list of products and as the base grouped layout it can be a little confusing to which image matches which product. If we can somehow add the image of that product as a thumbnail next to the name on grouped products that would be awesome

Best Answer

The template used to render the associated products of a grouped product is catalog/product/view/type/grouped.phtml.

This line prints the product name

<td><?php echo $this->escapeHtml($_item->getName()) ?></td> 

You can get the simple product thumbnail like this;

$url = Mage::helper('catalog/image')->init($_item, 'thumbnail')->resize(100, 100)->__toString()

You can change the resize params or remove the resize completely.
You can put these hints together and arrange the page elements as you need.

Related Topic