Okay, had to force the javascript files to load for the plugin Product Image Zoom (http://www.zen-cart.com/downloads.php?do=file&id=1815) and it worked using the following code: Off to see about implementing product image zoom included with IH4 which now that I think about it probably was the initial intent/request. :)
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)); /* Begin add 1 of 2 by mc12345678 to support product image zoom */ if ($products_image != '') { if (function_exists('handle_image')) { $newimg = handle_image($products_image_large, addslashes($products_name), LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT, ''); list($src, $alt, $width, $height, $parameters) = $newimg; $products_image_large_test = zen_output_string($src); if (file_exists($products_image_large_test)) { $products_image_large = $products_image_large_test; } } } /* End add 1 of 2 by mc12345678 to support product image zoom 14-10-31*/ ?> <div id="productMainImage" class="centeredContent back"> <script language="javascript" type="text/javascript"><!-- document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . zen_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $_GET['products_id']) . '\\\')">' . zen_image(addslashes($products_image_medium), addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT,/* Begin add 2 of 2 by mc12345678 14-10-31*/ (file_exists($template->get_template_dir('loader_product_image_zoom.php',DIR_WS_TEMPLATE, 'auto_loaders','auto_loaders'). 'loader_product_image_zoom.php') ? 'data-zoom-image="' . $products_image_large . '"' : '') /* End add 2 of 2 by mc12345678 14-10-31*/) . '<br /><span class="imgLink">' . TEXT_CLICK_TO_ENLARGE . '</span></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>


Reply With Quote
