OK, I think I have a solution for the problem where the browser displays the image in a new window, instead of displaying it with the Lightbox functionality. This can happen on a slow or loaded internet connection and the user clicks on the image before the page has completely loaded.
What I did was to manually call the Lightbox init function once the last anchor tag was loaded. This call was insert after the product description. I created an the override tpl_product_info_display.php and inserted the following code directly after the line '<!--eof Product description -->' (line 128 on my system);
PHP Code:
<script language="javascript" type="text/javascript"><!--
initLightbox();
//--></script>
I then removed the loading of lightbox_lightningload.js in product_info/jscript_zen_lightbox.php Just deleted the following line;
PHP Code:
echo '<script type="text/javascript" src="' . $template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'jscript') . '/lightbox_lightningload.js"></script>
Since I only use Lightbox in the product details page, I've left all other references the same. It now works a dream (even on a 56kb dialup connection).
Bookmarks