How do you prevent the 'larger image' javascript from appearing under Additional Images? I'm assuming this will be a template override, but I cannot find the correct file to alter.
thanks,
S.
How do you prevent the 'larger image' javascript from appearing under Additional Images? I'm assuming this will be a template override, but I cannot find the correct file to alter.
thanks,
S.
I'm trying to interpret what you're asking.
Are you asking to remove javascript and all the popup support, or to remove the text which says "larger image"?
Normally, the image is clickable to show a larger version via popup.
The "larger image" text below it is part of that link.
There are a few options, depending on your goal:
1. The easiest is to simply remove the words "larger image":
- edit includes/languages/YOURTEMPLATE/english.php and changetoPHP Code:
define('TEXT_CLICK_TO_ENLARGE','larger image');
2. If you don't want the image to be a clickable link either, you could do this instead:PHP Code:
define('TEXT_CLICK_TO_ENLARGE','');
- edit includes/templates/YOURTEMPLATE/templates/tpl_modules_main_product_image.php and changetoPHP Code:
<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($products_image_medium, addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT) . '<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>PHP Code:
<div id="productMainImage" class="centeredContent back">
<?php echo zen_image($products_image_medium, $products_name, MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT); ?>
</div>
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Thank you for responding. Yes, that works to remove the text 'larger image' and javascript from the Main Product Image.
I'm also interested in removing the 'larger image' text and javascript from the Additional Images that appear under the Main Product Image. For instance, if you are displaying multiple images for a product and do not want any of these to open in a new pop up window.
I got this to work by tweaking the file modules/additonal_images.php. However, I've had great success with Zen Cart by NOT modifying any files except those suggested in creating a new template and by adjusting settings through admin.
Here is the test page.
If you have any suggestions on how to do this without modifying a .php file or a better way to do it, It'd be much appreciated.
Here is the alteration I made:
// Link Preparation:
CHANGED THIS:
/*
$script_link = '<script language="javascript" type="text/javascript"><!--' . "\n" . 'document.write(\'' . ($flag_display_large ? '<a href="javascriptopupWindow(\\\'' . $large_link . '\\\')">' . $thumb_slashes . '<br />' . TEXT_CLICK_TO_ENLARGE . '</a>' : $thumb_slashes) . '\');' . "\n" . '//--></script>';
//$noscript_link = '<noscript>' . ($flag_display_large ? '<a href="' . zen_href_link(FILENAME_POPUP_IMAGE_ADDITIONAL, 'pID=' . $_GET['products_id'] . '&pic=' . $i . '&products_image_large_additional=' . $products_image_large) . '" target="_blank">' . $thumb_regular . '<br />' . TEXT_CLICK_TO_ENLARGE . '</a>' : $thumb_regular ) . '</noscript>';*/
TO THIS:
$script_link = 'Faux Fur Combo Choices:<br /><img src='.$products_image_large.' />';
$noscript_link = '';
Bookmarks