Quote Originally Posted by DivaVocals View Post
and here is the corrected class code.. Tested this and it works perfectly..


Code:
<?php
/**
 * Zen Lightbox
 *
 * @author Alex Clarke ([email protected])
 * @copyright Copyright 2003-2005 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: autoload_default.php 2008-12-09 aclarke $
 */
?>

jQuery(function($) {
        $("a[rel^='lightbox']").slimbox({<?php require_once(DIR_FS_CATALOG . DIR_WS_CLASSES . 'zen_lightbox/options.php'); ?>}, function(el) 
        {
                return [el.href, el.title /* + '<br /><a href="' + el.href + '">Download this image</a>'*/];
        }, function(el) {
    $("#productMainImageReview a").removeAttr("rel");
                return (this == el) || ((this.rel.length > 8) && (this.rel == el.rel));
        });
        <?php if (ZEN_LIGHTBOX_CLOSE_IMAGE == 'true' || ZEN_LIGHTBOX_PREV_NEXT == 'true') { echo ("$('#lbPrevLink').addClass('prevNoHover'); $('#lbNextLink').addClass('nextNoHover');");}?>
});
//--></script>
What this change does:
IF you are using TPP and have the reviews tab turned on, this will prevent the reviews page default image from treated like an additional product image and being grouped in with the rest of your product images in the lightbox.

The issue is MUCH MORE obvious when you have a main product image and no additional images.. Because the reviews page image is being treated as an additional image, the net effect is that the lightbox will show 1 of 2 images. (the "second" image being the product reviews page image)
Sadly there's an addendum to this... so while YES this code stops ZLB from treating the image on the "read reviews" and "write reviews" pages as an additional images so they are no longer in the lightbox on the product info page, it appear to BREAK the lightbox function on the "read reviews" and "write reviews" pages. In fact with this code in place the image on the "read reviews" and "write reviews" pages doesn't even open up in a standard Zen Cart popup window. Will need to do a bit more testing..