
Originally Posted by
customk1
phillip,
you're still making it too complicated! :)
i think you're getting confused by trying to combine directions from the perfect popup website, and zencart.
just follow my directions that i posted as my last post, namely:
1. DONT put the files in your "main_page" folder, follow the zencart directions here:
which means, change the two file names from:
add-event.js
popup.js
to:
jscript_add-event.js
jscript_popup.js
and add them to your "includes/templates/{template_directory}/jscript/ " folder
2. DONT use this on any page: (delete it!)
it is not needed!
3. what you wrote as code for the actual link should be correct! just need to put the jscript files in the correct location, and disregard the code you put at the top of the page.
let me know how it goes!
This is all correct... but you must also add a custom "tpl_modules_main_product_image.php" file in your custom template directory, so that the anchor link for the product image generates the popup.
Replace the following line:
Code:
document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . zen_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $_GET['products_id']) . '\\\')">' . zen_image($products_image_medium, addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT) . '<br /><span class="imgLink">' . TEXT_CLICK_TO_ENLARGE . '</span></a>'; ?>');
with this line:
Code:
document.write('<?php echo '<a href="' . zen_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $_GET['products_id']) . '" rel="popup">' . zen_image($products_image_medium, addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT) . '<br /><span class="imgLink">' . TEXT_CLICK_TO_ENLARGE . '</span></a>'; ?>');
you may also fix the anchor link between the <noscript> tags, just add rel="popup" after target="_blank".