Anyway to turn of the "Larger Image" link and clickable picture?
I do not have addition images for the products I sell, and the picture I use are the exact size of the thumbnail picture in the product display. is there anyway to turn off the larger image link below the image and make the image not clickable to pull up the windows for the larger image? Its just not needed for what im selling.
Thank you!
Re: Anyway to turn of the "Larger Image" link and clickable picture?
After a lot of hunting around and searching I found the solution below turns the 'larger image' off. I thought that a much more straightforward option would be available. We don't always want a larger image option.
Change \includes\templates\template_default\templates\tpl _modules_main_product_image.php to:
<?php
/**
* Module Template
*
* @package templateSystem
* @copyright Copyright 2003-2005 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 3208 2006-03-19 16:48:57Z birdbrain $
*/
?>
<?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 '' . zen_image($products_image_medium, addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT) . ''; ?>');
//--></script>
<noscript>
</noscript>
</div>
Please let me know if anyone thinks the code is inaccurate. It worked for me.
Josh.
Re: Anyway to turn of the "Larger Image" link and clickable picture?
Note: Instead of changing the file in /template_default, make a copy, edit and save in your custom template folder: /includes/templates/your_template/templates/tpl_modules_main_product_image.php.
I think you are being a bit overcomplicated. Using javascript to display a static image is unnecessary, and having nothing in the <noscript> option means anyone with js off will not be able to see the image at all.
I think you can eliminate the js entirely here and just say
PHP Code:
...
<?php require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_MAIN_PRODUCT_IMAGE)); ?>
<div id="productMainImage" class="centeredContent back">
<?php echo zen_image($products_image_medium, addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT); ?>
</div>
Re: Anyway to turn of the "Larger Image" link and clickable picture?
Thanks Glenn and Josh for solving this problem. I have been trying to figure out how to remove the JS element of this for some time now. Although Josh's solution does solve the problem, Glenn's is cleaner and works just as well.
Re: Anyway to turn of the "Larger Image" link and clickable picture?
Re: Anyway to turn of the "Larger Image" link and clickable picture?
Glenn,
Is there a way to add a link to the code you posted here? I'm not very familiar with php and I'm shooting for the same concept, but with an image that links to another page on the site.
Re: Anyway to turn of the "Larger Image" link and clickable picture?
This worked for the main image, but not additional images, and anyone know how this will work with Slimbox installed?
Re: Anyway to turn of the "Larger Image" link and clickable picture?
Any idea why this isn't working for me? Won't get rid of larger image text or the ability to click on the medium image.
John
Re: Anyway to turn of the "Larger Image" link and clickable picture?
I seem to be having some troubles in my test store. This worked fine in the live store. Thank you.
John
Re: Anyway to turn of the "Larger Image" link and clickable picture?
Hide the link in your stylesheet. It's called .imgLink.
.imgLink{
display: none;
}
This doesn't kill the javascript option but that's no big deal.