Hello. I have zen cart v1.5.5.f installed on my site. I've also installed a Theme Monster template, theme688. In addition to all of this I've installed Stock_By_Attributes (SBA), the Combined Master version that should work all they way up to ZC 1.5.5. Everything works fine until I get to the Products Info page. It's there I click on the image to show a larger image and a popup appears, but no image.
I've also got a zen cart install similar to the above EXCEPT I didn't install SBA. On this version it works fine.
The problem appears to be in tpl_modules_main_product_image.php file. Here is the code for the nonworking file:
<?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 $
*
* Updated for Stock by Attributes 1.5.3.1
*/
?>
<?php require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_MAIN_PRODUCT_IMAGE)); ?>
<div id="productMainImage" class="centeredContent back">
<script language="javascript" type="text/javascript"><!--
document.write('<?php echo '<a href="javascriptopupWindow(\\\'' . 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,'id="SBA_ProductImage"') . '<br /><span class="imgLink">' . TEXT_CLICK_TO_ENLARGE . '<\/span><\/a>'; ?>');
//--></script>
<noscript>
<?php
echo '<a href="' . zen_href_link($products_image_large, . '' . 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>
I've compared this code to the file that works on the non_SBA version, which uses a simple <href> link versus a javascript popup window here. I'm certain based on my own tests, the problem is in the DOCUMENT.WRITE line of code. However, I'm lost from there on. Help!
Thanks in advance.
P.S. I've also, as a test, removed what looks like html comment tags from that particular line...no difference.
P.S.S my test zen cart site is at: yarndogPress.com/zencartTest
Bookmarks