Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email

Magento Forum

Get All Product Images in list.phtml
Jr. Member
Total Posts:  13
Joined:  2008-12-15

in list.phtml I need to show all images of each product and not only the small_image.

Like in media.phtml I find the image gallery with this code:

<?php foreach ($this->getGalleryImages() as $_image): ?>
a href="#" onclick="popWin('<?php echo $this->getGalleryUrl($_image) ?>', 'gallery', 'width=300,height=300,left=50,top=50,location=no,status=yes,scrollbars=yes,resizable=yes'); return false;"><img src="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $_image->getFile())->resize(206); ?>" alt="<?php echo $this->htmlEscape($_image->getLabel()) ?>" title="<?php echo $this->htmlEscape($_image->getLabel()) ?>" /></a>
<?php endforeach; ?>

I’d like to replicate the same situation also in list.phtml but when I insert this statement:

<?php $itemImages $_product->getMediaGalleryImages(); ?>
I obtain null.
If I insert after this ....
]<?php echo count($itemImages); ?> [/codeI obtain 0.
May you help me to find a solution?
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top