Hi Karudi,
Firstly your code has some redundant checks...
<?php
if (!empty($product->images) and count ($product->images)>0) {
<-- CHECKS TO MAKE SURE THE ARRAY IS SET AND COUNT IS GREATER THAN 1... NOT REQUIRED AS THE ARRAY WILL ALWAYS BE SET AND CONTAIN AN IMAGE... YES EVEN THE "NO IMAGE" PLACEHOLDER IMAGE IF NONE IS DEFINED // List all Images
if (count($product->images) > 0) {
<-- RECHECKS THAT THE ARRAY COUNT IS GREATER THAN 1... AGAIN! 
foreach ($product->images as $image)
{
echo '<div class="floatleft">' . $image->displayMediaThumb('class="product-image"', true, 'class="modal"', true, true) . '</div>'; //'class="modal"'
<-- USELESS COMMENT }
}
}
?>
// List all Images
foreach ($product->images as $image)
{
echo '<div class="floatleft">' . $image->displayMediaThumb('class="product-image"', true, 'class="modal"', true, true) . '</div>';
}
The above code should now work... if the array returned MORE THAN 1 IMAGE...
Change "
/components/com_virtuemart/views/category/view.html.php" @ line 171.
// Load the products in the given category
$products = $productModel->getProductsInCategory($categoryId);
$productModel->addImages($products,1);
$this->assignRef('products', $products);
change this line:
$productModel->addImages($products
,1);
to
$productModel->addImages($products);
to output all images for each product to the product array.
SAVE. REFRESH. YAY!!!