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)
Bookmarks