Ok, with the following code i show the product's images thru Lightbox and they are checked first.
So, if you didnt attach any images to the product, there will be no "image not found" message on Internet Exploder.
<!--show default image first, then others-->
<div class="product_image">
<?php $imagePath = $node->field_image_cache['0']['filepath']; ?>
<?php if (!$node->field_image_cache == NULL) { ?>
<a href="<?=base_path()?><?=$imagePath?>" rel="lightbox[prod]">
<img src="<?=base_path()?>files/imagecache/product/<?=$imagePath?>" alt="<?=$title?>" title="<?=$title?>" class="imagecache imagecache-product">
</a>
<?php } ?>
<?php if (count($node->field_image_cache) > 1) { ?>
<ul class="other_imgs" style="list-style-type:none; margin-top:10px; text-align:center;">
<?php foreach ($node->field_image_cache as $images) { if ($images['filepath'] != $imagePath) { ?>
<li style="display:inline; padding:0; margin-left:0;">
<a href="<?=base_path()?><?=$images['filepath']?>" rel="lightbox[prod]" title="<?=$title?>">
<img src="<?=base_path()?>files/imagecache/uc_thumbnail/<?=$images['filename']?>" alt="<?=$title?>" class="imagecache imagecache-uc_thumbnail">
</a>
</li>
<?php } } ?>
</ul>
<?php } ?>
</div>
<!--/show default image first, then others-->
This is working well afaik but I'm asking the PHP gurus to make any improvement possible.
The second part (the one that shows secondary images) was based on PlanBForOpenOffice's suggestion ( http://www.ubercart.org/forum/development/3868/nifty_products_tutorial_p... ). I'm not sure the checks are doing much... Can anyone confirm?
