Zen Cart Logo
Forums / General Questions / Anyway to turn of the "Larger Image" link and clickable picture?

Anyway to turn of the "Larger Image" link and clickable picture?

Locked

Views: 8,222

Results 1 to 13 of 13
This thread is locked. New replies are disabled.
2 Jul 2007, 10:25 AM
#1
dunitun avatar

dunitun

New Zenner

Join Date:
Jun 2007
Posts:
42
Plugin Contributions:
0

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!

23 Jul 2007, 12:47 PM
#2
nicedreams avatar

nicedreams

New Zenner

Join Date:
Dec 2006
Location:
UK
Posts:
32
Plugin Contributions:
0

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.

2 Nov 2007, 6:05 AM
#3
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

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
...

<?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> ```
13 Nov 2007, 11:20 AM
#4
primal21 avatar

primal21

New Zenner

Join Date:
Oct 2007
Location:
Salisbury Wiltshire UK
Posts:
10
Plugin Contributions:
0

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.

14 Nov 2007, 12:26 PM
#5
nicedreams avatar

nicedreams

New Zenner

Join Date:
Dec 2006
Location:
UK
Posts:
32
Plugin Contributions:
0

Re: Anyway to turn of the "Larger Image" link and clickable picture?

Yes, I agree.

23 Jan 2008, 5:38 PM
#6
lawbird123 avatar

lawbird123

Zen Follower

Join Date:
Sep 2006
Location:
Jacksonville, FL
Posts:
231
Plugin Contributions:
0

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.

9 Feb 2008, 11:02 PM
#7
khopek avatar

khopek

Totally Zenned

Join Date:
Aug 2006
Location:
portlandish, oregon
Posts:
795
Plugin Contributions:
0

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?

25 Feb 2008, 5:53 PM
#8
bumba000 avatar

bumba000

Totally Zenned

Join Date:
Feb 2007
Location:
Pennsylvania
Posts:
856
Plugin Contributions:
0

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

25 Feb 2008, 6:03 PM
#9
bumba000 avatar

bumba000

Totally Zenned

Join Date:
Feb 2007
Location:
Pennsylvania
Posts:
856
Plugin Contributions:
0

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

12 May 2008, 3:38 AM
#10
nuwanda avatar

nuwanda

New Zenner

Join Date:
Apr 2008
Posts:
24
Plugin Contributions:
0

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.

1 Sep 2008, 2:24 AM
#11
monkeypeach avatar

monkeypeach

New Zenner

Join Date:
Jul 2008
Posts:
44
Plugin Contributions:
0

Re: Anyway to turn of the "Larger Image" link and clickable picture?

Is it possible to turn off the "larger image" text on additional images?

I've tried ".imgLinkAdditional {
display: none;
}"

but seems to have no effect.:mellow:

1 Sep 2008, 5:55 PM
#12
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Anyway to turn of the "Larger Image" link and clickable picture?

You can edit the text from "larger image" to blank, and then there is nothing to hide.

In /includes/languages/your_template/english.php, find this line:

define('TEXT_CLICK_TO_ENLARGE', 'larger image');

and change to

define('TEXT_CLICK_TO_ENLARGE', '');

1 Sep 2008, 7:04 PM
#13
monkeypeach avatar

monkeypeach

New Zenner

Join Date:
Jul 2008
Posts:
44
Plugin Contributions:
0

Re: Anyway to turn of the "Larger Image" link and clickable picture?

Thanks, much better way of doing it. :)