We have expanded the slider of the main page for the client so that they can place products in this space.
As part of this, there are three image slots where we want to get the main image of the product, and then two images from the media gallery (ideally random, but not the end of the world, if by ID).
To get a better understanding, see the screenshot of what we have: -

We create an assembly for this module using the following: -
$featured_products = Mage::getModel('catalog/product') ->getCollection() ->addAttributeToSelect('*') ->AddAttributeToFilter('featured', array('eq' => 1));
Getting the main product image without problems, this works great with the following: -
<img class="gallery" src="<?php echo $this->helper('catalog/image')->init($product, 'small_image')->resize(225); ?>" alt="<?php echo $this->stripTags($this->getImageLabel($product, 'small_image'), null, true) ?>" />
And it's simple enough to make all three image slots use this main image, as shown in the image above.
When we try to call getGalleryImages, it always returns NULL (example, for example): -
<?php if (count($this->getGalleryImages()) > 0): ?> <?php foreach ($this->getGalleryImages() as $_image): ?> <img class="gallery" src="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $_image->getFile())->resize(100); ?>" width="100" height="100" alt="<?php echo $this->htmlEscape($_image->getLabel()) ?>" /> <?php endforeach; ?> <?php endif; ?>
Please, someone can advise the best approach to bring up gallery images on the main page. Is there something we can include in the assembly, or do we need to add an observer.
Thanks in advance.