ok its close..
this seems to work, but my end seems a bit intermittent.. not sure if its a caching issue or if there is conflicting java, but having no expreience with java I cant diagnose..
perhaps you guys can play with it and let me know what results you see..
so, as a test replace your
includes/templates/YOUR_TEMPLATE/templates/tpl_modules_main_product_image.php with this code:
PHP Code:
<?php
/**
* Module Template
*
* @package templateSystem
* @copyright Copyright 2003-2011 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: tpl_modules_main_product_image.php 18698 2011-05-04 14:50:06Z wilt $
*/
?>
<?php require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_MAIN_PRODUCT_IMAGE)); ?>
<div id="productMainImage" class="centeredContent back">
<?php
$iwidth = MEDIUM_IMAGE_WIDTH . 'px';
$iheight = MEDIUM_IMAGE_HEIGHT . 'px';
?>
<script language="javascript" type="text/javascript"><!--
function func (img) {
img.style.height = "<?php echo $iwidth ?>";
img.style.width = "<?php echo $iheight ?>";
}
document.write('<?php echo '<a href="' . $products_image_large . '" class="bonzer_zoom" rel="product_info"><img src="' . $products_image_medium . '" onload="func(this);" /></a>' ?>');
//--></script>
<noscript>
<?php
echo '<a href="' . zen_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $_GET['products_id']) . '" target="_blank">' . zen_image($products_image_medium, $products_name, MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT) . '<br /><span class="imgLink">' . TEXT_CLICK_TO_ENLARGE . '</span></a>';
?>
</noscript>
</div>