0

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

1

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.

  • Hi Marius, Thanks for the previous code but i cant seem to get it to work.. How would i add it it to the table? The way i was hoping was to have an image then the name followed by price and then it would repeat for each product on the grouped page. Im happy with CSS styling its just getting it to function. Thanks – Michael Jun 19 '15 at 19:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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